SGML

EMPTYNRM Examples

emptynrm/emptynrm-no.sgm

Will be rejected because it hasn't FEATURES MINIMIZE EMPTYNRM YES when using and end-tag on the declared-EMPTY subsub element

emptynrm/emptynrm-yes.sgm

Like above but with FEATURES MINIMIZE EMPTYNRM YES, making the error message go away; note that both SGML declarations use and require WebSGML

emptynrm/emptynrm-no.sgm

<!SGML "ISO 8879:1986 (WWW)"
	CHARSET BASESET "ISO 646:1983//CHARSET International Reference Version (IRV)//ESC 2/5 4/0"
	DESCSET
		0 9 UNUSED
		9 2 9
		11 2 UNUSED
		13 1 13
		14 18 UNUSED
		32 95 32
		127 1 UNUSED
	CAPACITY PUBLIC "ISO 8879:1986//CAPACITY Reference//EN"
	SCOPE DOCUMENT
	SYNTAX PUBLIC "ISO 8879:1986//SYNTAX Reference//EN"
	FEATURES
		MINIMIZE
			DATATAG NO
			OMITTAG YES
			RANK NO
			SHORTTAG
                          STARTTAG EMPTY NO UNCLOSED NO NETENABL NO
                          ENDTAG EMPTY NO UNCLOSED NO
                        ATTRIB DEFAULT YES OMITNAME YES VALUE YES
                        EMPTYNRM NO
                        IMPLYDEF ATTLIST YES DOCTYPE NO ELEMENT NO ENTITY NO NOTATION NO
		LINK
			SIMPLE NO
			IMPLICIT NO
			EXPLICIT NO
		OTHER
			CONCUR NO
			SUBDOC NO
			FORMAL NO
	APPINFO NONE
>
<!DOCTYPE test [
	<!ELEMENT test - - (sub+)>
	<!ELEMENT sub - - (subsub+)>
	<!ELEMENT subsub - - EMPTY>
	<!ATTLIST subsub flag (true|false) #IMPLIED otherflg (true|false) #IMPLIED>
]>
<test><sub><subsub flag="false" otherflg="true"></subsub></sub></test>

emptynrm/emptynrm-yes.sgm

<!SGML "ISO 8879:1986 (WWW)"
	CHARSET BASESET "ISO 646:1983//CHARSET International Reference Version (IRV)//ESC 2/5 4/0"
	DESCSET
		0 9 UNUSED
		9 2 9
		11 2 UNUSED
		13 1 13
		14 18 UNUSED
		32 95 32
		127 1 UNUSED
	CAPACITY PUBLIC "ISO 8879:1986//CAPACITY Reference//EN"
	SCOPE DOCUMENT
	SYNTAX PUBLIC "ISO 8879:1986//SYNTAX Reference//EN"
	FEATURES
		MINIMIZE
			DATATAG NO
			OMITTAG YES
			RANK NO
			SHORTTAG
                          STARTTAG EMPTY NO UNCLOSED NO NETENABL NO
                          ENDTAG EMPTY NO UNCLOSED NO
                        ATTRIB DEFAULT YES OMITNAME YES VALUE YES
                        EMPTYNRM YES
                        IMPLYDEF ATTLIST YES DOCTYPE NO ELEMENT NO ENTITY NO NOTATION NO
		LINK
			SIMPLE NO
			IMPLICIT NO
			EXPLICIT NO
		OTHER
			CONCUR NO
			SUBDOC NO
			FORMAL NO
	APPINFO NONE
>
<!DOCTYPE test [
	<!ELEMENT test - - (sub+)>
	<!ELEMENT sub - - (subsub+)>
	<!ELEMENT subsub - - EMPTY>
	<!ATTLIST subsub flag (true|false) #IMPLIED otherflg (true|false) #IMPLIED>
]>
<test><sub><subsub flag="false" otherflg="true"></subsub></sub></test>