xsl-list
[Top] [All Lists]

Re: [xsl] Retrieving top-level attribute value in XSLT 2.0

2006-09-01 02:27:55
On 9/1/06, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:
> Googling around though, shows "top-level element" refers to
> both  the single root element of an xml document (in error
> messages), and the top-level child elements in xslt.... One
> must be wrong.

No, the word "set" has about 43 meanings, and none of them is wrong. You
just have to be clear about your context. Unfortunately, google isn't.

The context here is an XML document... "top-level" means different
things it seems depening on whether the XML parser or XSLT processor
is talking.  Using it as the term for the single root element is new
to me.

I did try to get rid of the term in XSLT 2.0. It's still used (and defined),
but most of the time has been replaced by "declaration". Top-level element
is a slighly broader category that embraces declarations and user-defined
data elements. XML schema uses the term in much the same way, with "global"
as a near synonym.

I'm sure Saxon used it in error messages (which is probably where I
got it from), but the best I can find now is:

XTSE0010: Element must be used only at top level of stylesheet

...which isn't too far off :-)

Anyway, if its really going that way then I'll adopt the new
terminology.  Thanks for the correction.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>