ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
Re: Perl + XML
by Georg Rehm other posts by this author
Sep 20 2005 5:19AM messages near this date
view in the new Beta List Site
RE: Perl + XML | Re: Perl + XML
& XSLT >  > Write a simple DTD that allows you to omit
>  > specific start and/or end tags within the file.
  
>  How would you do that? Isn't a dtd suposed to describe
>  the document structure of a well formed xml file?
 
Yes, but the notion of a Document Type Definition originally comes from the 
Standard Generalized Markup Language (SGML), also known as ISO 8879 (1986). 
XML is a subset of SGML [1]. 

Basically, one of the main differences between SGML DTDs and XML DTDs
is a feature called tag minimisation. This feature is not available in
XML and was introduced in SGML to keep file sizes small'ish. 

In XML, an element declaration looks like

	<!ELEMENT a        (b, c)> 

In SGML however, you have to specify whether tag minimisation may be used: 

	<!ELEMENT a    - - (b, c)> 

The two hyphens specify that both the start and the end tag must be present.
Alternatively, you can use "O" (that's not "0", but "O" as in "_o_missible")
to specify that only the start tag, only the end tag or both may be left
out. Tag minimisation is the reason why browsers do not insist that HTML 
elements such as <br> , <img> and <meta> have a corresponding end tag.

Kind regards,
	Georg


[1] To be precise, XML is a subset of ISO 8879 TC 2: "ISO/IEC JTC1/SC34
    N0029 -- Document Description and Processing Languages -- Technical
    Corrigendum 2 to ISO 8879:1986 (Annex K: WebSGML Adaptations; Annex L: 
    Declaration for XML)"

-- 
georg.rehm <at>  gmail.com                                    http://georg-re.hm
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Thread:
Shouvanik Haldar
Geir Aalberg
Grant McLean
Mark - BLS CTR Thomas
Georg Rehm
Attila Fülöp
Attila Fülöp
Georg Rehm

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved