You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Gary L Peskin <ga...@firstech.com> on 2001/03/28 20:14:28 UTC

Re: Xalan import problem

Peter Peshev wrote:
> 
> I have the following problem :
> I have two files A.xsl and Central.xsl. I want to declare a namespace
> in Central.xsl, to import Central.xsl in A.xsl and to use the
> namespace. However it is not working. The following error occurs :
> "XSLT Error (javax.xml.transform.TransformerConfigurationException):
> Prefix must resolve to a namespace"
> (I tried with Xalan 2.0.1 and 2.0.0)
> If I declare the namespace in A.xsl everything is fine, but it is not
> applicable for big project with many XSL files. Is there a
> workaround?

The XSLT Recommendation says that "The inclusion works at the XML tree
level. The resource located by the href attribute value is parsed as an
XML document, and the children of the xsl:stylesheet element in this
document replace the xsl:include element in the including document."

This also applies to xsl:import as well.

I take this to mean that each stylesheet has to be able to stand on its
own as a valid XML document.  Perhaps you could handle this with
entities somehow but I don't know enough about them togive you any info
in this area.

Gary