Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] exclude-result-prefixes not removing the xmlns attribute in the root element

From: "Michael Kay" <mike@------------>
To:
Date: 1/3/2006 12:17:00 PM
> 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/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent