Greetings,

I have a set of XSLT style sheets that include a common sheet which contains logic.  It seems that if one of the sheets that includes the common sheet defines a new namespace prefix, that prefix is not recognized in the common sheet.

 

For example, the common sheet (lets call this tokenizer.xsl) has the definition:

 

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

            <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

.

.

.

 

And the sheet (lets call it test.xsl) that is called by Nant has the following definition:

 

<xsl:stylesheet version="1.0" xmlns:wse="http://schemas.microsoft.com/wse/2003/06/Policy"

                        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"

                        xmlns:wsp="http://schemas.xmlsoap.org/ws/2002/12/policy"

                        xmlns:wssp="http://schemas.xmlsoap.org/ws/2002/12/secext"

                        xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"

                        xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"

                        xmlns:wsbn="http://schemas.jackhenry.com/jxchange/policy/throttling/"

                        xmlns:wsauth="http://schemas.jackhenry.com/jxchange/policy/authentication/"

                        xmlns:wsrbac="http://schemas.jackhenry.com/jxchange/policy/authorization/"

                        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

                       

            <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>

            <xsl:include href="">

.

.

.

 

Where ../../tokenizer.xsl is the sheet that contains the common logic.  When I call test.xsl from Nant I get a ‘prefix is not defined’ error.  However if I include the extra namespaces in the tokenizer.xsl sheet the script executes normally.  I am able to execute test.xsl from XML Spy without including the extra namespaces in tokenizer.xsl so I’m thinking it may be something to do with how Nant handles namespaces with the xsl:import.

 

This behavior occurs when I have the namespaces defined in the sheet that is being imported but not in the sheet doing the import as well.  Is there a way to set up a <style> call so that namespaces are shared across sheets that are being imported?

 

Many Thanks,

Ryan



NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies.

 

 

Reply via email to