Re: // mapping in sxpath native syntax

"Dmitry Lizorkin" <[email protected]> Tue, 14 Dec 2004 17:13:15 +0300
Newsgroups gmane.lisp.scheme.ssax-sxml
Message-ID <[email protected]>
Hello!

> Is it now high time to break backward compatibility and finally change the
> mapping of '// to sxml:descendant-or-self in the sxpath native syntax?

I modified "sxpath.scm" accordingly. The latest version of "sxpath.scm" is
in the SSAX CVS at SourceForge.

With the modified mapping for //, the examples considered earlier now
produce the expected result:

((sxpath '(// name))
   '(root (@ (name "aname") (id "aid"))
     (part
      (name "part name")
      "part content")))
==>
((name "part name"))

((sxpath '(// @ name))
   '(root (@ (name "aname") (id "aid"))
     (part
      (name "part name")
      "part content")))
==>
((name "aname"))

((sxpath '(warning // *text*))
   '(*TOP* (warning
            (p
             "Do " (emph "NOT") " touch the switch."
             "The computer will " (emph "explode!")))))
==>
("Do " "NOT" " touch the switch." "The computer will " "explode!")

The modified test fixture for "sxpathlib.scm"+"sxpath.scm" is available at:
http://modis.ispras.ru/Lizorkin/Download/sxpathlib-tst.scm

Best regards,
Dmitry






-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/