Prov-XML Identifiers
From Provenance WG Wiki
(Difference between revisions)
(→Discussions on how to represent identifiers (prov:id) in PROV-XML) |
(→Discussions on how to represent identifiers (prov:id) in PROV-XML) |
||
| Line 56: | Line 56: | ||
<xs:attribute name="ref" type="xs:QName"/> | <xs:attribute name="ref" type="xs:QName"/> | ||
</code> | </code> | ||
| + | |||
| + | ==== Contraints ==== | ||
| + | |||
| + | TODO | ||
| + | |||
| + | ==== Advantages ==== | ||
| + | |||
| + | TODO | ||
| + | |||
| + | ==== Disadvantages ==== | ||
| + | |||
| + | TODO | ||
=== anyURI === | === anyURI === | ||
| Line 65: | Line 77: | ||
<xs:attribute name="ref" type="xs:anyURI"/> | <xs:attribute name="ref" type="xs:anyURI"/> | ||
</code> | </code> | ||
| + | |||
| + | ==== Contraints ==== | ||
| + | |||
| + | TODO | ||
| + | |||
| + | ==== Advantages ==== | ||
| + | |||
| + | TODO | ||
| + | |||
| + | ==== Disadvantages ==== | ||
| + | |||
| + | TODO | ||
Revision as of 19:12, 17 January 2013
Discussions on how to represent identifiers (prov:id) in PROV-XML
Contents |
Options regarding the type of the prov:id and prov:ref xml attributes
ID/IDRef
Use type xs:ID for prov:id and xs:IDRef for prov:ref
<xs:attribute name="id" type="xs:ID"/> <xs:attribute name="ref" type="xs:IDRef"/>
Contraints
- Validity constraint: ID
- Values of type ID must match the Name production. A name must not appear more than once in an XML document as a value of this type; i.e., ID values must uniquely identify the elements which bear them.
- Validity constraint: One ID per Element Type
- No element type may have more than one ID attribute specified.
- Validity constraint: ID Attribute Default
- An ID attribute must have a declared default of #IMPLIED or #REQUIRED.
- Validity constraint: IDREF
- Values of type IDREF must match the Name production, and values of type IDREFS must match Names; each Name must match the value of an ID attribute on some element in the XML document; i.e. IDREF values must match the value of some ID attribute.
Advantages
- ID recognized by XML tools as an identifier type
- IDRef recognized by XML tools as a reference to an identified element
- ID uniqueness constraint (document scope only)
- IDRef must match some identified element in the document
Disadvantages
- ID and IDRef cannot contain colons, whitespaces, or start with numbers
- URIs and qualified names are not valid IDs because both contain colons.
- Requiring unique IDs may cause problems with bundles
QName
Use type xs:QName for both prov:id and xs:IDRef
<xs:attribute name="id" type="xs:QName"/> <xs:attribute name="ref" type="xs:QName"/>
Contraints
TODO
Advantages
TODO
Disadvantages
TODO
anyURI
Use type xs:anyURI for both prov:id and xs:IDRef
<xs:attribute name="id" type="xs:anyURI"/> <xs:attribute name="ref" type="xs:anyURI"/>
Contraints
TODO
Advantages
TODO
Disadvantages
TODO
