Re: How to define a "anywhere" node in my XSD
- From: Peter Flynn <peter.nosp@xxxxxxxxxxxxx>
- Date: Sat, 02 Sep 2006 16:36:09 +0100
Stefan Ram wrote:
Peter Flynn <peter.nosp@xxxxxxxxxxxxx> writes: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 rushI 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.
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.
- References:
- Re: How to define a "anywhere" node in my XSD
- From: Peter Flynn
- Re: How to define a "anywhere" node in my XSD
- From: Jean-François Michaud
- Re: How to define a "anywhere" node in my XSD
- From: Peter Flynn
- Re: How to define a "anywhere" node in my XSD
- Prev by Date: Re: command line validator
- Next by Date: Re: html into xml tags
- Previous by thread: Re: How to define a "anywhere" node in my XSD
- Next by thread: Re: How to write tests for my xsl
- Index(es):
Relevant Pages
|