XSDs using atom:link's followed by <any> tags result in ambiguous errors in XSD validators
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Identity (keystone) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
XSDs using atom:link's followed by <any> tags result in ambiguous errors in XSD validators
Description:
Various Keystone XSD's define atom links followed by <any> attributes which cause XSD tools to report errors ( e.g. Complex Type error X is ambiguous ). This issue exists in a few Keystone XSDs including user.xsd, tenant.xsd & roles.xsd. This may work for the current Python Keystone reference implementation, but other tools and clients wishing to use these XSDs must hand patch these XSDs ( comment out specific atom link lines ) in order to avoid these errors.
Specific Example from user.xsd
.
.
<complexType name="UserList">
<sequence>
<any namespace="##other" processContents
</sequence>
</complexType>
XMLSpy reports error as ...
"The content model of complex type definition 'identity:UserList is ambiguous"
Hack / Work Around :
<complexType name="UserList">
<sequence>
<!-- <element vc:minVersion="1.1" ref="atom:link" minOccurs="0" maxOccurs=
<any namespace="##other" processContents
</sequence>
</complexType>
Changed in keystone: | |
status: | New → Invalid |
This is not a bug. Looks like you are trying to process the XSD 1.1 schema with an XSD 1.0 implementation.
If possible, use an XSD 1.1 implementation. You'll get a more exact contract, as well as support for assertions etc. To learn more about XSD 1.1 see here:
http:// www.xfront. com/xml- schema- 1-1/
We build our schema so that they can be easily translated into XSD 1.0 sachems in case you're stuck with a XSD 1.0 implementation. There in an excellent XSLT that you can use to translate the schema to 1.0 here:
http:// www.blackmesate ch.com/ 2009/04/ vcdoc.html
Documentation is here:
http:// www.blackmesate ch.com/ 2009/04/ vcdoc.html
Make sure you set the vc.Version parameter to 1.0.