|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Intersection Problem
> How I can "Intersect" document 2 with document 1 so that it brings the
> <statResult> nodes which have the equal number or more
> drilldown nodes found
> in doc 2. (The intersection key is drilldownType)
I'm not really sure what you mean by "intersect" - it would help to give an
indication of the output you expect. I suspect you mean that you want to
augment document2 by adding the drillDownName corresponding to each
drillDownType. (I'd call that a join rather than an intersection). The
obvious way to do this is to define a key:
<xsl:key name="ddt" match="DrillDown" use="DrillDownType"/>
and then process document 2 by writing:
<xsl:template match="drillDown">
<xsl:copy-of select="DrillDownType"/>
<xsl:variable name="ddt" select="DrillDownType"/>
<xsl:for-each select="document('doc1')">
<xsl:copy-of select="key('ddt', $ddt)/DrillDownName"/>
</xsl:for-each>
</xsl:template>
Mike Kay
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








