OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Use DTDs!

In general, it is quite feasible to design an XML format which defines the model to be represented by XSD in a very compact and readable way - resembling closely the instance documents described by the XSD - and generate the XSD from such "XSD design" documents. A simple example:

<x:xsdd xmlns:x="http://www.xsdr.org/ns/xsdd" ...>
        <x:stype name="LocaleOrLangType" typeDesc="#[a-z]{2}(-[A-Z]{2})?#"/>

        <RQ_Metadata Language="$LocaleOrLangType" RequestID="xs:string" TransactionID="xs:string"
        <TravelAgencyFilter x:occ="?">
                    <TravelAgencyID x:occ="+">$NonEmptyString32</TravelAgencyID>
                    <TravelAgencyShortName x:occ="+">$NonEmptyString</TravelAgencyShortName>

In fact, as a rule I do not write XSDs any more, but write xsdd (XSD design) documents instead.


"Costello, Roger L." <costello@mitre.org> schrieb am 15:33 Montag, 2.Mai 2016:

The unofficial compact syntax for XSD <http://dret.net/projects/xscs> is even simpler:
element altitude { (xs:string)
    required attribute units {"feet", "meters"}
I like it!
Are there validating engines which validate XML instances against schemas that are specified using this compact syntax?
Are people using this compact syntax in real-world applications?
From: John Cowan [mailto:johnwcowan@gmail.com]
Sent: Monday, May 02, 2016 9:24 AM
To: Costello, Roger L. <costello@mitre.org>
Cc: xml-dev@lists.xml.org
Subject: Re: [xml-dev] Use DTDs!
On Mon, May 2, 2016 at 7:49 AM, Costello, Roger L. <costello@mitre.org> wrote:
<!ELEMENT altitude (#PCDATA)>

<!ATTLIST altitude
             units (feet|meters) #REQUIRED>

The unofficial compact syntax for XSD <http://dret.net/projects/xscs> is even simpler:
element altitude { (xs:string)
    required attribute units {"feet", "meters"}
XSD has plenty of problems, but it shouldn't be blamed for the verboseness of XML as a language notation.
GMail doesn't have rotating .sigs, but you can see mine at http://www.ccil.org/~cowan/signatures

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS