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

RE: listing values in a key

Subject: RE: listing values in a key
From: Stuart Brown <sbrown@xxxxxxxxxxx>
Date: Mon, 17 Mar 2003 11:58:14 -0000
RE:  listing values in a key
Hi Jan,

> I am having problems with this xml:
> 
> 	<xsl:key name="GROUPowner" match="TTMAKER/NEWTREE/GROUP"
> use="concat('@SimpleTypeName',' ','@CategoryOrGroupParent')"/>

There may be additional problems (it's hard to tell without a sample of the
XML itself) but for a start you have put inverted commas round the attribute
names in the use attribute of your key definition, which means they are
treated as strings, not nodes. You have effectively stated:

<xsl:key name="GROUPowner" match="TTMAKER/NEWTREE/GROUP"
  use="'@SimpleTypeName @CategoryOrGroupParent'"/>

You probably want:

<xsl:key name="GROUPowner" match="TTMAKER/NEWTREE/GROUP"
  use="concat(@SimpleTypeName,' ',@CategoryOrGroupParent)"/>

I suspect you have made the same error in your definition of the variable
start. What you have:

> 	<xsl:variable name="start" select="concat('SP100',' ','File
> CopyBook')"/>

is exactly equivalent to :

<xsl:variable name="start" select="'SP100 File CopyBook'"/>

as you are just concatenating three strings. If SP100 and FileCopyBook are
elements whose values you want to use, you again want:

<xsl:variable name="start" select="concat(SP100,' ',FileCopyBook)"/>

Hope that helps,

Stuart

 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.