Subject:SS5.0-127e: Bug Validating Document with XML Schem Author:Lee Humphries Date:08 Oct 2003 08:03 PM
Hi,
I have defined an XML schema that defines a hierarchy, which includes structures that can refer to themselves.
Roughly in this form:
Root
+Main
+Group
+Segment
Where Group's definition allows it to include other Groups in addition to Segments.
At each of these levels I allow a Constraint element to be stipulated. The Constraint specifies 2 attributes (one of which is mandatory) and some sub elements.
At every level except Group when adding a Constraint I can see the attributes and sub elements in Sense:X, but not with Group. For Group I can only see the element itself.
If I validate a document that contains a Constraint on a Group, I get errors if I've specified any attribute (including the mandatory one) or sub element.
I can provide you with a test case, but as it's commercially sensitive can you tell me who to send it too.
Subject:SS5.0-127e: Bug Validating Document with XML Schem Author:(Deleted User) Date:09 Oct 2003 06:26 AM
Hi Lee,
I tried creating a schema following your instructions, but I cannot reproduce the behavior you are seeing (I am attaching this schema).
Can you edit this schema so that it fails? Or, if you prefer, send me the original files to my e-mail address (amassari@progress.com); I promise I'll destroy after using it ;-)
Subject:SS5.0-127e: Bug Validating Document with XML Schem Author:Lee Humphries Date:09 Oct 2003 06:55 PM
Argh - too many possible root elements - unclean, unclean.
Anyway, here's your sample back a bit closer to what my schema is. Plus a sample instance generated from it. Unfortunately they don't throw up the problem I'm having. So I'll send you the schema and instance doc separately. Hopefully you'll be able to work a test case out of it.
Subject:Re: SS5.0-127e: Bug Validating Document with XML Schem Author:(Deleted User) Date:10 Oct 2003 04:12 AM
Hi Lee,
thanks for sending me the schema.
It turns out that there is an error inside it: the definition for the
complex type SegmentGroupType has a child element named Constraint, of type
xs:string, while the XML document uses it as if it was of type ConstraintType.
You either need to change the type in the schema definition or remove the
attributes from the XML instances.