[XML-DEV Mailing List Archive Home]
[Reply To This Message]
Re: Micro XSD for Micro XML?
- From: Kurt Cagle <email@example.com>
- To: Michael Kay <firstname.lastname@example.org>
- Date: Fri, 17 Dec 2010 14:38:44 -0500
Let's try that again:
/../ indicates a regular expression
? indicates an optional element
+ indicates 1 or more items
* indicates 0 or more items
^ is a reference to a previously defined element.
& is a complex type
a:b indicates that element a is of type b
Similar notation could handle groups
XML ArchitectLockheed / US National Archives ERA Project
On Fri, Dec 17, 2010 at 2:01 PM, Kurt Cagle <email@example.com>
You can also use a shorthand notation:
<book category="enumeration('children','adult','unknown') [0..1]">
<title> string() </title>
<description> string() [0..1] </description>
<author> string() </author>
<ISBN> numeric(8,15) [1..*] </IBSN>
<price> decimal(4,2) </price>
<book> ref [1..*] </book>
or even use a compact notation:
(Getting close to RNC, admittedly)
Lockheed / US National Archives ERA Project
On Fri, Dec 17, 2010 at 12:23 PM, Michael Kay <firstname.lastname@example.org>
On 17/12/2010 14:33, Pete Cordell wrote:
Vaclav Trojan has a similar schema-by-annotated-example specification in the form of XDefinition:
I recently put together a schema language for newbies that aims to be simple. The idea was that an example of your XML data could be your schema. Chances are that alone wouldn't be rich enough, so you can then add annotations to it to better describe what you want. For that reason I've called it "Annotated XML Example" or AXE.
<book category="optional enumeration('children','adult','unknown')">
<title> required string() </title>
<author> required string() </author>
<IBSN> optional numeric(8,15) </IBSN>
<price> required decimal(4,2) </price>
XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: email@example.com
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
| [Thread Prev]
| [Thread Next]
| [Date Next]
| [Thread Index]
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please