Subject: Re: XSL + Namespace Question From: James Clark <jjc@xxxxxxxxxx> Date: Tue, 25 Aug 1998 08:29:00 +0700 |
The intention is 1 and 3. I think this is covered by 2.4.3 and 2.6.8, but maybe 2.6.8 needs another sentence saying that attribute names in attribute patterns are expanded the same way as attribute names in documents. David Rosenborg wrote: > > 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 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
XSL + Namespace Question, David Rosenborg | Thread | kudos!, Scott Lawton |
2.6 patterns: let's try variations , Scott Lawton | Date | Re: 2.6 patterns: let's try variati, Paul Prescod |
Month |