[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: FXPath v0.3 + SAXON Implementation

Subject: Re: FXPath v0.3 + SAXON Implementation
From: "David Rosenborg" <david.rosenborg@xxxxxxxxxx>
Date: Thu, 8 Mar 2001 14:32:38 +0100
Re:  FXPath v0.3 + SAXON Implementation
Hi Dave,

> I'm *guessing* that the function evaluates to the application
> of the expression to the node value.
> If the 'expression' is something like contains(.,'P')
> is it possible to apply that expression within the moded template?
>  Or am I wrong again?

Function application is not so dynamic in XPath/FXPath.
You cannot convert the $expr string into an expression which gets evaluated. You would
have to test for the string value of $expr value as in

<xsl:template match="*" mode="com:eval">
  <xsl:choose>
    <xsl:when test="$expr = '.'">
      <xsl:value-of select="."/>
    </xsl:when>

    <xsl:when test="starts-with ($expr, 'contains (.,')">
        <xsl:if test='contains (., substring-before (substring-after ($expr, "&apos;"), "&apos;"))'>true</xsl:if>
    </xsl:when>
    ...
</xsl:template>

This isn't particulary dynamic or scalable, but I believe this is the intended use of $expr in com:eval.

Cheers,

</David>

David Rosenborg
Pantor Engineering AB



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.