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

Re: [2.4.2] : Element Nodes - Original Markup Preservation

Subject: Re: [2.4.2] : Element Nodes - Original Markup Preservation
From: James Clark <jjc@xxxxxxxxxx>
Date: Thu, 10 Sep 1998 16:19:51 +0700
xsl transform with comment preservation
Tony Graham wrote:
> 
> At 9 Sep 1998 20:26 -0400, G. Ken Holman wrote:
>  > Is the XSL group considering including features in the specification to
>  > support the preservation of source document markup in an result document?
> 
> In section 2.7.2, Overview:
> 
>    Issue (identity-transform): There needs to be a way to do the
>    identity transformation (creating a result tree identical to the
>    source tree). How should this be done?

But it says "tree" not "document".  If the source markup isn't in the
tree, then supporting the identity transformation doesn't mean that the
source markup will be preserved.

My guess is that you'll be able to preserve PIs and comments but not
entity references or character references.  In the current version of
XT, you can use the following to do the identity transformation:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="*|comment()|pi(*)">
  <xsl:copy>
    <xsl:process-children/>
  </xsl:copy>
</xsl:template>

</xsl:stylesheet>

James



 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.