OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] [ANN] XML Enhancements for Java 1.0

[ Lists Home | Date Index | Thread Index ]

Eric,
        I am not familiar with E4X (I should look into it), but I have 
looked at Cw. The main difference between us and Cw is that we have taken 
conformance to the XML Schema, XPath, and XML standards (such as 
Namespaces) as a design priority. This leads to different design choices. 
So here are some differences (in no particular order)

1. There is no distinction between C# classes and XML classes in Cw (for 
the most part). In one sense this is elegant, but it requires compromise 
in both the C# and XML type systems.  So in an early paper on Cw, Erik 
Meijer writes, "After this comparison we will argue that the inherent 
impedance mismatch between the XML and object data-models suggests that we 
should both modify the host object language to enhance XML support and 
compromise full XML fidelity" [
http://research.microsoft.com/~emeijer/Papers/XML2003/xml2003.html#S3.3]. 
In XJ, we made a slighly different design choice -- XML Types  are 
subclasses of a 
special class XMLObject -- all other Java classes behave as per the Java 
spec. Subclasses of XMLObject behave according to the XML Specs -- from 
the Java perspective they are just classes with no fields and a few 
methods inherited from XMLObject. One can execute XPath expressions on 
them, construct them from literal XML, etc. 

2. XJ supports the full set of XPath 1.0  expressions. Cw introduces a new 
syntax for specifying a subset of XPath expressions (e.g c..f == c//w)

3. Types in XJ are XML Schema types (element declarations). Subtyping in 
XJ is based on XML Schema subtyping and substitution groups. Schemas may 
be "imported"  [Schemas behave analogously to packages in Java, and 
element declarations are similar to class declarations]. In Cw, types are 
"regular expression types" and I believe they provide a tool for 
converting XML Schema types into C# classes. Subtyping is structural 
(independent of XML schema).

4. XJ supports use of Namespaces in XML construction and XPath evaluation. 
 I am not sure what Cw's position on this is (I haven't seen a use of 
namespaces in their examples).

5. Cw supports mechanisms for accessing relational data --- we do not.

6. XJ supports in-place updates (not available in the current prototype). 
AFAIK, Cw does not.


All in all, at a suitably abstract level both languages are similar --- 
they let programmers program with XML more easily. The different design 
principles --- unify objects and XML (Cw) and high-fidelity to XML 
standards (XJ) leads to a different feel to each language.

BTW, in the research community there have been several language 
integrations of XML into a programming language, e.g. Xact, Xtatic 
(originated from XDuce), CDuce, XOBE, ....., each with a slight different 
feel to it.

A technical paper on XJ is available from 
http://www.research.ibm.com/xj/pubs. It'll be presented at WWW 2005 next 
month.


Mukund Raghavachari
IBM T.J. Watson Research Center
http://www.research.ibm.com/people/m/mrm
XJ: the XMLification of Java (http://www.research.ibm.com/xj)





Eric van der Vlist <vdv@dyomedea.com> 
04/14/2005 02:30 AM

To
xml-dev@lists.xml.org
cc

Subject
Re: [xml-dev] [ANN] XML Enhancements for Java 1.0






Hi,

On mer, 2005-04-13 at 13:29 -0400, Mukund Raghavachari wrote:

> We have released a prototype compiler and runtime system on Alphaworks (
> http://www.alphaworks.ibm.com/tech/xj). XJ is an evolving language, and 
we 
> are extremely interested in feedback on the utility of its features. We 
> are interested in what people think about "tight" integration of XML 
into 
> Java. Our opinion is that it makes XML processing applications more 
> efficient and robust.

That sounds very cool! 

To me, that's closest to things such as E4X for EcmaScript or C-Omega
for C# than to binding frameworks.

Am I right? Can you elaborate on the differences and similarities with
these other projects (other than, of course that Xj is for Java!)?

Are you aware of other similar projects for Java or other languages?

Thanks,

Eric 
> 
-- 
Weblog:
                 http://eric.van-der-vlist.com/blog?t=category&a=English
------------------------------------------------------------------------
Eric van der Vlist       http://xmlfr.org            http://dyomedea.com
(ISO) RELAX NG   ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------


-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://www.oasis-open.org/mlmanage/index.php>







 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS