|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XML to XML transformation
I'd like to use XSLT to transform an XML document to another XML document.
The result should be very similar to the source, I may need to make only
slight changes.
To begin with, I tried to write an XSL stylesheet that creates a result
document that is the same as the source.
I found that I don't know how to do it.
I searched all the XSL tutorials I could found on the web, and couldn't find
an answer.
The best thing I got was this:
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="*">
<xsl:text disable-output-escaping = "yes" ><</xsl:text>
<xsl:value-of select="name()"/>
<xsl:text disable-output-escaping = "yes" >></xsl:text>
<xsl:apply-templates />
<xsl:text disable-output-escaping = "yes" ><</xsl:text>
<xsl:value-of select="name()"/>
<xsl:text disable-output-escaping = "yes" >/></xsl:text>
</xsl:template>
</xsl:stylesheet>
There must be something simpler than this.
Also, this worked for me with XSL Tester (of VBXML), but did not work with
Xalan-J.
Can anyone help me?
Evyatar.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








