Subject: RE: [xsl] I mean self::* doesn't select attributes :( From: "Evan Lenz" <elenz@xxxxxxxxxxx> Date: Tue, 24 Apr 2001 16:12:47 -0700 |
Okay, so I didn't need that correction; the principal node type holds for *any* name test. Removing unneeded complexity from my previous examples, I now have the following approaches to testing whether the attribute context node's name is a particular namespaced name: @*[local-name()='foo' namespace-uri()='&xyzURI;'] @*[generate-id()=generate-id(../@xyz:foo)] @*[count(.|../@xyz:foo)=count(../@xyz:foo)] (Thanks Ken) The first is definitely the most intuitive, though it's still messy in that it requires you to explicitly include the namespace URI, regardless of whether a corresponding prefix binding is in scope. What I naturally tried was: @*[self::xyz:foo] But that doesn't work, because the self axis will *never* select attributes except with self::node(), being that *element* is the principal node type of the self axis and there is no attribute() node test (not that that would be useful). Evan Lenz XYZFind Corp. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] I mean self::* doesn't se, G. Ken Holman | Thread | Re: [xsl] I mean self::* doesn't se, Jeni Tennison |
RE: [xsl] dynamic form attributes a, Michael Kay | Date | RE: [xsl] dynamic form attributes a, d. cheng |
Month |