Hi good morning!

I have developed XSLT for transforming xml into xml.

Ex :
input xml


output xml


In the transformed xml file I am getting self closing tag for the empty data element.

But for us our parser does not support self closing tag. I want the trans formed file
output with out self closing tag.

10 Years
Discussion Span
Last Post by MattEvans

Thats a severe problem with the parser, so ideally, fix the parser. Is it an inhouse solution? If so, use a base framework like SAX2/DOM rather than manually writing the parser component. Will save on alot of potential headaches.

If you absolutely must use this parser without fixing it, do the following in elements that may be empty:

<xs:comment>parser bug fix</xs:comment>
... other potential content...

which will expand to the following on the occasion that desc is otherwise empty.

<!--parser bux fix-->

Your substandard parser does support comments, right?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.