wiki:ebXMLSpecificationXSDDiscrepancies

Version 15 (modified by heikki, 16 years ago) ( diff )

--

ebXML XSD and the ebXML specification

This page describes discrepancies between the ebXML schema (copied here) and the ebXML specification. Also other details of interest regarding the schema are listed here.


Namespace for attribute "lang" in LocalizedString

The whole schema has targetNamespace "urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0", except for one attribute of the LocalizedString type. The attribute "lang" is in the XML namespace, "http://www.w3.org/XML/1998/namespace".

This different namespace for "lang" is reflected in the JiBX binding.


No Slots for PostalAddress

The type PostalAddress has an attribute Slots according to the specification, but this is left out in the XSD. Likewise it's not there in the Java implementation.


Attribute <any> in QueryExpression

The type QueryExpression has an attribute <any>, which according to the specification

is extensible and therefor MAY be of any type depending upon the queryLanguage specified. For SQL queryLanguage it MUST be an SQL query string. For Filter query it MUST be a FilterQueryType defined by [RR-QUERY-XSD].

In the XSD it is defined as follows:

   <sequence>
     <!--
     MAY be any query language syntax supported. 
     MUST support FilterQuery. SHOULD support SQLQuery
     -->
     <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="1" />
   </sequence>

Now this is interesting from the point of view of the XML Binding. At first, I implemented the any attribute in Java as type "java.lang.Object" but it turns out this is not too easy with JiXB, because it doesn't know how to marshall/unmarshall that type. I could write custom methods for that purpose but then again, neither do I know what might be the actual type at runtime, so any attempt at customs methods would be a guess.

I have defined it for the time being as follows: the any attribute in Java is of type "java.lang.String" and in the JiBX binding, I defined it as a CDATA value. Meanwhile, if anybody can point me to [RR-QUERY-XSD] which is not dereferenced in the specification, I'll try something better ..


Note: See TracWiki for help on using the wiki.