You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Niclas Hedhman <ni...@hedhman.org> on 2003/09/23 06:20:59 UTC
Strange DTD directives...
Hi,
I'm not very good in DTD syntax, but normally gets by just fine, until....
<![INCLUDE[
<!ELEMENT timezone %ematrix-string;>
]]>
<![IGNORE[
<!ATTLIST datetime timezone
(GMT-12|GMT-11|HST|HDT|GMT-10|YST|YDT|GMT-9|PST|PDT|GMT-8|MST|MDT|GMT-7|
CST|CDT|GMT-6|EST|EDT|GMT-5|AST|ADT|GMT-4|GMT-3|GMT-2|GMT-1|GMT|
MET|MET DST|GMTplus1|EET|EET DST|GMTplus2|GMTplus3|GMTplus4|GMTplus5|
GMTplus6|GMTplus7|WST|GMTplus8|JST|GMTplus9|GMTplus10|GMTplus11|NZST|
NZDT|GMTplus12) #REQUIRED>
]]>
Does any know what the INCLUDE and IGNORE means?
Niclas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Strange DTD directives...
Posted by Ian Atkin <ia...@blueyonder.co.uk>.
they are "conditional sections", part of the SGML hangover, related to
"CDATA sections" (which are another use of the "marked section" concept)
they used to be allowed all over the place in SGML, but in XML
conditionals are only allowed within the dtd (possibly only the external
subset)
the contents of the first one is included in the dtd, the contents of
the second is ignored
the only serious use i've seen these put to is the docbook dtd (and it
uses them everywhere) to allow for coarse customisation - however the
syntax is a little different:-
<!ENTITY % ENT_NAME "INCLUDE">
<![ %ENT_NAME; [
BODY_OF_SECTION_HERE
]]>
thus a redefinition of the ENT_NAME parameter entity to "IGNORE" means
the contents of the section will not be part of the validation process
in your case only direct editing of this file would have any effect so i
don't really see the point (commenting the attlist out would be just as
good)
the spec:-
http://www.w3.org/TR/REC-xml#sec-condition-sect
how docbook does it:-
http://www.docbook.org/tdg/en/html/ch05.html
roll on relaxng! :-)
Niclas Hedhman wrote:
>Hi,
>
>I'm not very good in DTD syntax, but normally gets by just fine, until....
>
><![INCLUDE[
> <!ELEMENT timezone %ematrix-string;>
>]]>
><![IGNORE[
> <!ATTLIST datetime timezone
> (GMT-12|GMT-11|HST|HDT|GMT-10|YST|YDT|GMT-9|PST|PDT|GMT-8|MST|MDT|GMT-7|
> CST|CDT|GMT-6|EST|EDT|GMT-5|AST|ADT|GMT-4|GMT-3|GMT-2|GMT-1|GMT|
> MET|MET DST|GMTplus1|EET|EET DST|GMTplus2|GMTplus3|GMTplus4|GMTplus5|
> GMTplus6|GMTplus7|WST|GMTplus8|JST|GMTplus9|GMTplus10|GMTplus11|NZST|
> NZDT|GMTplus12) #REQUIRED>
>]]>
>
>
>Does any know what the INCLUDE and IGNORE means?
>
>Niclas
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org