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

Re: xsl:key use attribute using string() causes missin

Subject: Re: xsl:key use attribute using string() causes missing all matches except the first one
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 24 Mar 2004 16:52:23 GMT
missin value
  I am not sure what is the reason for
  this, would appreciate if anyone could shed light on
  this behavior.  Example input XML and XSLT below.

That is the usual behaviour in XPath1 for all string valued functions.
To get a string value from a node set (either implicitly or explictly
using string()) you take the string value of the first  node in document
order.

You see the same effect in eg
<xsl:value-of select="cell[@column=4]/subcell"/>
which would just return teh string value of teh first such element
whereas
<xsl:copy-of select="cell[@column=4]/subcell"/>
would return all the elements.

In this case I think the solution is just to remove the string()
function.

I don't understand

  I been using string() in xsl:key use attribute
  extensively since it allows me to retrieve records
  using the key value "".

as this is true whether or not you use string().

David


I have had several messages today that have been somehow forwarded by
the list manager with no subject line and a return address of
xsl-list-return-144-davidc=nag.co.uk@xxxxxxxxxxxxxxxxxxxxxx
and the original header in the message body.,
I have added subject lines and corrected to address etc by hand.


-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

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.