[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: namespace value output at weird location

Subject: RE: namespace value output at weird location
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 1 Apr 2005 09:25:56 +0100
namespace in output
> 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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.