[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: unable to resolve intersect/union operator
> $interim/A/normalize-space() gives an error. However normalize-space($interim/A) That's the price you pay for working with a draft specification. The rules changed, and saxon changed with it, you need saxon 8.4 for the first form to work. The second form will generate an error if there is more than one $interim/A node. Looks like you want to know all the A Values that are contained in any B on your input file <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:template match="Parts"> <xsl:value-of select="distinct-values( A/Value[for $a in . return /Parts/B/Value[contains(.,$a)]] )" separator=", "/> </xsl:template> </xsl:stylesheet> $ saxon8 parts.xml parts.xsl <?xml version="1.0" encoding="UTF-8"?>Handle, Bolt You don't need distinct-values() on your test case, it's only needed if A may have repeated values. 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 ________________________________________________________________________
|
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
|