|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Merging multiple documents efficiently
I have multiple documents, files A, B, and C. I want to join them on the
id of the first, but only if a matching id is in the 2nd or 3rd. How do I
do this?
NOTE: File A is my source file. I call document( ) to match against B and
C
Example:
File A File B File C Desired Output
<id>A</id> <id>A</id> <id>B</id> <id>A</id>
<id>B</id> <id>D</id> <id>D</id> <id>B</id>
<id>D</id> <id>D</id>
<id>D</id>
<id>E</id>
Here is (part of) my existing code. It generally works, but is quite
inefficient for large input files.
<xsl:template match="Hierarchy">
<xsl:for-each select="NodeID[. = $PRD/ListofProducts/Product/NodeID]|
NodeID[. = $HRY/Hierarchies/Hierarchy/NodeID]|
NodeID[. = $MSD/MDSDs/MSDS/NodeID]">
<xsl:for-each select="..">
// Perform matching based on NodeID
...
</xsl:for-each>
</xsl:for-each>
</xsl:template>
Thanks,
Matt Youngblut
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








