[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Naive Question about NS 1.1


xslt and match parameter


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>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.