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

RE: exclude-result-prefixes not removing the xmlns at

Subject: RE: exclude-result-prefixes not removing the xmlns attribute in the root element
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Tue, 3 Jan 2006 12:16:39 -0000
xslt exclude prefix
> 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/

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.