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

Re: namespaces

Subject: Re: namespaces
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Sat, 23 Jun 2001 12:28:05 +0100
Re:  namespaces
Hi William,

> While in the middle of processing a XSLT tempalte, I have a declared
> namespace URI, but I do not have the shorthand. Is there anyway to
> get the shorthand back and stick it into a variable?

If the current node is an element, then you can get to information
about the namespaces that are in scope for that element using the
namespace:: axis.  The value of a namespace node is the namespace URI,
and its name is the prefix (the shorthand, as you call it).

So, if you're in a template where the current node is an element and
the namespace is in scope on that element, then you can get the prefix
associated with the namespace 'http://www.known.com' with:

  name(namespace::*[. = 'http://www.known.com'])

I hope that's what you were after,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • RE: namespaces, (continued)
    • Jeni Tennison - Sat, 23 Jun 2001 07:32:11 -0400 (EDT) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.