Hi there,

I'm new to this list and maybe asking a beginner's question.

I use Saxon EE using oXygen XML Editor.
I try to use a parameter from the "Transformation scenario windows" (which is, I hope, equal to the Saxon command line options).
But it doesn't work.

This is my input:

<?xml version="1.0" encoding="UTF-8"?>

This is my xslt:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    <xsl:param name="parameter"/>
    <xsl:template match="/">
            <xsl:for-each select="$parameter">
                    <xsl:value-of select="."/>

In the oXygen parameter window I set the following:
name        value           
parameter    //element     [x] evaluate as XPath

Expected output is:

I hoped Saxon would create from the input parameter //element an Xpath expression selecting all <element> elements. But that isn't the case. Instead I get the error message: "Cannot evaluate the XPath expression '//element' for parameter 'parameter'. Reason: Finding root of tree: the context item is absent"

I don't understand this: There is context node! It is the root element "/".

Is this an issue of oXygen or is it me misunderstanding the concept of parameters?

Thanks in advance!