GIVEN:
1. Using XSLT, how do I prevent "empty" elements (elements not having data and not elements with EMPTY declaration) from converting to XML empty syntax?
INPUT:
OUTPUT:
DESIRED OUTPUT:
2. XSLT converts ' and
. Is there a way for XSLT not to convert these two entities. XSLT retains
and
.
INPUT:
OUTPUT:
DESIRED OUTPUT:
3. I need to preserved certain markups in my XML file. For example, all data within <myTag>. <xsl:copy-of> is not working. How do I do it in XSLT?
INPUT:
OUTPUT:
DESIRED OUTPUT:
Thanks for all the help!
Code:
<xsl:output omit-xml-declaration="no" encoding="utf-8" indent="no" media-type="text/xml"/>
1. Using XSLT, how do I prevent "empty" elements (elements not having data and not elements with EMPTY declaration) from converting to XML empty syntax?
INPUT:
Code:
<entry></entry>
OUTPUT:
Code:
<entry/>
DESIRED OUTPUT:
Code:
<entry></entry>
2. XSLT converts ' and
Code:
"
Code:
< >
Code:
&
INPUT:
Code:
< > & and" stages'
OUTPUT:
Code:
< > & and" stages'
DESIRED OUTPUT:
Code:
< > & and" stages'
3. I need to preserved certain markups in my XML file. For example, all data within <myTag>. <xsl:copy-of> is not working. How do I do it in XSLT?
INPUT:
Code:
<p>data data …<myTag>ä</myTag>… data data.</p>
OUTPUT:
Code:
<p>data data ...<myTag>ä</myTag>... data data.</p>
DESIRED OUTPUT:
Code:
<p>data data ...<myTag>ä</myTag>... data data.<p>
Thanks for all the help!