Re: NSXMLParser and dtds
Re: NSXMLParser and dtds
- Subject: Re: NSXMLParser and dtds
- From: Mike Butler <email@hidden>
- Date: Sun, 9 Nov 2003 14:47:23 +0000
On 8 Nov 2003, at 11:03 am, email@hidden wrote:
>
AFAIK, DTDs are SGML and *not* XML (XML is an application of SGML, but
>
it only supports a small subset of SGML syntax), so you wouldn't be
>
able to parse them with an XML parser. If you need similar
>
functionality, you'll need an XML Schema. On the W3C site, there
>
appear to be some links to programs to translate DTDs into XML Schema
>
form, so you might like to take a look at those.
>
I use Xalan-J with my cocoa-java apps, so I'm afraid that I can't help
with the original NSXMLParser question, but I just wanted to clear up a
couple of points.
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.
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.
That's it.
Hope it's informative,
Mike.
_______________________________________________
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.