From: Oleg A. Paraschenko <olpa@us...> - 2007-05-11 17:46:35
I'd like to retranslate a question from the forum:
Can somebody explain what is the difference between sxpath and txpath?
At the first view txpath is standart textual XPath representation, and
sxpath is s-expressions based XPath query (or mixed XPath query). But I
have confused that the following code is valid: (write ((sxpath
"/a/*/../*") doc))(newline) (write ((txpath "/a/*/../*") doc))(newline)
(In DDO the diiference is explained by the samples
(ddo:txpath "table/tr/td/@align") and
(ddo:sxpath '(table (tr 3) td @ align)) from
So, is the difference between sxpath and txpath included in the external
presentation of the XPath query, or in some aspects of implementation and
Another aspect that is not fully explained in SXPAth articles is how XPath
query that contains complicated predicate can be written in s-expression
based presentation? For example, such query:
child::a[contains(string(child::*[last()]), "abc")] .
Unfortunately, I don't have enough experience to answer the question,
and hope someone can answer.
Oleg Parashchenko olpa@ http://uucode.com/http://uucode.com/blog/ Generative Programming, XML, TeX, Scheme
http://tohtml.com/ Online syntax highlighting