Re: [xml] DTD Mania
- From: Daniel Veillard <veillard redhat com>
- To: David Allen <mda idatar com>
- Cc: xml gnome org
- Subject: Re: [xml] DTD Mania
- Date: Wed, 9 May 2001 18:06:40 -0400
On Wed, May 09, 2001 at 05:40:29PM -0400, David Allen wrote:
Hello,
A few questions about DTDs in documents parsed via
xmlParseDocument()...
- What's the difference between the internal subset and the external
subset? Just doing some simple checks, it seems doc->intSubset is
always non-null and doc->extSubset is always NULL. Then again, I'm
only working with documents that either have <!DOCTYPE foobar SYSTEM
"somedtd.dtd"> and <!DOCTYPE foobar PUBLIC "blah" "baz.dtd">
Definition of internal and extrnal subset are in the XML specification
http://www.w3.org/TR/REC-xml#dt-doctype
read the code in entity.c to see use of both when available.
- Say I'm dealing with "baz.xml" and "foobar.dtd". I encounter the
"blargens" tag, how can I look into the DTD structure to get a list
of tags which are valid children of "blargens"? I'm not looking at
rewriting the validation, but getting a list of what's valid in
certain contexts for creating XML documents from nothing according
to the rules of validity.
This is defined in the valid.c module:
http://xmlsoft.org/html/libxml-valid.html#XMLVALIDGETVALIDELEMENTS
xmlValidGetValidElements ()
Daniel
--
Daniel Veillard | Red Hat Network http://redhat.com/products/network/
veillard redhat com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]