[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Help in extracting namespace prefix of targetName

Subject: Re: Help in extracting namespace prefix of targetNamespace [SEC=UNCLASSIFIED]
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 2 Jun 2008 10:05:14 +0100
Re:  Help in extracting namespace prefix of  targetName
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

in-scope-prefixes(.)[namespace-uri-for-prefix(., current()) eq

Andrew Welch
Kernow: http://kernowforsaxon.sf.net/

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.