XSLT queries
hi! got a some questions about XSLT. thanks in advance people.
GIVEN:
<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:
<entry></entry>
OUTPUT:
<entry/>
DESIRED OUTPUT:
<entry></entry>
2. XSLT converts ' and ". Is there a way for XSLT not to convert these two entities. XSLT retains < > and &.
INPUT:
< > & and" stages'
OUTPUT:
< > & and" stages'
DESIRED OUTPUT:
< > & 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:
<p>data data …<myTag>ä</myTag>… data data.</p>
OUTPUT:
<p>data data ...<myTag>ä</myTag>... data data.</p>
DESIRED OUTPUT:
<p>data data ...<myTag>ä</myTag>... data data.<p>
Again, thanks to everybody!
|