[
Lists Home |
Date Index |
Thread Index
]
*Bonehead elements* might be good. Other than in
the SGML Handbook, I've never seen these used
in practice. The reason is that even where as
the handbook says, the SGML produces no errors, the
author may not get the right effect because the
rules for doing this right require an intimate
knowledge of the contexts. The SGML Handbook (C.F.
Goldfarb) takes up this subject in Annex C.1.2.1.
Assuming that your SGML Declaration has "OMITTAG YES"
and you aren't playing with short tags.
"A start tag is omissible when the element type is
contextually required and any other elemnt types that
could occur are contextually optional." pg 74
"Even when an element is contextually required, its
start tag cannot be omitted if the element type has
required attributes or a declared content, or if the
instance of the element is empty." pg 75
Section 4.6.1 takes up the OMITTAG feature in more
detail. If you don't have a copy of the handbook,
let me know and I will transcribe the relevant
page or two.
"Although the basic principles of start tag
ommission are reasonably straightforward, the
detailed requirements and definitions are highly
technical. They hinge on the concepts "contextually
optional element" and "contextually required element". p 163
Ugly stuff.
len
-----Original Message-----
From: John Cowan [mailto:jcowan@reutershealth.com]
Sent: Tuesday, September 10, 2002 3:05 PM
To: xml-dev@lists.xml.org
Subject: [xml-dev] SGML queries
1) What is the correct jargon for an element which allows both start-tag and
end-tag omission? I have been calling them "phantom elements", since they
may be ESIS-present but lexically absent.
2) I note that when SP has a choice between inferring a missing end-tag and
inferring a missing start-tag (and phantom element), it infers the end-tag:
<!DOCTYPE root [
<!ELEMENT root - - (foo, foo?)>
<!ELEMENT foo - O (#PCDATA | bar)*>
<!ELEMENT bar O O (foo)>
]>
<root> <foo> case 1 <foo> case 2 </root>
does not generate an ESIS containing "bar", and even adding a "</bar>"
before "</root>" does not help. Is this behavior prescribed by the
Standard?
--
De plichten van een docent zijn divers, John Cowan
die van het gehoor ook. jcowan@reutershealth.com
--Edsger Dijkstra http://www.ccil.org/~cowan
-----------------------------------------------------------------
The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>
The list archives are at http://lists.xml.org/archives/xml-dev/
To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>
|