Confusion on XPath Grammar concerning attribute axis
"Kirmse, Daniel" <[email protected]> Thu, 15 Jan 2004 17:27:15 +0100
| Newsgroups | gmane.text.xml.xpath.general |
|---|---|
| Message-ID | <[email protected]> |
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C3DB84.6F55BFC4 Content-Type: text/plain Hi, I wonder what this expression means: (1) /foo/@attr/bar or what this one here means: (2) /foo/@text() ad (1): This expression seems to be perfectly within the range of the grammar, but I cannot understand what it means. Well /foo/@attr takes me to the attribute "attr" of node "foo". But what does /bar do on this context? ad(2): Well this looks like a text() test on the attribute axis of foo. But what is the meaning of that? Thanks for any answers and hints! Cheers, Daniel ------_=_NextPart_001_01C3DB84.6F55BFC4 Content-Type: text/html Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2657.73"> <TITLE>Confusion on XPath Grammar concerning attribute axis</TITLE> </HEAD> <BODY> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">Hi,</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">I wonder what this = expression means:</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">(1)</FONT> <FONT SIZE=3D2 = FACE=3D"Arial">/foo/@attr/bar</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">or what this one here = means:</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">(2)</FONT> <FONT SIZE=3D2 = FACE=3D"Arial">/foo/@text()</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">ad (1):</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">This expression seems to = be perfectly within the range of the grammar, but I cannot understand = what it means.</FONT> <FONT SIZE=3D2 FACE=3D"Arial">Well /foo/@attr = takes me to the attribute</FONT> <FONT SIZE=3D2 = FACE=3D"Arial">"</FONT><FONT SIZE=3D2 FACE=3D"Arial">attr</FONT><FONT = SIZE=3D2 FACE=3D"Arial">"</FONT><FONT SIZE=3D2 FACE=3D"Arial"> of = node</FONT> <FONT SIZE=3D2 FACE=3D"Arial">"</FONT><FONT SIZE=3D2 = FACE=3D"Arial">foo</FONT><FONT SIZE=3D2 FACE=3D"Arial">"</FONT><FONT = SIZE=3D2 FACE=3D"Arial">. But what does /bar do on this = context?</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">ad(2):</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">Well this looks like a = text() test on the</FONT> <FONT SIZE=3D2 = FACE=3D"Arial">attribute</FONT><FONT SIZE=3D2 FACE=3D"Arial"> axis of = foo. But what is the meaning of that?</FONT></P> <BR> <BR> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">Thanks for any answers = and hints!</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">Cheers,</FONT></P> <P ALIGN=3DLEFT><FONT SIZE=3D2 FACE=3D"Arial">Daniel</FONT></P> <P ALIGN=3DLEFT><A NAME=3D"_MailAutoSig"></A></P> <P ALIGN=3DLEFT></P> </BODY> </HTML> ------_=_NextPart_001_01C3DB84.6F55BFC4--