[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: selecting specific elements from a second file
On Sat, Dec 17, 2016 at 03:37:38PM -0000, Mark Wilson mark@xxxxxxxxxxxx scripsit: > Thank you, Martin, > Made one small change: > <xsl:template match="Stamp"> > <xsl:copy> > <xsl:apply-templates select="@*, node(), key('flaws', > CatNumbers/@pofis-number, doc('../work/flaws3.xml'))/node()"/> > </xsl:copy> > </xsl:template> The optimizer in whatever processor you are using may or may not save you from this by realizing it should cache the results of the doc() function, but defining a global variable (one a child of the xsl:stylesheet element) <xsl:variable name="flaws3" as="document-node()" select="doc('../work/flaws3.xml')"/> and then doing the apply-templates as <xsl:apply-templates select="@*, node(), key('flaws', CatNumbers/@pofis-number, $flaws3)/node()"/> is likely to get you better performance. -- Graydon
|
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
|