- From: Timothy Lebo <lebot@rpi.edu>
- Date: Wed, 12 Dec 2012 14:24:41 -0500
- To: W3C provenance WG <public-prov-wg@w3.org>
- Message-Id: <246F7A3A-45A5-428A-A00F-AA1FC0EBC282@rpi.edu>
On Dec 12, 2012, at 2:22 PM, Timothy Lebo <lebot@rpi.edu> wrote: > XMLers, > > (Sorry for the flood of naive comments, this is my first in-depth look. Also, I used to be a bit of an XMLer, but never an XSDer...). > > Each concept follows the pattern: > * Definition > * XSD > * the title "Usage in XML" > * (another bit of XSD?) > * an actual example. > > (I've pasted the entity section below that follows this pattern.) > > 1) > Why is the <xs:element> snippet within the "Usage in XML" section? Is it not part of the XML Schema? > > 2) > Does xs:element/@type align with the xs:complexType/@name? > > It seems to me that the order of "Usage in XML" and the xs:element snippet should be swapped. Either way, I would suggest elaborating this meta-discourse to cover the pattern a bit more (to help the XSD-naive just a tad bit more). [[ In the rest of the section, each type is defined, in English initially, followed by its XML schema definition and some example. ]] Thanks! Tim > > Thanks, > Tim > > > > An entity is a physical, digital, conceptual, or other kind of thing with some fixed aspects; entities may be real or imaginary. > Type definition in XML Schema: > > <xs:complexType xmlns:xs="http://www.w3.org/2001/XMLSchema" name="Entity"> > <xs:sequence> > <xs:choice minOccurs="0" maxOccurs="unbounded"> > <xs:element ref="prov:location"/> > <xs:element ref="prov:value"/> > <xs:element ref="prov:label"/> > <xs:element ref="prov:type"/> > <xs:any namespace="##other"/> > </xs:choice> > </xs:sequence> > <xs:attribute ref="prov:id"/> > </xs:complexType> > Usage in XML: > > <xs:element xmlns:xs="http://www.w3.org/2001/XMLSchema" name="entity" type="prov:Entity"/> > <prov:document > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > xmlns:prov="http://www.w3.org/ns/prov#" > xmlns:ex="http://example.com/ns/ex#" > xmlns:tr="http://example.com/ns/tr#"> > > <prov:entity prov:id="tr:WD-prov-dm-20111215"> > <prov:type xsi:type="xsd:QName">document</prov:type> > <ex:version>2</ex:version> > </prov:entity> > > </prov:document> >
Received on Wednesday, 12 December 2012 19:25:02 UTC