Re: [xsl] Evaluate string as XPATH axis in XSLT1.0?

Subject: Re: [xsl] Evaluate string as XPATH axis in XSLT1.0?
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Tue, 21 Aug 2007 11:36:46 +0200 (CEST)
Matt Poff wrote:

  Hi

> [Two]
> <xsl:variable name="testmap" select="dyn:evaluate('./foo[@type = 
> &apos;bar&apos;]')"/>

> Result: Error = "expected ")", found "<name>"

  You should be able to use './foo[@type = &quot;bar&quot;]'.

  Your solution with concat() is another way.  If you are using
dyn:evaluate(), then you dynamically build the expression anyway.

> It seems like dyn:evaluate isn't handling embedded apostrophes

  dyn:evaluate() handles apostrophes or whatever exactly the same way
as within any XPath expression.  If the result of the two following
expressions, evaluated in the same context, is different, then there is
a bug into your XSLT processor:

    <xsl:value-of select="
        ./foo[@type = &quot;bar&quot;]"/>

    <xsl:value-of select="
        dyn:evaluate('./foo[@type = &quot;bar&quot;]')"/>

  Regards,

--drkm























      _____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

Current Thread