Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - RE: [xsl] namespace value output at weird location [Thread Next] RE: [xsl] namespace value output at weird locationTo: 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/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
