3. Retain a namespace declaration if it declares a namespace prefix that is
used in an element QName value, e.g.,
Retain this: xmlns:soap="..."
because the prefix is used in this element's
value:<faultcode>SOAP:client</faultcode>
Well, the prefix isn't used in the value. SOAP and soap are quite
different prefixes.
If prefixes are used only as part of element values that are QNames, you
might be able to do this. If prefixes can also appear, as they do in
XSLT, in contexts like exclude-result-prefixes="a b c d" then you are
out of luck, unless you have knowledge of the semantics of the vocabulary.
You could for example find all the namespace prefixes that are in use in
QNames in content as
//*[contains(., ':) and . castable as xs:QName]/substring-before(., ':')
and then ensure that namespace declarations for this prefix are copied.
Michael Kay
Saxonica
--~------------------------------------------------------------------
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>
--~--