$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
________________________________________________________________________
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--