Re: Help on XML Schema generation using XSLT

"Cheney, Edward A SSG RES USAR" <[email protected]>
Newsgroups gmane.text.xml.schema.devel
Message-ID <[email protected]>
Densil,

XML Schema recognizes several built-in simple types for defining the format of data.  Here are some of those that may interest you:

* date
* time
* dateTime

* decimal
* integer
* nonNegativeInteger
* positiveInteger

You can do your own research to discover more about the definitions of these built-in simple types, but I recommend buying the book from Priscilla Walmsley.  She has a diagram of those types on page 222 and then fully defines each type in accordance with the specification for the remainder of that chapter.  I strongly recommend you pickup that book, unless somebody else can recommend a different better book.  It is the only reference I have ever used and taught myself to write new languages solely from reading that book, of which my big one resulted in a patent application for a feature unrelated to Schema.  That book is, as a result, the most valuable investment I have made in my career.

Here is an example of simple types where decimals and dates are distinguished:

<xs:element name="parentElement">
    <xs:complexType>
        <xs:sequence>
            <xs:element ref="firstChild_decimal"/>
            </xs:element ref="secondChild_date"/>
        </xs:sequence>
    </xs:complexType>
</xs:element>
<xs:element name="firstChild_decimal">
    <xs:simpleType>
        <xs:restriction base="xs:decimal"/>
    </xs:simpleType>
</xs:element>
<xs:element name="secondChild_date">
    <xs:simpleType>
        <xs:restriction base="xs:date"/>
    </xs:simpleType>
</xs:element>

Austin
http://prettydiff.com/
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.