handy resource on XPath (was Re: [dom4j-dev] XPath query)

2001-07-13 Thread James Strachan
BTW this is a useful page, it lets you experiment with XPath expressions... http://www.zvon.org:9001/saxon/cgi-bin/XLab/XML/extras.html Its part of the excellent Zvon tutorial for XPath and XSLT. http://www.zvon.org/xxl/XPathTutorial/General/examples.html James __

Re: [dom4j-dev] XPath query

2001-07-12 Thread James Strachan
> > However the following expressions > > > > /. > > /self::node() > > > > refer (AFAIK) to the document node, not the first child node (the root > > element). So the following expressions would return a blank string, since > > name() of a document is empty according to the XPath spec. > > > > nam

Re: [dom4j-dev] XPath query

2001-07-12 Thread bob mcwhirter
> However the following expressions > > /. > /self::node() > > refer (AFAIK) to the document node, not the first child node (the root > element). So the following expressions would return a blank string, since > name() of a document is empty according to the XPath spec. > > name(/.) or name(/se

Re: [dom4j-dev] XPath query

2001-07-12 Thread James Strachan
Hi Bob From: "bob mcwhirter" <[EMAIL PROTECTED]> > On Wed, 11 Jul 2001, James Strachan wrote: > > > From: "bob mcwhirter" <[EMAIL PROTECTED]> > > > > Hi, > > > > What is the XPath query for the name of the first child element? > > > > > > Probably something like this: > > > > > > local-name(/.) >

Re: [dom4j-dev] XPath query

2001-07-11 Thread bob mcwhirter
On Wed, 11 Jul 2001, James Strachan wrote: > From: "bob mcwhirter" <[EMAIL PROTECTED]> > > > Hi, > > > What is the XPath query for the name of the first child element? > > > > Probably something like this: > > > > local-name(/.) > > namespace-uri(/.) > > Choose either name() or local-name() depe

Re: [dom4j-dev] XPath query

2001-07-11 Thread James Strachan
From: "bob mcwhirter" <[EMAIL PROTECTED]> > > Hi, > > What is the XPath query for the name of the first child element? > > Probably something like this: > > local-name(/.) > namespace-uri(/.) Choose either name() or local-name() depending on if your document uses namespace prefixes then use eithe

Re: [dom4j-dev] XPath query

2001-07-11 Thread bob mcwhirter
On Wed, 11 Jul 2001, Mike Skells wrote: > > Hi, > What is the XPath query for the name of the first child element? Probably something like this: local-name(/.) namespace-uri(/.) or name(/.) -bob ___ dom4j