xsl-list
[Top] [All Lists]

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

2007-08-21 02:37:22
Matt Poff wrote:

  Hi

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

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

  You should be able to use './foo[(_at_)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[(_at_)type = &quot;bar&quot;]"/>

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

  Regards,

--drkm























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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>