Altova Mailing List Archives>Archive Index >xsl-list Archive Home >Recent entries >Thread Prev - [xsl] Help in extracting namespace prefix of targetNamespace [SEC=UNCLASSIFIED] >Thread Next - Re: [xsl] Help in extracting namespace prefix of targetNamespace [SEC=UNCLASSIFIED] Re: [xsl] Help in extracting namespace prefix of targetNamespace [SEC=UNCLASSIFIED]To: Date: 6/2/2008 9:06:00 AM 2008/6/2 Michael Kay <mike@xxxxxxxxxxxx>: > With XSLT 1.0 or a 2.0 system that supports the sadly-deprecated namespace > axis, and with the xs:schema element as the context node, you can use > > name(namespace::*[. = current()/@targetNamespace]) > > Without the namespace axis it becomes > > in-scope-prefixes(.)[namespace-uri-for-prefix(.) = > current()/@targetNamespace] That's an interesting point - why is it deprecated? When I run the 2.0 example it complains that namespace-uri-for-prefix() requires two arguments, so I modified it to be: in-scope-prefixes(.)[namespace-uri-for-prefix(., current()) eq current()/@targetNamespace] -- Andrew Welch http://andrewjwelch.com Kernow: http://kernowforsaxon.sf.net/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
