Subject:[OT] XSD - is this valid XML or not? Author:(Deleted User) Date:28 Jan 2008 07:06 PM Originally Posted: 28 Jan 2008 07:05 PM
This is not a SS question. It's just about XML/XSD code validity.
I have come across some problems in the the GML Standard (OGC - OpenGis Consortium) which is also incorporated in the ISO 19139 standard, when validating with Microsoft .NET code. I have extracted this small section -
Can someone indicate what a preferred construct for the offending line might be? The Microsoft .NET parser (with the .NET Framework 3.5) errors "ambiguous element choice in the complexType 'GridDomainType'" at this line.
My brute force solution (in order to pass on to some extra problems in validating the full stack of 70+ XSD files, in .NET code) was just to delete line 423.
Thanks for any help.
Stylus Studio 2008 XML Enterprise Suite R1
Subject:[OT] XSD - is this valid XML or not? Author:(Deleted User) Date:31 Jan 2008 06:51 PM Originally Posted: 31 Jan 2008 06:50 PM
Jeni Tennison was kind enough to answer my query on this topic, and here is her view. She refers to her earlier posts (2002) on this forum.
I think it's OK. As the post you refer to makes clear, empty <choice>s
are legal, just never satisfiable. Here, the empty <choice> is within
another <choice> which has an alternative (namely a <gml:Grid> element).
And the whole thing is wrapped in an optional sequence. As far as I can
tell, that means that something with GridDomainType would be legal if it was empty (the sequence is optional) or if it contains a single
There might be a problem if GridDomainType isn't a legal restriction of
gml:DomainSetType, of course, but I don't know if that's the case (the
restriction rules in XML Schema are notoriously hard to follow, even if
I had the original definition).
> What’s your view, in 2008? And what would you change that fragment to,
> to better reflect the intent?