Stefan Ram wrote:
Peter Flynn <pe********@m.silmaril.iewrites:
>>>>>I would like to specify in my XSD that the "Documentation" element can
>be added everywhere in the XML document. A bit like the
>xs:documentation node.
Yes, this is why it's unlikely to happen. Sadly the use of XML for
dealing with real-life text documents was sidelined in the mad rush
to use XML for handling data, for which it is not always suited.
I do not know XSD, but I guess that the above can already be
done today, by explicitly allowing this element for every
element (repeatedly for each element).
Oh yes (see earlier posts). The nice thing about Exceptions was that
they only had to be specified on the earliest ancestor element type,
and were then inherited to all descendants automatically. But they
are a DTD solution, not an XSD solution.
The solution, of course, is to use schema modelling software like
Relax/NG, as you imply.
///Peter
So the only problem of the OP might be that this has to be
repeated, but this can be eliminated by generating the XSD
from a program or using a preprocessor. I mean, who still
writes his XSD manually, today? (seriously; I don't know,
because I have no experience with XSD.)
One even might consider to write a tool that translates an
SGML-DTD to the best XSD-approximation, which would include
this capability.