You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Douglas Conklin <do...@nightfire.com> on 2002/01/26 02:35:30 UTC
XSLTC problem with namespaces
This is my day for lots of questions.
I am attempting to compile some style sheets, and I am having a problem with
namespaces.
If I have a namespace declared in addition to the XSL namespace,
like
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/xsl/Transform"
xmlns:FormatUtil="FormatUtil">
the compiler rejects the style sheet with the following message:
The input document is not a stylesheet (the XSL namespace is not declared
in the root element).
If I remove the xmlns:FormatUtil="FormatUtil" the compiled accepts the style
sheet (and fails because things reference FormatUtil).
I looked at the code in package org.apache.xalan.xsltc.compiler.Parser and I
didn't see anything obvious. The error is emitted in getStyleSheet. I also
couldn't find anything about this in the docs.
Has anyone else seen anything like this?
easy,
douglas d
Re: XSLTC problem with namespaces
Posted by Gene Roske <Ge...@Computer.org>.
Douglas -
It looks like your xsl:stylesheet element also needs:
extension-element-prefixes="FormatUtil"
- Gene Roske
Douglas Conklin wrote:
>
> This is my day for lots of questions.
>
> I am attempting to compile some style sheets, and I am having a problem with
> namespaces.
>
> If I have a namespace declared in addition to the XSL namespace,
>
> like
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/xsl/Transform"
> xmlns:FormatUtil="FormatUtil">
>
> the compiler rejects the style sheet with the following message:
>
> The input document is not a stylesheet (the XSL namespace is not declared
> in the root element).
>
> If I remove the xmlns:FormatUtil="FormatUtil" the compiled accepts the style
> sheet (and fails because things reference FormatUtil).
>
> I looked at the code in package org.apache.xalan.xsltc.compiler.Parser and I
> didn't see anything obvious. The error is emitted in getStyleSheet. I also
> couldn't find anything about this in the docs.
>
> Has anyone else seen anything like this?
>
> easy,
> douglas d
Re: XSLTC problem with namespaces
Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 25 Jan 2002, Douglas Conklin wrote:
> I am attempting to compile some style sheets, and I am having a problem with
> namespaces.
>
> If I have a namespace declared in addition to the XSL namespace,
>
> like
>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/xsl/Transform"
> xmlns:FormatUtil="FormatUtil">
>
> the compiler rejects the style sheet with the following message:
>
> The input document is not a stylesheet (the XSL namespace is not declared
> in the root element).
the xslt namespace url is http://www.w3.org/1999/XSL/Transform
- donald