[
Lists Home |
Date Index |
Thread Index
]
In article <200208071539.LAA00666@mail2.reutershealth.com> you write:
>> 42: <!ELEMENT SMARTDOC (HEADER, ((DATA, VIEW*) | (DATA?, VIEW+)),
>> SIGNATURES?)>
>DTDs can't cope with choices of this sort. This declaration has to be
>loosened to:
>
> <!ELEMENT SMARTDOC (HEADER, DATA?, VIEW*, SIGNATURES?)>
You can do a bit better than that. The original declaration allows
(DATA, VIEW*):
DATA, no VIEWs
DATA, some VIEWs
(DATA?, VIEW+)
DATA, some VIEWs
some VIEWS
So use this:
<!ELEMENT SMARTDOC (HEADER, ((DATA, VIEW*) | VIEW+), SIGNATURES?)>
which allows precisely those cases.
There *are* content models that can't be made deterministic without
allowing undesired combinations, but they're very rare. The example
usually quoted (I forget who discovered this) is the chess game:
(WHITE, (BLACK, WHITE)*, BLACK?)
-- Richard
|