Subject: Re: [xsl] 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 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] multiple paths in the "us, Wendell Piez | Thread | Re: [xsl] multiple paths in the "us, Christian CXR Rasmus |
Re: [xsl] multiple paths in the "us, Wendell Piez | Date | Re: [xsl] multiple paths in the "us, Christian CXR Rasmus |
Month |