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

XSL + Namespace Question

Subject: XSL + Namespace Question
From: David Rosenborg <David.Rosenborg@xxxxxxx>
Date: Mon, 24 Aug 1998 13:11:55 +0100
XSL + Namespace Question
Hi!

I've a question about the semantics of namespaces in XSL. The
answer is probably in the WD, but it wasn't obvious to
me after a first look. The WD states that element and
attributes names are compared in their expanded form.
My question is about how they get expanded.

Q: What is the namespace of names used in matches and selections?

More specific: What is the namespace of attribute names?

Imagine the following input data snippet:

<baz>
  <abc:foo xmlns:abc="mailto:x@xxxxx"; bar="Some value"/>
</baz>

Which of the following will select the bar attribute of abc:foo?

Assuming baz is the current element

1. <xsl:value-of
     xmlns:abc="mailto:x@xxxxx";
     expr="abc:foo/attribute(bar)"
   >

2. <xsl:value-of
     xmlns:abc="mailto:x@xxxxx";
     expr="abc:foo/attribute(abc:bar)"
   >

Assuming abc:foo is the current element

3. <xsl:value-of
     expr="attribute(bar)"
   >

4. <xsl:value-of
     xmlns:abc="mailto:x@xxxxx";
     expr="attribute(abc:bar)"
   >


My guess is that the answer is 2 and 4. Alternative 1 would
also be a logic choice, considering how unqualified attributes
normally are in the same namespace as their parent element.

Cheers,

</David>

_____________________________________________________________________
David.Rosenborg@xxxxxxx                        OM Exchange Technology


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


Current Thread

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.