|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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
|
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
|

Cart








