Subject: RE: [xsl] exclude-result-prefixes not removing the xmlns attribute in the root element From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Tue, 3 Jan 2006 12:16:39 -0000 |
> This is true, but because the output will be inserted into a html > document (it is only a fraction of the whole html document which > already contains the xmlns:wicket="http://..." definition), than it is > not needed. i thought this is what exclude-result-prefixes is about, > but it does do what I thought it does. If you look at exclude-result-prefixes in the XSLT 1.0 specification, you will see that it is in the section describing literal result elements. Its only effect is on the copying of namespaces from the stylesheet to the result document when a literal result element is processed; it has no effect on the results of copying an element from the source. In 2.0 you can suppress the copying of a namespace node by xsl:copy (or xsl:copy-of) using copy-namespaces="no" - but only if the namespace is unused. You can't use this to create output that is ill-formed. If the output contains an element or attribute whose name is in a namespace, then that namespace will always be bound, however hard you try to prevent it. To put it another way, XSLT works only with namespace-well-formed input and output documents. Michael Kay http://www.saxonica.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] exclude-result-prefixes n, Florent Georges | Thread | [xsl] Error in XPath 2.0 expression, rob Jackson |
Re: [xsl] Error in XPath 2.0 expres, andrew welch | Date | RE: [xsl] Error in XPath 2.0 expres, Michael Kay |
Month |