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

RE: Using copy to change a node, whilst retaining the

Subject: RE: Using copy to change a node, whilst retaining the attributes
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 5 Aug 2003 00:05:57 +0100
reid carlisle
apply-templates requires a node set as the value of its select
attribute, but:

	<xsl:apply-template select="not(ancestor::player/@pword=$pmkey
and @ID &gt;= $from and @ID &lt;= $to)"

assuming the missing /> is really there at the end selects a boolean
value so either true() or false(0 this isn't a node set and should
generate a run time error whatever value is returned.

I think that inside the xsl:copy you want

<xsl:choose>
 <xsl:when test="ancestor::player/@pword=$pmkey
                and @ID &gt;= $from and @ID &lt;= $to">
  <xsl:value-of select="$type"/>
</xsl:when>
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
</xsl:choose>

don't you?

David

 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.