[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Select name of XSD targetNamespace attribute
Hi Philipp, xmlns:foo is a namespace declaration, not an attribute (and they have very different semantics). You can find the namespaces available on an element by using fn:in-scope-prefixes for the prefix (it will return all prefixes, including 'foo') and fn:namespace-uri-for-prefix() on those prefixes to find the namespace uri (the value of xmlns:prefix) belonging to such prefix. These functions are available in XPath 2.0 and 3.0. I am not sure whether you can get the same information using XPath 1.0 (you didn't specify what language you used, so I assumed 2.0). Cheers, Abel Braaksma Exselt XSLT 3.0 processor http://exselt.net On 28-3-2014 16:44, Philipp Kursawe wrote: > <?xml version="1.0" encoding="UTF-8"?> > <xs:schema targetNamespace="http://www.foo.com/test" > xmlns:foo="http://www.foo.com/text" > xmlns:xs="http://www.w3.org/2001/XMLSchema" version="0.1.1.0"> > </xs:schema> > > I want to find out the name of the attribute that describes the > targetNamespace ("xmlns:foo") or even better "foo" > > Thanks!
|
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
|