> Can somebody explain what is the difference between sxpath and txpath?
Dmitry Lizorkin would be the one to ask, but I can try too...
> 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")] .
That seems similar to "para[@type='warning']" whose translation and
test is explained in the old SXPath, SSAX/lib/SXPath-old.scm. One
notable difference is that latter uses the standard SXPath predicate
equal?, whereas the original example calls for 'contains'. However,
SXPath may contain a Scheme procedure as one of the SXPath
components. That procedure receives the nodeset and can examine it in
any way, including substring search of the last node. I guess that
> So, is the difference between sxpath and txpath included in the external
> presentation of the XPath query, or in some aspects of implementation and
In SXPath, the set of predicates (query components) is open because
one may always use a Scheme procedure, a lambda form, if the standard
predicates are unsufficient or inconvenient.