[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [XSLT 1.0] Strip unused namespaces, but retain na
3. Retain a namespace declaration if it declares a namespace prefix that is used in an element QName value, e.g.,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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|