[xsd-users] xsd 1.5.0 released

Boris Kolpackov boris at codesynthesis.com
Fri Oct 28 04:21:08 EDT 2005


James,

James Boyden <jboyden at geosci.usyd.edu.au> writes:

> I only just got around to looking at xsd 1.5.0.  When I ran xsd cxx-parser,
> to see how 1.5.0 works with the GML schemas [1], I received multiple errors
> of the form:
>  .../gml/3.1.1/base/coverage.xsd:392:39: error: Recurse: There is not a complete functional mapping between the particles
>
> Can you explain what this error means, and what (if anything) I can do
> to get around it?

That's the same errors that I told you about in this email:

http://codesynthesis.com/pipermail/xsd-users/2005-October/000069.html

I think the right way to get rid of them is to fix the schemas. One
needs to know the semantics of the types involved, but generally there
are two ways to fix this:

 1. Get rid of "new" elements/attribute so the restriction is valid.

 2. Change "restriction" to "extension". This may result in additional
    errors if the type involved is, in turn, used in another restriction.
    The following example illustrates this case:

<complexType name="Base">
  <sequence>
    <element name="a" type="std::string"/>
  </sequence>
</complexType>

<complexType name="Derived">
  <complexContent>
    <restriction base="Base">
      <sequence>
	<element name="b" type="std::string"/> <!-- This is illegal -->
      </sequence>
    </restriction>
  </complexContent>
</complexType>


<complexType name="DependentBase">
  <sequence>
    <element name="x" type="Base"/>
  </sequence>
</complexType>

<complexType name="DependentDerived">
  <sequence>
    <element name="x" type="Derived"/> <!-- Ok, Derived restricts Base -->
  </sequence>
</complexType>

Here, if you change restriction to extension in Derived, Dependent*
hierarchy will blow.


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20051028/29f28e8f/attachment.pgp


More information about the xsd-users mailing list