> > XML Schema has a standard way of annotating elements which I
> think might
> > be better (although more verbose) than adding dc attributes to the xs
> > elements.
>
> I would argue that foreign attributes are as standard as
> xs:annotation/xs:appinfo since they are allowed and documented in the
> W3C XML Schema recommendation :-) ...
I would agree that it is equally allowed. Really the question is which gives
better semantics (in the case of semantics being equivalent then we can use
trivial matters like which is more compact or which is handier with a given
API).
xs:annotation has the semantics that the contents in someway annotate the
parent element. To my mind the implication of this is that xs:annotation
would always be the number one choice for any annotation.
One way of using xs:annotation but without the verbosity of using
xs:annotation on every xs:enumeration element is to use RDF in a single
xs:annotation along with the id attribute on the xs:enumeration:
<x:schema
xmlns:x="http://www.w3.org/2001/XMLSchema"
xmlns:r="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:d="http://purl.org/dc/elements/1.1/"
... >
<x:annotation>
<x:appinfo>
<r:RDF>
<r:Description r:about="#fooFR">
<d:title xml:lang="en">French</d:title>
<d:title xml:lang="fr">Français</d:title>
<d:relation r:rescource="http://whatever/"/>
</r:Description>
<r:Description r:about="#fooEN">
<!-- yadda yadda -->
</r:Description>
</r:RDF>
</x:appinfo>
</x:annotation>
<x:simpleType name="foo" id="foo">
<x:restriction base="x:language">
<x:enumeration value="FR" id="fooFR" />
<x:enumeration value="EN" id="fooEN" />
</x:restriction>
</x:simpleType>
...
</xs:schema>
|