This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: XSL and Namespace


Hi Johannes,

>>> The spec says <xsl:import> has to be the first element but does it
>>> have to be the first element of all namespaces?
>
> "In addition, the xsl:stylesheet element may contain any element not
> from the XSLT namespace, provided that the expanded-name of the
> element has a non-null namespace URI. (...) Thus, an XSLT processor
> is always free to ignore such top-level elements, and must ignore a
> top-level element without giving an error if it does not recognize
> the namespace URI."
>
> So it is an error to put a <documentation:xyz> element before
> <xsl:import> but the XSLT implementation must ignore the error. But
> must it ignore only the fact that it does not recognize the
> namespace URI or can it ignore the element occurring before
> xsl:import? The later seems quite reasonable to me.

It depends what types of 'error' the Rec. is assuming that the
processor might give when confronted with a non-XSLT top-level
element.  I think that the errors it's referring to is simply the
"this isn't a recognised element" error, not all possible errors that
might arise due to those elements.

I think that the (non-normative) XSLT DTD supports this position:

   <!ENTITY % top-level "
      (xsl:import*, (xsl:include | xsl:strip-space |
                     xsl:preserve-space | xsl:output | xsl:key |
                     xsl:decimal-format | xsl:attribute-set |
                     xsl:variable | xsl:param | xsl:template |
                     xsl:namespace-alias
                     %non-xsl-top-level;)*)
      ">

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]