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

Re: multiple paths in the "use" in key....I'm getting

Subject: Re: multiple paths in the "use" in key....I'm getting desperate - please help
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 7 Jul 2005 23:18:32 +0100
Re:  multiple paths in the "use" in key....I'm getting
> but the "and" between the paths in the "use" doesn't seem to work. PLEASE HELP ME! I'm going soon
> nuts

If you put a boolean expression such as ... and ... in the use attribute
then this will have value either true or false, so the all the nodes
will be given one of these two key values and looking up a key with any
other value than true or false will return nothing.

so

after

      <xsl:key name="ForwardingAddressPostCodeIdentifier" match="PostCodeIdentifier" use="
../../AddressSpecific/cpr:MunicipalityCode and ../../AddressSpecific/cpr:StreetCode and
../../AddressSpecific/StreetBuildingIdentifier" />

key('ForwardingAddressPostCodeIdentifier','true') returns all
PostCodeIdentifier elements that have the three cpr: elements at those
relative ocations, and
key('ForwardingAddressPostCodeIdentifier','false') returns all other
PostCodeIdentifier elements.

I suspect this is not what you want but I can't tell from your
description what you do want.

You haven't really stated what you wantto generate and haven't given
eiether a well formed input test file or the desired output but
guessing, you may want something like

<xsl:key name="x" match="XIaddressSpecificLabelStructure" use="
concat(AddressSpecific/MunicipalityCode,':',AddressSpecific/StreetCode,':',AddressSpecific/StreetBuildingIdentifier)
"/>

...

<xsl:template match="ForwardingAddressStructure">
<xsl:copy-of select="key('x',
concat(AddressSpecific/MunicipalityCode,':',AddressSpecific/StreetCode,':',AddressSpecific/StreetBuildingIdentifier)
)"/>

You may need to prefix the element names with a namespace prefix (I can't
say as you didn't show namespace usage)

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. 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.