Re: [xslt] Potentially avoidable call of xsltParseStylesheetExcludePrefix()



On Fri, Mar 24, 2006 at 03:03:41PM +0100, Kasimier Buchcik wrote:
> Hi,
> 
> On Fri, 2006-03-24 at 08:47 -0500, Daniel Veillard wrote:
> > On Fri, Mar 24, 2006 at 01:27:20PM +0100, Kasimier Buchcik wrote:
> > > Hi,
> > > 
> > > In xslt.c, xsltPrecomputeStylesheet(), a call to
> > > xsltParseStylesheetExcludePrefix() is performed for every
> > > element-node of the stylesheet-doc. Since the attribute
> > > "exclude-result-prefixes" is only allowed on xsl:stylesheet and
> > > xsl:transform, I wonder if the call is necessary.
> > 
> >   Yes, see section 7.1.1:
> > 
> > "A namespace URI is designated as an excluded namespace by using an
> >  exclude-result-prefixes attribute on an xsl:stylesheet element or an
> >  xsl:exclude-result-prefixes attribute on a literal result element."
> > 
> >  all literal result element on a a stylesheet may also host this attribute...
> 
> Ah, I obviously did not explain the issue well enough here:
> The code...
> 
> exclPrefixes = xsltParseStylesheetExcludePrefix(style, cur);
> 
> ...is currently processed also for every element in the XSLT namespace
> (not only for literal result elements), so for...
> 
> <xsl:template match="/" exclude-result-prefixes="p">
> 
> ...this should not be performed, but it is currently; actually
> this attribute should be reported as invalid for xslt-elements
> other than xsl:stylesheet and xsl:transform.

  Hum, right. Please fix or bugzilla :-)

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]