Sorry … I’did this a little dirty

I declared :






to have saxon:evaluate instead of dyn:evaluate.



Von: Michael Kay []
Gesendet: Freitag, 6. Juni 2014 11:45
An: Mailing list for the SAXON XSLT and XQuery processor
Betreff: Re: [saxon] how to importing / including namespaces from included XSL files?


Saxon doesn't support dyn:evaluate(), so please rephrase the question to indicate the code you are using with Saxon, and the Saxon version you are using.


The rules for dyn:evaluate state that the namespace context is taken from the stylesheet, not from the source document, and saxon:evaluate is similar. The new xsl:evaluate instruction in XSLT 3.0 (implemented in Saxon-PE 9.5) allows you to say where the namespace context is coming from, including the option of taking it from an element in the source document. XPath 3.0 also allows you to write XPath expressions that are independent of the namespace context by using the syntax Q{uri}local in place of prefix:uri.



Michael Kay


+44 (0118) 946 5893




On 6 Jun 2014, at 10:18, wrote:

Sorry, at first I used xsltproc now I tried Saxon 9.5 (no exslt) and Saxon 6.5.5


Von: []
Gesendet: Freitag, 6. Juni 2014 10:59
Betreff: [saxon] how to importing / including namespaces from included XSL files?



OK. I'm sorry for my writing but its very strange what I'm doing to get a xPath processed. I'm using just the xsltproc, so only XSLT 1.0 and EXSLT are my tools.

I use one input xml file to get the further xml files which I have to also process. This causes that I do not know the prefixes and the namespace in the xsl I'm applying.

Futher I have to use "xPathes" (which are stored as attributes) out of my input xml file. So I have to use EXSLT to evaluate (dyn:evaluate function) xpathes on documents which are loaded to variables:

<xsl:variable name="importedDocument" select="document('importDoc.xml')" />


form the importDoc:

<?xml version='1.0'?>

  <bm:root xmlns:bm="http://my.bookmarks/ns/1.0" >



So after that I want to use a xpath ... something like that in my xslt:

<xsl:stylesheet xmlns:xsl=""   version="1.0"




    extension-element-prefixes="dyn rs exsl" >


    <xsl:include href="preparedXSL.xsl" />




     <xsl:variable name="xpath" select="bm:root/bm:bookmarks[4]/@xpath" />

     <xsl:for-each select="exsl:node-set($importedDocument)">

        <xsl:if test="dyn:evaluate($xpath)" >

          <xsl:value-of select="generate-id(dyn:evaluate($xpath))" />




But finally I got this message from

dyn:evaluate() : unable to evaluate expression 'bm:root/bm:bookmarks[4]/@xpath'


So I need something like "autoregister namespaces" ???
Or is it possible to use catalog files to fix that ???
Or maybe I can use some kinds of imports or includes ???

Best Regards




Mit freundlichen Grüßen/Kind regards

Markus Sticker
Forschung und Entwicklung ZF Konzern/Research and Development ZF Group
Infrastruktur/Infrastructure (DTEP4)

ZF Friedrichshafen AG
88038 Friedrichshafen, Deutschland/Germany
Telefon/Phone  +49 7541 77-7644, Telefax/Fax  +49 7541 77-907644

Vorsitzender des Aufsichtsrats/Chairman of the Supervisory Board: Prof. Dr. Giorgio Behr
Vorstand/Board of Management: Dr. Stefan Sommer (Vorsitzender/CEO), Dr. Konstantin Sauer, Jürgen Holeksa, Michael Hankel, Wilhelm Rehm, Rolf Lutz

Sitz/Headquarters: Friedrichshafen
Handelsregistereintrag Amtsgericht Ulm HRB 630206/Trade register of the municipal court of Ulm HRB 630206


Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
saxon-help mailing list archived at