[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

copying pi() in xml files

Subject: copying pi() in xml files
From: Youngmee Kim <youngmeekim@xxxxxxxxxx>
Date: Fri, 11 Jun 1999 04:01:53 -0500
copying 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 &lt; and &gt;
instead of < (&lt;!DOCTYPE.... []&gt;).

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 &lt; and &gt;?

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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.