Albert said:
how can I force Xalan (Java) not to create an empty element when there is
nothing between begin and end tag, which means that e.g.
<myTag></myTag>
...does not become...
<myTag/>
If it really matters to you, you can try to find or write a SAX
serializer that handles this as a special case, ask Xalan to output SAX,
and plug the two together. Or adapt Xalan's existing serializer code;
one of the advantages of open-source projects is that you can alter them
and/or use them as a starting point for specialized tools. (You might
want to compare the XML and HTML serializers; I think the latter has
some similar tweaks.)
But personally, I would suggest you fix whatever downstream tool isn't
correctly handling <myTag/>. XML considers the two forms precisely
equivalent to each other, so you're asking for a difference that should
make no difference.
(Xalan has its own mailing list, which is generally a better place to
ask questions which are specific to that processor. But this one's a
general enough issue that I thought it was worth answering here.)