[cxml-devel] Bugs when working with document nodes
Sunil Mishra
smishra at sfmishras.com
Mon Aug 21 15:24:57 UTC 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi David,
David Lichteblau wrote:
> Hi,
>
> Quoting Sunil Mishra (smishra at sfmishras.com):
>> 2. create-document does not set the dtd of a document based on the
>> supplied document type definition. This for example inhibits
>> get-element-by-id from working.
>
> I am not convinced that DOMImplementation.createDocumentType() is meant
> to go and start parsing DTDs.
I agree. I had meant that createDocument might do the DTD parsing.
>
> Instead, I have implemented a new function CXML:PARSE-EMPTY-DOCUMENT,
> which will look for DTDs like the other parser functions do, and that
> can be used together with a DOM builder to create a new DOM document.
This sounds good too. I'll try it out.
Sunil
>
> I hope that works for you; please test!
>
>
> Example below.
>
>
> Thanks,
> David
> --------
> CL-USER(52): (cxml:parse-empty-document
> #"http://www.w3.org/1999/xhtml"
> #"html"
> (cxml-dom:make-dom-builder)
> :public-id #"-//W3C//DTD XHTML 1.0 Transitional//EN"
> :system-id
> #u"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd")
> #<UTF8-DOM::DOCUMENT {BD01A19}>
> CL-USER(53): (describe *)
> #<UTF8-DOM::DOCUMENT {BD01A19}>
> is an instance of class #<STANDARD-CLASS UTF8-DOM::DOCUMENT>.
> The following slots have :INSTANCE allocation:
> PARENT NIL
> CHILDREN #(#<UTF8-DOM::ELEMENT html {C1EE099}>)
> OWNER NIL
> READ-ONLY-P NIL
> MAP NIL
> DOC-TYPE #<UTF8-DOM::DOCUMENT-TYPE {BD02001}>
> DTD #S(CXML::DTD
> :ELEMENTS #<HASH-TABLE :TEST EQUALP :COUNT 89 {BD074B9}>
> :GENTITIES #<HASH-TABLE :TEST EQUALP :COUNT 253 {BD076A9}>
> :PENTITIES #<HASH-TABLE :TEST EQUALP :COUNT 68 {BD07899}>
> :NOTATIONS #<HASH-TABLE :TEST EQUALP :COUNT 0 {BD07A89}>)
> ENTITY-RESOLVER #<CLOSURE (LAMBDA (CXML::N CXML::H)) {C1ED945}>
> CL-USER(54): (describe (dom:doctype **))
> #<UTF8-DOM::DOCUMENT-TYPE {BD02001}>
> is an instance of class #<STANDARD-CLASS UTF8-DOM::DOCUMENT-TYPE>.
> The following slots have :INSTANCE allocation:
> PARENT NIL
> CHILDREN #()
> OWNER #<UTF8-DOM::DOCUMENT {BD01A19}>
> READ-ONLY-P NIL
> MAP NIL
> NAME "html"
> PUBLIC-ID "-//W3C//DTD XHTML 1.0 Transitional//EN"
> SYSTEM-ID "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
> ENTITIES #<UTF8-DOM::NAMED-NODE-MAP {BD01FD1}>
> NOTATIONS #<UTF8-DOM::NAMED-NODE-MAP {BD01FA9}>
> %INTERNAL-SUBSET "unbound"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFE6dBJjRnqWMAEf1cRAvsQAKDW4pywdLCi7DcE0cmV+8UqcpYOXQCeIQAJ
Wc2E79hPviL/tLgwLWvknCM=
=WX17
-----END PGP SIGNATURE-----
More information about the cxml-devel
mailing list