Re: ANN: Algorithm for Merging a simpleType Dependency Chain

Mukul Gandhi <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
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. <[email protected]> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.