Re: key declarations (using a sequence constructor)
> Do they just make a string with some kind of separator > breaking up the attributes? usually, yes. > Isn't there a chance of this failing if the character used for the > separator is used in one or more of the attributes? In theory, in general, yes, but in practice there are usually characters that can not be, or extremely unlikley to be, in the attribute. For example if the attributes are ID they can not have letters that are not in XML names, for example |, of if the markup is in a general natural language document it's unlikely to have unassigned private use characters such as 􀀀 which can be useful as delimiters. Or of course you can use 2 keys. <xsl:key match="name" use="string-join((@oid, @parent-oid), '|')"/> ... key('name',string-join((@oid, ../@oid), '|')) could be instead: <xsl:key match="namea" use="@oid"/> <xsl:key match="nameb" use="@parent-oid"/> ... key('namea',@oid) intersect key('nameb',../@oid) David ________________________________________________________________________ The Numerical Algorithms Group Ltd is a company registered in England and Wales with company number 1249803. The registered office is: Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom. This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. ________________________________________________________________________
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format