At 2004-02-03 09:59 +0000, james walker wrote:
>Does anyone know of a shorter way of writing this:
>Basically a subsection may contain
>-one or more subsections and no requirements
>-one or more subsections and many requirements in any order
>-no subsections and one or more requirements
"either a subsection and any combination of subsections and requirements,
or one or more requirements"
(your first criterion is subsumed in the second)
><!ELEMENT subsection ((subsection+) | (subsection+ | requirement*)+ |
>IS this the correct way to write it?
Nope ... that is ambiguous and one of the rules XML kept from SGML for
compatibility reasons is there cannot be any ambiguous content models.
I think the following would do it for you:
<!ELEMENT subsection ( ( subsection, ( subsection | requirement )* ),
I hope this helps.
Public courses: sign up for one or both soon to reserve your seat!
Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO
Washington, DC: 2004-03-15 San Francisco, CA: 2004-03-22
Hong Kong, China: 2004-05-17 Bremen, Germany: 2004-05-24
World-wide on-site corporate, government & user group XML training
G. Ken Holman mailto:[log in to unmask]
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/l/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/l/bc