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


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); 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.



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