Hi David,

thank you for your answer.

David Marston writes:

Have you tried using two namespace-alias declarations, one for xsl and one for xalan? You need to set up the latter one so that "xalan" is the prefix used in the output, since the string "xalan:nodeset" is just part of a string at this stage, not yet an expression.


No, as there is nothing to be replaced by 'xalan'.
In the generated script the 'xalan' prefix is needed because of the nodeset extension, but in the generating script it is simply a string and will therefor not be replaced (as is with the 'xsl:vendor' problem in the example).
That's way I have declared 'xalan' in the generating script within both the <transform>-tags (the script-tag and the tag for the output).
While it might be unnecessary in the generating script tag(not shown here) it is needed in the generated script, but Xalan omitts it.


Input:
<xsl:namespace-alias stylesheet-prefix="out" result-prefix="xsl"/>
<out:transform version="1.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
        xmlns:fo="http://www.w3.org/1999/XSL/Format";
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
        xmlns:xalan="http://xml.apache.org/xalan";
        xmlns:msxsl="urn:schemas-microsoft-com:xslt"
        xmlns:saxon="http://icl.com/saxon"; >

As far as I understood the rules due to the first line with the alias declaration the xslt-processor should put out the second line with the <out:transform> tag without any changes, but the result is:
<out:transform
xmlns:out="http://www.w3.org/1999/XSL/Transform";
xmlns:saxon="http://icl.com/saxon";
xmlns:msxsl="urn:schemas-microsoft-com:xslt"
xmlns:fo="http://www.w3.org/1999/XSL/Format";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
version="1.0">


Strange for me is, that only Xalan is deleting one of the namespace declarations in the output.
The script works with Saxon and MSXSL.


Peter Janker



Reply via email to