xsl-list
[Top] [All Lists]

RE: exclude-result-prefixes not removing the xmlns attribute in the root element

2006-01-03 05:16:39
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/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--