Re: NSXMLParser and dtds
Re: NSXMLParser and dtds
- Subject: Re: NSXMLParser and dtds
- From: Roarke Lynch <email@hidden>
- Date: Sun, 9 Nov 2003 14:47:12 -0500
On Nov 9, 2003, at 10:04 AM, Alastair Houghton wrote:
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).
I am mainly just trying to learn about NSXMLParser. While XHTML is
what the little app that I'm building is centered around, I was trying
to build a very general framework for building a valid XML doc by using
the schema expressed in the DTD. I found a perl script (
http://www.w3.org/2000/04/schema_hack/ ) on the w3 site that transfers
a DTD to an XML Schema. While it works, I am a bit confused as to why
it has to exist in the first place. It mutates the declarations
(<!ENTITY, <!ELEMENT, <!ATTLIST) into logical structures even though
XML 1.0 defines these physical structures within its own spec. One way
or the other I cannot get NSXMLParser to work correctly, it can parse
some forms of declarations, i.e. External Entity Declarations with
PEDecl but not GEDecl as far as I can see, and handles the logical
structures fine. The documentation for it just isn't worth half a crap,
so i'm trudging forward by running the DTD's through the perl script
even though that won't work in the long run.
Roarke Lynch
-------------------------------
email@hidden
_______________________________________________
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.