sxpath vs txpath

"Oleg A. Paraschenko" <[email protected]> Fri, 11 May 2007 21:46:27 +0400
Newsgroups gmane.lisp.scheme.ssax-sxml
Organization private person
Message-ID <[email protected]>
Hello,

I'd like to retranslate a question from the forum:

http://sourceforge.net/forum/message.php?msg_id=4307724

--

Hello! 

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[3]/td/@align") and 
(ddo:sxpath '(table (tr 3) td @ align)) from
http://modis.ispras.ru/Lizorkin/ddo.html)  

So, is the difference between sxpath and txpath included in the external
presentation of the XPath query, or in some aspects of implementation and
functionality?  

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.

Thanks!


-- 
Oleg Parashchenko  olpa@ http://uucode.com/
http://uucode.com/blog/  Generative Programming, XML, TeX, Scheme
http://tohtml.com/       Online syntax highlighting

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/