W3C home > Mailing lists > Public > public-rif-comments@w3.org > November 2008

Re: RIF BLD: XML Schema for Condition Language and JAXB

From: Chris Welty <cawelty@gmail.com>
Date: Tue, 18 Nov 2008 11:46:22 -0500
Message-ID: <4922F15E.6070108@gmail.com>
To: Wolfgang Laun <wolfgang.laun@gmail.com>
CC: public-rif-comments@w3.org


Thanks for your message and apologies for the delay in responding:

Wolfgang Laun wrote:
  > Assuming that much of the software for processing XML in the RIF
  > sublanguages will be written in Java, it is highly probable that
  > much of this will be done using JAXB, the "Java Architecture for
  > XML Binding". Sun's Java 1.6 comes bundled with an XML Schema
  > compiler. I have investigated the XML schema for the RIF Condition
  > Language.

Thanks much for doing this analysis.

  > The schema as given in the "RIF Basic Working Draft 30 July 2008" compiles
  > into 33 Java classes. Using a different approach, essentially the same
  > XML definition can be expressed in an XML schema which compiles into
  > only about 20 Java classes.

It would be instructive if you could share this with us at some point.

  > The current XML schema does not try to exploit inheritance by XML type
  > extension. (This would be possible for IRIMetaType as a base type.)

We do use some other kind of inheritance, though.

  > Using the xsd:choice construct results in class definitions with several
  > fields where only one is used (example: Formula). Such objects are
  > awkward and, potentially, error prone.

Isn't that an issue with JAXB, and not really something RIF should solve?
After all, xs:choice is a fundamental part of XML Schema.

  > It would be preferable to use explicit complexType and simpleType
  > definitions (rather than inlined types) as this makes it possible to reuse
  > the same type for differently tagged elements.

Our intent was to keep most things explicit. We seem to have ended up with
some inlined types. (Perhaps just within groups?)

  > If it is a concern of  the working group to formulate an XML schema
  > which simplifies its usage for Java programmers then a rework of the
  > schema definition should be considered. I'd be glad to contribute my
  > work towards an alternate version.

An unofficial JAXB-friendly version of the XSDs is always possible, of course.

Received on Tuesday, 18 November 2008 16:47:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 19:49:19 UTC