Re: About o:XML
This has already to some extent been covered in replies from Brian and
Frank, but I think it's worth noting the difference between XQuery and
languages such as o:XML.
XQuery is not a general-purpose language, it's purpose is quite
specific. It's true that it can be used for many other purposes aside
from that intended, but doing so usually requires a great deal of
inventiveness and bending of the paradigm. Similarly to how for example
XSLT can be used as a general-purpose language, if you really want to.
XQuery, unlike XSLT and o:XML, is not itself encoded in XML. It's a
text and keyword based language, with constructs for generating XML
output. This hybrid approach is interesting, but doesn't bring the
advantages of XML-based languages that Frank and Brian describe.
Instead XQuery has the same limitations as other keyword-based
The way I see it o:XML has two key benefits:
1) XML-based source code that can be computer processed and/or
hand-edited, similarly to XSLT.
2) Object-oriented, XPath-based expression language.
A benefit of 1) is that code can be very easily generated, for example
by code wizards or from high-level descriptions. Writing o:XML programs
that generate other programs is equally simple. Another consequence of
1) is that o:XML code can be processed by analysis tools, or used to
generate documentation and UML models, or integrated with eg Aspect or
Design by Contract paradigms etc. The sky really is the limit, and
writing tools using off-the-shelf XML processing components is easy -
UML roundtripping for o:XML was achieved within 2-3 days of XSL coding.
Finally, the XML format is extensible, which means that rich
documentation, meta-information (eg deployment descriptions), unit
tests, requirements etc can live side by side with the code. XML makes
the structure of the code transparent, which makes it easy to integrate
it within the bigger context of running a software development project.
As for 2), I believe that XPath is to XML what SQL is to relational
db's, or regular expressions to text. o:Path extends XPath with OO
capabilities. Used with a seamless combination of literal and dynamic
XML, possible thanks to 1), it makes generating and processing XML
easier than with any other language. No DOM, SAX or similar API's
necessary, just native XML and o:Path.
And o:XML is a general-purpose, full-featured OO language, which can't
On 18 Apr 2005, at 16:58, Ashwin Jayaprakash wrote:
> Hi guys,
> I have a simple question regarding your project. I've been following
> such "executable XML" libraries for sometime now. But recently, XQuery
> has picked up a lot of momentum. I'd appreciate it if you could
> explain to me how projects such as yours or Jelly etc are different
> from XQuery or where one would use o:XML and not XQuery. I still don't
> know why one would want to write a program in XML and not in simple
> English-like languages like Java/C.
> Ashwin (www.JavaForU.com).