[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] MicroXSD meta-schema updated (2011 draft) Re: [xml-dev]Micro XSD for Micro XML?
- From: Stephen Green <stephengreenubl@gmail.com>
- To: John Cowan <cowan@mercury.ccil.org>
- Date: Mon, 10 Jan 2011 09:19:28 +0000
Excellent. Thanks. I could make that 'all' a 'sequence' (seems to be the
convention, even though 'all', 'choice' and 'sequence' seem equally
bizarre and I reckon XSD should have had an proper alternative plus
a 'group' option that didn't require a global group).
This MicroXSD schema version's still just a draft of course. Interesting
to see just what can be done with W3C XML Schema in the MicroXML
scenario.
I think compact RNG notation could provide some interesting options
for MicroXML.
----
Stephen D Green
On 9 January 2011 22:52, John Cowan <cowan@mercury.ccil.org> wrote:
> Stephen Green scripsit:
>> New draft of a MicroXSD (v2011 draft 0.1) attached
>>
>> Maintaining this at http://www.stephengreenxml.org.uk
>
> I've translated this to RELAX NG compact notation, first by
> using xsconv to generate XSD compact notation (available at
> http://ccil.org/~cowan/xsconv-1.0.1.zip ), and then by hand conversion.
> The tool was slightly confused by the one-element <all> element, and
> Xerces doesn't seem to care for it either.
>
> default namespace = "http://www.w3.org/2001/XMLSchema"
>
> # version "MicroXSD-2011-draft-0-1"
>
> start = element schema {
> attribute version {string}?,
> attribute attributeFormDefault { "unqualified" },
> attribute elementFormDefault { "unqualified" },
> attribute targetNamespace {string},
> element element {
> attribute name { xsd:NCName },
> (element complexType { complexType_type } |
> element simpleType { simpleType_type })
> }
> }
>
> element_type =
> attribute name { xsd:NCName },
> attribute minOccurs { "0" | "1" }?,
> attribute maxOccurs { "1" | "unbounded" }?,
> (element complexType { complexType_type }|
> element simpleType { simpleType_type })
>
> base_type =
> "string" | "decimal" | "integer" |
> "date" | "dateTime" | "boolean" | "base64Binary"
>
> sequence_group =
> element element {element_type} | complexType_subgroup1
>
> choice_group =
> element element { element_type } | complexType_subgroup1
>
> restriction_type =
> attribute base { base_type }
>
> complexType_type =
> attribute mixed { "true" | "false" },
> complexType_subgroup1?, complexType_subgroup2*
>
> simpleType_type =
> element restriction { restriction_type }
>
> pattern_type =
> attribute value { string }
>
> complexType_subgroup1 =
> element sequence {
> sequence_group+
> } |
> element choice {
> choice_group+
> }
>
> complexType_subgroup2 =
> element attribute {
> attribute use { "optional" | "required" }?,
> attribute name { xsd:NCName },
> element simpleType { simpleType_type }
> }
>
> --
> John Cowan http://ccil.org/~cowan cowan@ccil.org
> Lope de Vega: "It wonders me I can speak at all. Some caitiff rogue
> did rudely yerk me on the knob, wherefrom my wits yet wander."
> An Englishman: "Ay, belike a filchman to the nab'll leave you
> crank for a spell." --Harry Turtledove, Ruled Britannia
>
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]