Simon said:
> There is one way only in W3C XML Schema of defining
> an element from which other elements can be derived
> which can have either simpleContent or complexContent -
> that is to declare an element with anyType that acts
> as the head of a substitution group:
> either
>
> <element name="DCField" type="anyType"/>
> or
> <element name="DCField"/>
>
> where in the latter construction the type is implied.
> Then any other element of any type can be declared
> to be in its substitution group, e.g.
>
> <element name="DCDate" type="date" substitutionGroup="DCField"/>
Thanks for this information, Simon. I hadn't got that far, but I was
coming to the conclusion that most of my efforts to work round this were
really dead-ends.
Does it follow from this that we should (can?) create XML Schemas _only_
to describe specific "application profiles"? - following Andy's view
http://www.jiscmail.ac.uk/cgi-bin/wa.exe?A2=ind0203&L=dc-architecture&F=
&S=&P=8462
of constructs like "Simple DC" (and, I imagine, "Qualified DC") as
application profiles, which I think may be helpful here.
They may not be application-specific, but they describe usages of DC
elements in a particular way (which in these cases may be useful to many
applications), where content models/data types can be specified (even if
in some cases they may be looser/broader than others)
Maybe this is just stating the obvious, but it might help stop me
tilting at the windmill of a "generic" XML Schema to describe the
elements in the namespace. ;-)
Pete
|