Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - Re: [xsl] exclude-result-prefixes not removing the xmlns attribute in the root element [Thread Next] RE: [xsl] exclude-result-prefixes not removing the xmlns attribute in the root elementTo: 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
