Re: [xml] Which XPATH syntax does xmlstarlet support?

2015-04-29 Thread Liam R. E. Quin
On Thu, 2015-04-23 at 19:04 -0500, Andrew Pennebaker wrote:
 When I try to hand xmlstarlet the same XPATH query syntax I use in 
 Chrome
 and Firefox, xmlstarlet never seems to find any results. Is there a 
 document detailing the idiosyncrasies of xmlstarlet XPATH vs WebKit 
 XPATH,
 so that I know how to convert my browser queries into xmlstarlet-
 compatible
 queries?

The most likely incompatibility is that Web browsers violate the XPath 
spec to ignore namespaces, and libxml follows the spec.

Next most is that Web browsers don't fetch DTDs, but that's less 
likely to be the issue.

Liam

 ___
 xml mailing list, project page  http://xmlsoft.org/
 xml@gnome.org
 https://mail.gnome.org/mailman/listinfo/xml
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] Which XPATH syntax does xmlstarlet support?

2015-04-26 Thread Noam Postavsky
On Thu, Apr 23, 2015 at 8:04 PM, Andrew Pennebaker
andrew.penneba...@gmail.com wrote:
 When I try to hand xmlstarlet the same XPATH query syntax I use in Chrome
 and Firefox, xmlstarlet never seems to find any results.

FYI, xmlstarlet uses libxml and libxslt, but a separate project
(unlike xmllint which comes with libxml), hosted on Sourceforge:
http://sourceforge.net/projects/xmlstar/.

  Is there a document
 detailing the idiosyncrasies of xmlstarlet XPATH vs WebKit XPATH, so that I
 know how to convert my browser queries into xmlstarlet-compatible queries?

I think both xmlstarlet (via libxml) and WebKit purport to implement
http://www.w3.org/TR/xpath/, so there should be no serious deviations.
While xmllint provides an --xpath option which take only an XPath
query, xmlstarlet takes XPath queries as parts of other somewhat more
complicated options, so there are more things to get wrong. The most
common reason for XPaths not matching is the namespace thing, see
http://xmlstar.sourceforge.net/doc/UG/ch05.html
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] Which XPATH syntax does xmlstarlet support?

2015-04-23 Thread Andrew Pennebaker
When I try to hand xmlstarlet the same XPATH query syntax I use in Chrome
and Firefox, xmlstarlet never seems to find any results. Is there a
document detailing the idiosyncrasies of xmlstarlet XPATH vs WebKit XPATH,
so that I know how to convert my browser queries into xmlstarlet-compatible
queries?

-- 
Cheers,

Andrew
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml