At 2004-02-02 16:23 +0000, james walker wrote:
>i am getting an error with my scope tag, the validator says that it doesnt
>conform with the dtd?
><!ELEMENT chapter (section+)>
><!ELEMENT section (objective | scope | subsection+ | migration-path |
>key-date+ | geographic | tools | support | related_material+ | additional)>
><!ELEMENT scope (applicability+ | exempt* | note*)>
><!ELEMENT subsection (req
>does anyone know why?
Your section is defined to only have a single one of the choice ... since
you've already taken that choice for <objective> the <scope> is not allowed.
>Within the element section, all of the other elements must be present but
>they can be in any order.
That is reminiscent of the SGML "&" aggregator that is not available in
XML. The close quick mimic is just to add "+" to the end of the content model.
The long replacement for the SMGL "( a & b & c )" is the very laborious "(
( a , ( b , c ) | ( c , b ) ) | ( b , ( a , c ) | ( c , a ) ) | ( c , ( a ,
b ) | ( b , a ) ) )" which, for your 10 items is going to be too unmanageable.
The alternative is to use "+" to get a first-level validation, and then use
Schematron in a second validation step to check the count of each item to
I hope this helps.
p.s. common practice these days is often to just mandate an order when
order is not important, rather than let the author choose an order ... it
is easier for the author to remember what is or is not done, and you can
easily model the sequence in XML. Of course this would not apply if there
was a semantic *to* the order, but given the labels that I see you've used,
if the order is not important then pick one and don't give the author a
choice of order; why would the author be interested in writing <additional>
in advance of <objective>?
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