Subject: Re: [xsl] [XSLT 3.0] A more efficient way to xsl:evaluate a bunch of XPath expressions against an XML document? From: Michael Kay <mike@xxxxxxxxxxxx> Date: Mon, 12 Nov 2012 10:29:47 +0000 |
Michael Kay Saxonica
Hello Phil,
Yes, I thought that as well. But when I add the context-item attribute I get this error message from SAXON:I haven't done this myself, but from my reading of the spec[1], you should use the context-item attribute of xsl:evaluate to set the evaluation context instead of relying on the surrounding xsl:for-each instruction - as follows:
<xsl:template match="Document"> <xsl:variable name="here" select="." /> <xsl:for-each select="$xpaths//xpath"> <xsl:evaluate xpath="." context-item="$here" as="xs:boolean" /> </xsl:for-each> </xsl:template>
Attribute @context-item is not allowed on element <xsl:evaluate>
/Roger
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] [XSLT 3.0] A more efficie, Costello, Roger L. | Thread | [xsl] Modify Value of a Parameter G, Lisa Jiang |
RE: [xsl] [XSLT 3.0] A more efficie, Costello, Roger L. | Date | [xsl] Modify Value of a Parameter G, Lisa Jiang |
Month |