Re: PROV-XML section pattern

Stephan,

On Dec 12, 2012, at 2:41 PM, Stephan Zednik <zednis@rpi.edu> wrote:

> 
> On Dec 12, 2012, at 12:24 PM, Timothy Lebo <lebot@rpi.edu> wrote:
> 
>> 
>> 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?
>>> 
> 
> The first component references the ComplexType definition in the schema whereas the second component references the definition of the element that is references that type.

Something like this statement would be helpful near:

[[
In the rest of the section, each type is defined, in English initially, followed by its XML schema definition and some example.
]]]

>  The pattern could use more elaboration and I would be happy to change it in the next document if we settle on a different pattern.
> 
>>> 2)
>>> Does xs:element/@type align with the xs:complexType/@name?
> 
> I believe so.
> 
>>> 
>>> It seems to me that the order of "Usage in XML" and the xs:element snippet should be swapped.
> 
> Thanks for the feedback.  The 'usage in XML' was supposed to mean 'this is the element you use to reference the type as defined above'.  Perhaps I should remove this text?

I suggested to swap them, not remove it.
"'this is the element you use to reference the type as defined above" doesn't mean much to me. Perhaps because I don't know enough XSD?

(I recognize that this page isn't a tutorial on XSD, but I would hope that XSDless XMLers would still be considered this document's audience.)

Regards,
Tim



> 
> --Stephan
> 
>> 
>> 
>> 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 20:03:07 UTC