Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 696221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:02:27+00:00 2026-05-14T03:02:27+00:00

I have a stylesheet that makes use of exslt:dynamic module and more precisely, it

  • 0

I have a stylesheet that makes use of exslt:dynamic module and more precisely, it only uses the evaluate function. I know the XslCompiledTransform from .NET 2.0 does not implement this module (just like the ExslTransform from Mvp.Xml).

Any idea how to solve this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T03:02:28+00:00Added an answer on May 14, 2026 at 3:02 am

    Mvp.Xml includes an similar extension function dyn2:dynamic.

    object dyn2:evaluate (node-set,
    string, string?)

    The dyn2:evaluate function evaluates a
    string as an XPath expression and
    returns the resulting value, which
    might be a boolean, number, string,
    node set, result tree fragment or
    external object.

    First node-set argument provides a
    context node (the first node in the
    passed node-set), such that selection
    paths are evaluated relative to it.
    Second string argument is the XPath
    expression to be evaluated. Third
    optional string argument provides
    namespace bindings to be used to
    resolve namespace prefixes in the
    XPath expression. Namespaces are
    defined in the XML style, as a space
    separated list of namespace
    declaration attributes.

    All namespace prefixes that are in
    scope for the context node (or its
    parent node if the context node isn’t
    element node) can be referenced in the
    evaluated XPath expression. Note
    though that relying on namespace
    prefixes defined in the source XML is
    very unreliable. We encourage users to
    define namespace bindings explicitly
    in the third argument instead.

    If the node-set passed as first
    argument is empty (no context node) or
    the expression string passed as the
    second argument is an invalid XPath
    expression (including an empty
    string), this function returns an
    empty string. Malformed namespace
    declarations in the third argument are
    ignored.

    Note that this function is more
    limited than EXSLT’s dyn:evaluate()
    function. More formally:

    • No context position and context size information is available.
    • No variable bindings – this function is unable to evaluate XPath expressions, which contain variable references!
    • No custom extension functions – only core XPath functions and all extension functions, supported by EXSLT.NET are available.
    • No current node, so the expression cannot contain the current() function calls.
    • No key definition information available, so the expression cannot contain the key() function calls.
    • No custom decimal format definitions are avilable, so the
      expression cannot contain the
      fomat-number() function calls that
      refer to a
      definition.

    There is no 1 parameter version of that extension function, because it would have no context to evaluate the expression in.

    This following extension is a 1 parameter version of evaluate. The evaluation context is fixed.

    public class MyExtension
    {
        IXPathNavigable context;
        public MyExtension( IXPathNavigable context )
        {
            this.context = context;
        }
        public object Evaluate( string expression )
        {
            return context.CreateNavigator().Evaluate( expression );
        }
    }
    
    XsltArgumentList args = new XsltArgumentList();
    args.AddExtensionObject("my-ext", new MyExtension(doc));
    
    xslt.Transform( doc, args output );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want yo use the EXSLT - DYN:EVALUATE in a style sheet. I have
I have an external stylesheet that has specific IE-hacks. Every so often my site
We have a large ASP.Net website that has a single css stylesheet which is
How can I get superscript done, only in CSS? I have a stylesheet where
I have a xslt stylesheet with multiple xsl:import s and I want to merge
In a stylesheet i have: * HTML BODY { padding-right: 0px; padding-left: 0px; padding-bottom:
I would like to have alternate behavior during a print stylesheet on a web
I have a Java servlet which generates XML, translates it with an XSLT stylesheet,
I have a project that adds elements to an AutoCad drawing. I noticed that
I have a script that appends some rows to a table. One of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.