Question regarding handling empty tags with tidy

I am trying to convert some SGML files to XML using tidy, and I almost
got everything to work, but there is one place where I am getting
stumped. The SGML files have some empty tags with the SGML syntax (i.e.,
without the 
<tag /> syntax). Tidy complains about those, which is understandable.
However, I specify in the configuration file a list of those empty tags
using the new-empty-tags option. Still tidy complains. If I ask it to
force output, it simply outputs the empty tags as they were (although it
does quote the attribute values). 

I was wondering if there as a fix or a workaround for this?
(so that in the snippet below it generates <pb n="158" /> or <pb
n="158"></pb>
Instead of simply <pb n="158">)?

Thanks so much for your response! Below are some related information.

Jit

// My configuration file:
new-empty-tags: pb,lb,lacuna,caesura
new-blocklevel-tags: pb,lb,lacuna,caesura
input-xml: yes
add-xml-decl: yes
doctype: omit	
output-xml: yes
show-warnings: no
uppercase-tags: no
uppercase-attributes: no
force-output: yes

------------

Input file snippet:

<stanza><l ln=17>&ldquo;Speak, Father!&rdquo; once again he cried,
</l><l indent=1 ln=18>&ldquo;If I may yet be gone!&rdquo;
</l><l ln=19>And but the booming shots replied,
</l><l indent=1 ln=20>And fast the flames roll'd on.</l></stanza>

<pb n=158>
..... .... </poem>
-----------------
Tidy generates:
Line 55 column 66 - Error: unexpected </poem> in <pb>
1 warning, 1 error were found! Not all warnings/errors were shown.

<stanza>
<l ln="17">&#8220;Speak, Father!&#8221; once again he cried,</l>
<l indent="1" ln="18">&#8220;If I may yet be gone!&#8221;</l>
<l ln="19">And but the booming shots replied,</l>
<l indent="1" ln="20">And fast the flames roll'd on.</l>
</stanza>
<pb n="158">
..... .... </poem>

--
Arijit Sengupta
Assistant Professor, Information Systems
Adjunct Assistant Professor, Computer Science 
Kelley School of Business, Indiana University
812-855-2736 (voice) 812-856-3355 (fax)asengupt@indiana.edu (email) 
http://www.kelley.iu.edu/asengupt 

Received on Saturday, 15 January 2005 03:28:32 UTC