in reply to Re^4: Operator overloading with returning lists?
in thread Operator overloading with returning lists?

I have a sublanguage called "DPath" (inspired by XPath)

Interesting. I wonder why XPath wasn't used? All the examples in the Synopsis are also valid and equivalent XPaths. It's not all that much work either, since XML::XPathEngine can be used to add XPath support to any tree class.

  • Comment on Re^5: Operator overloading with returning lists?

Replies are listed 'Best First'.
Re^6: Operator overloading with returning lists?
by renormalist (Sexton) on Dec 04, 2008 at 20:15 UTC

    Actually if you look on CPAN there is a fork of XML::XPath done by James G. Smith as developer version. I experimented with it and it really worked for initial examples.

    Unfortunately data structures differ from XML documents in various aspects: XML elements can be repeated but not in hashes, hash keys can be as strange as you like in contrast to element names. Arrays starting with index 1 in XPath is confusing to read on data structures. And a lot of code complexity for XML that's useless on data structures: for namespaces, attributes, etc., and missing features the other way around: eg. testing for the blessed types.

    That's why I restarted it, with kind permission of James G. Smith to use his namespace.

    Not that I already have all the features, of course ...