|
From: Steve B. <Ste...@zv...> - 2001-01-23 11:08:48
|
Just checked-in my changes to the TclDOM v2.0 package. One minor bug fix (for creating doc type declaration). Major changes are to the XPath support. Introduced selectNode method to the DOMImplementation and node commands. While there is still a long way to go towards full XPath support, this code lays the groundwork for the architecture. At this point, the child, descendant, descendant-of-self and attribute axes are supported. All node tests, including type tests, are supported. Only simple predicates are supported - no functions. My main aim was to be able to handle constructs such as //*[@id='foo'] (find all elements in the document with an attribute named 'id' with the value 'foo'. The id function is of no use because the parser is non-validating). Similar constructs will also work, such as //sample/example[@bar='foo']. Relative location paths are OK too. Other expressions, such as example[@foo] or foobar[shazbat] may work, but I haven't tested them yet. I've also caved-in and started supporting Attr nodes, since these are needed for XPath. Enjoy, Steve Ball -- Steve Ball | waX Me Lyrical XML Editor | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |