Re: NSXMLParser and dtds
Re: NSXMLParser and dtds
- Subject: Re: NSXMLParser and dtds
- From: Alastair Houghton <email@hidden>
- Date: Sun, 9 Nov 2003 15:04:59 +0000
On 9 Nov 2003, at 14:47, Mike Butler wrote:
>
DTD's are indeed an integral part of XML as a quote from the annotated
>
XML specification demonstrates :
>
>
"As a 'mechanism to impose constraints' on logical and physical
>
structures, XML provides a way to define rules, called a "DTD", to
>
ensure consistency for a particular class of documents."
>
>
However, DTD's are always required by SGML but are optional in XML.
>
This is due to the fact XML is more strict about the document
>
structure ( no omitted tags, all tags are surrounded by angle brackets
>
etc. ) and can therefore can still deal with documents without a DTD.
Interesting. I didn't know that they were an optional part of XML; I
was under the impression that DTDs were only there to support parsing
of XML with SGML parsers, and as a means to specify the core XML
syntax. Anyway, you learn something new every day ;-)
(I had noticed that the XHTML specs use DTDs, but I had assumed that
was just a hangover from HTML.)
>
The DTD is a schema, and is, as far as I know, the only schema defined
>
as part of the XML 1.0 recommendation. XML Schema, on the otherhand,
>
is an XML application, or vocabulary. As such it is one of many (
>
SOX, DCD, DDML ) but has the backing of W3C and probably will be the
>
survivor of that group.
Indeed. I knew there were a few others, but I couldn't find any
references to them on the W3C site (I didn't search too hard, though).
Of course, Roarke is only trying to parse XHTML, so probably doesn't
care about parsing the DTD at all (and wouldn't really need to use an
XML Schema, by the same reasoning).
>
Hope it's informative,
Certainly. I'm no expert on SGML/XML, although I take a passing
interest and occasionally have a look at the W3C site to see what's
happening. It's nice to have a more authoritative statement from
someone that knows about this area.
Kind regards,
Alastair.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.