With the well known Unique Particle Attribution constraint in XSD, I am struggling to create a schema that is both extensible and versionable.
I've read numerous articles suggesting such things as the Sentry approach and the nesting approach for being able to add optional elements above the any tag.
What I'm wondering is this, I have created a complexType without the any extensibility point. Of course, I am able to extend this type now (which is good). I also created a local element with an anonymous internal type that extends the complexType and adds the any tag.
<xs:element name="b">
<xs:complexType >
<xs:complexCont ent>
<xs:extension base="tns:myExt ensibleType">
<xs:sequence>
<xs:any namespace="##ot her" processContents ="lax" minOccurs="0" maxOccurs="unbo unded"/>
</xs:sequence>
</xs:extension>
<xs:complexCont ent>
</xs:complexType>
</xs:element>
Now, this doesn't accomplish being able to version with the same namespace. However, I have seen some approaches that could add that option to this solution.
My question is, this seems to solve the problem. I know it can't possibly do so, or someone else would've surely already thought about it. So, what am I missing?
I've read numerous articles suggesting such things as the Sentry approach and the nesting approach for being able to add optional elements above the any tag.
What I'm wondering is this, I have created a complexType without the any extensibility point. Of course, I am able to extend this type now (which is good). I also created a local element with an anonymous internal type that extends the complexType and adds the any tag.
<xs:element name="b">
<xs:complexType >
<xs:complexCont ent>
<xs:extension base="tns:myExt ensibleType">
<xs:sequence>
<xs:any namespace="##ot her" processContents ="lax" minOccurs="0" maxOccurs="unbo unded"/>
</xs:sequence>
</xs:extension>
<xs:complexCont ent>
</xs:complexType>
</xs:element>
Now, this doesn't accomplish being able to version with the same namespace. However, I have seen some approaches that could add that option to this solution.
My question is, this seems to solve the problem. I know it can't possibly do so, or someone else would've surely already thought about it. So, what am I missing?
Comment