Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] namespace value output at weird location

From: "Michael Kay" <mike@------------>
To:
Date: 4/1/2005 8:26:00 AM
> I guess what I don't understand, then, is why that
> namespace value didn't show up in the following lines(<li><br><ul>):
> 
> --------------
> TUTOR: Select Colors for House Painting<br 
> xmlns:jtt="http://mil.jcsj2t.jtt30"><ol 
> xmlns:jtt="http://mil.jcsj2t.jtt30">
>    <li>Select one of the following:<br><ul>
> ----------

The <li> element has a namespace node for the jtt namespace - that is, the
jtt namespace is in scope for this element. Same applies to its <br> child.
But there's no need for a namespace declaration, because the namespace
declaration is already present on an ancestor element. 
> 
> So is "exclude-result-prefixes=" boilerplate then when 
> namespaces other than xsl are included in a stylesheet?

If you declare a namespace in the stylesheet because it's used in the source
document, and you don't want the namespace in the result document, then it
always makes sense to mention it in exclude-result-prefixes.

One thing to remember, however, is that the only effect of
exclude-result-prefixes is on literal result elements. If you copy elements
from the source document to the result document using xsl:copy-of, then all
their namespace nodes will be copied too, regardless of e-r-p.

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