|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Deterministic content models???
In article <200208071539.LAA00666@m...> 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








