[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] copying pi() in xml files
I am trying to copy an xml file to another with a little bit of changes between the two. So I tried to copy the whole thing first, and can't seem to find a way to copy <?xml version="1.0"?> or <!DOCTYPE ... []>. As a matter of fact, the comments from the DTD in the <!DOCTYPE ..> were copied but not the line itself. So when I tried to generate the <!DOCTYPE ..> into the result file with CDATA in the xsl specification, I got < and > instead of < (<!DOCTYPE.... []>). Is there a way to copy <?xml version...?> ? Is there a way to copy <!DOCTYPE ..[]> ? Can I use CDATA for something like what I tried to do and get <> instead of < and >? I used the following xsl with xt. <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" result-ns="" indent-result="yes"> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="*|@*|comment()|pi()|text()"> <xsl:copy> <xsl:apply-templates select="*|@*|comment()|pi()|text()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> Thanks much in advance for your help. Youngmee Kim 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
|