[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] [XSLT 3.0] A more efficient way to xsl:evaluate a bunch of XPath expressions against an XML document?


Subject: Re: [xsl] [XSLT 3.0] A more efficient way to xsl:evaluate a bunch of XPath expressions against an XML document?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sun, 11 Nov 2012 13:08:39 +0000

On 11/11/2012 13:01, Costello, Roger L. wrote:
     <xsl:template match="Document">
         <xsl:variable name="here" select="." />
         <xsl:for-each select="$xpaths//xpath">
             <xsl:variable name="xpath" select="." />
             <xsl:for-each select="$here">
                 <xsl:evaluate xpath="$xpath" as="xs:boolean" />
             </xsl:for-each>
         </xsl:for-each>
     </xsl:template>

No idea about relative efficiency but I think that's th esame as


<xsl:template match="Document">
<xsl:evaluate xpath="string-join($xpaths//xpath,',')" as="xs:boolean*" />
</xsl:template>


David


-- google plus: https:/profiles.google.com/d.p.carlisle


Current Thread