[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: SGML queries


the sgml handbook
*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@r...]
Sent: Tuesday, September 10, 2002 3:05 PM
To: xml-dev@l...
Subject:  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@r...
      --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>

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.