OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] Naive Question about NS 1.1

[ Lists Home | Date Index | Thread Index ]

Richard Tobin wrote:
> >At issue is the point at which this interpretation happens. I read the
> >XSLT spec to say that it may happen as soon as the StartElement callback
> >(or its equivalent) is made.
> I think you must be thinking about something much more complicated
> than me.  All I mean is that in a case like this:
>   <xsl:stylesheet version="1.0"
>                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>                   xmlns:i="http://example.org";>
>     <xsl:template match="i:head">
>       <xsl:apply-templates select="i:title">
>       ...
> the binding of i to http://example.org has to be available to the XSLT
> processor when it processes the values of the match attribute on the
> template element and the select attribute on the apply-templates
> element.

I had read the spec to require that the value of the match parameter a
pattern constant. That is, the value which would be passed through the
StartElement interface would be the literal string expression for the
pattern which the XSLT processor would eventually apply. Which string
could be parsed by the XLST processor (or perhaps the functions to which
it delegates its model construction) at the point where the StartElement
callback occurs.

Where such values are specified to be constants, is there a reason not
to parse them immediately rather than to wait until the template element
is processed. Parsing them at the point of the callback would eliminate
the need for in-scope namespaces. Where such values are not constants -
as in attribute value templates, the only (obvious) way to predict the
result for all documents is to restrict the value domain to eliminate
prefixes. For example, by restricting the domain from QNames to NCNames
and computing the namespace name explicitly.

> -- Richard
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> The list archives are at http://lists.xml.org/archives/xml-dev/
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS