[xsd-users] GML schemas, referenced instance not typed

Boris Kolpackov boris at codesynthesis.com
Mon Nov 14 03:21:55 EST 2005


James,

James Clark <jclark at geosci.usyd.edu.au> writes:

> What you might find interesting, is that the restriction errors we ran
> into earlier in the GML schemas are -technically- valid (although
> evidently a very unusual way of constructing things); there is a bug in
> Xerces-C++ http://issues.apache.org/jira/browse/XERCESC-1281 that cannot
> deal with the obfuscated way the restriction is set up; while elements
> like gml:methodName may appear on the surface to violate restriction
> rules, on closer inspection gml:methodName is substitutable for
> gml:name, which makes everything okay.

Indeed it's quite interesting. Thanks for letting me know.


> I hacked around these unions by replacing them with basic things like
> string, integer etc, which seems a perfectly reasonable kludge for our
> purposes.

Yes, that's how we handle unions in xsd. For now. ;-)


> But I've now found a new error that I don't know how to
> handle. Perhaps you can shed some light on this one?
>
> ice: referenced instance 'http://www.opengis.net/gml#metaDataProperty' is
> not typed
> Aborted

That's a bug in xsd. I've fixed it in my workspace.


> I've placed the developer's cut and my hacked version of it up on my
> webspace so you can view it if you feel the need:

That's nice of you. After fixing the bug I tried it on your 3.1.1s-hacked.
There are some anonymous types in gml so I had to use --morph-anonymous
option to auto-name them. After that I go the following diagnostics:

$ xsd cxx-parser --morph-anonymous gml.xsd
temporal.xsd:267:52: error: type 'TimePositionType' inherits from yet undefined type 'TimePositionUnion'
temporal.xsd:285:39: info: 'TimePositionUnion' is defined here
temporal.xsd:267:52: info: inheritance from a yet-undefined type is not supported
temporal.xsd:267:52: info: re-arrange your schema and try again

This error is here because inheritance from undefined type is illegal
in C++. I moved TimePositionUnion to appear before TimePositionType and
after that everything seems to work fine.

I can build you a pre-release of xsd with this bug (and some other
cxx-parser -related bugs) fixed. Just let me know which platform,
package format, and whether it is ok to send by email.


And thanks for reporting bugs!
-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/20051114/65474287/attachment.pgp


More information about the xsd-users mailing list