Re: ANN: Algorithm for Merging a simpleType Dependency Chain

Hi Roger,
     Not commenting on the uses of your algorithm to merge constraints
of a simpleType dependency chain. This may have uses in certain use
cases.

There seems to be one technical gotcha, that I observed in your article.

Somewhere in your article, you say that simpleType is rendered as [1],

<xsd:simpleType name="Color">
     <xsd:restriction base="xsd:string">
         <xsd:enumeration>
             <xsd:value>red</xsd:value>
             <xsd:value>green</xsd:value>
             <xsd:value>blue</xsd:value>
         </xsd:enumeration>
     </xsd:restriction>
</xsd:simpleType>

This [1] doesn't have a valid XML representation of xsd:enumeration
(xsd:enumeration/{xsd:value}* is not a valid grammar of
xsd:enumeration. This needs to be somehow represented as
xsd:enumeration value="..", but the XSD valid form of xsd:enumeration
may be difficult to be used to implement your transformation of
xsd:enumeration).


On Sun, May 1, 2011 at 3:50 AM, Costello, Roger L. <costello@mitre.org> wrote:
> Hi Folks,
>
> An XML Schema simpleType can have a base type. And that base type may have a base type. And so on.  Further, the types may be in different schema files and in different namespaces.
>
> Determining the constraints on a simpleType in this "dependency chain" can be challenging.
>
> I created an algorithm for merging all the constraints in the dependency chain and rendering a single, standalone simpleType:
>
> http://www.xfront.com/XML-Schema-library/papers/Algorithm-for-Merging-a-simpleType-Dependency-Chain.pdf
>
> Comments welcome.
>
> /Roger




-- 
Regards,
Mukul Gandhi

Received on Sunday, 1 May 2011 05:19:24 UTC