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

copying attributes

Subject: copying attributes
From: "Benjamin Corliss" <benjamin@xxxxxxxxxxxxxxx>
Date: Wed, 3 Nov 1999 13:19:28 -0800
xsl copy attributes
I have recently switched to LotusXSL from XT. I have a template that deep copies an element that worked fine in XT, but with LotusXSL, it appears that the attribute names are not coming through correctly.

For example, the template fragment:

===========================
<xsl:for-each select="/product-data/n-way-data">
<xsl:copy>
<xsl:apply-templates select="@*|node()|text()"></xsl:apply-templates>
</xsl:copy>
</xsl:for-each>
===========================
my identity template:
===========================
 <xsl:template match="*|@*|comment()|processing-instruction()|text()|node()" priority="-1">
  <xsl:copy>
   <xsl:apply-templates select="*|@*|comment()|processing-instruction()|text()|node()"></xsl:apply-templates>
  </xsl:copy>
 </xsl:template>
===========================
 
This copies everything correctly except for the attributes.
For example, it transforms:

<histogram misc="0" name="load-times" type="int">

into:

<histogram>0load-timesint

It seems to be missing the attribute names and inserting the attribute values as text nodes.

I have scanned the archives and all the usual suspects for answers, but have found no solution to this problem (other than to find that children and attributes are not automatically copied with xsl:copy).
 
I would be thankful to a pointer to any solution source,
 
Benjamin
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.