non valid output of broadcast handler in Common Lisp Closure XML package -


After the answers given to my last question, I applied a subclass of cxml: sax-proxy handler (broadcast one Special case handler). Unfortunately, the library looks like a bug, but it tries to produce XML with definitions of internal document type, but the doctor is a non-valid XML

That is, with the command of parsers Play: (open with-file) Xml ": if-present: go ahead: direction: output (let's create the make-instance ' Preproc .: Chen-Handler (CXML: Make-Character-Stream Sync Out))) (CxML: Pars # P "Harem.xml" h: valid t)))

Where the file starts with harem.xml (see Principle):

  & Lt ;? Xml version = "1.0" encoding = "UTF-8"? & Gt; DOCTYPE COLHAREM SYSTEM "harem.dtd" & gt; & gt; Coleman versao = "Segundo_dourada_com_relacoes_14Abril2010" & gt; & Lt ; DOC DOCID = "H2-dftre765">  

The command produces the teste.xml file:

  & lt ;? Xml version = "1.0" encoding = "UTF-8" & gt; & gt; DOCTYPE COLHAREM SYSTEM "harem.dtd" & lt ;! ELEMENT EM # PCDATA & gt; & Lt ;! ATTLIST EM ID CDATA # Required & gt; & Lt ;! ATTLIST EM CATEG CDATA # Vested & gt; & Lt ;! ATTLIST EM TIPO CDATA # applicable & gt; & Lt ;! ATTLIST EM COMENT CDATA # Vested & gt; & Lt ;! ATTLIST EM SUBTIPO CDATA # applicable & gt; & Lt ;! ELEMENT ALT (#PCDATA | EM) * & gt; & Lt ;! Element Omitida (# PCDATA | EM | ALT | P) * & gt; & Lt ;! ELEMENT COLHAREM (DOC) * & gt; & Lt ;; ATTLIST Kolharem VARO CDATA # Expected & gt; & Lt ;! ELEMENT p (#PCDATA | EM | OMITIDO | ALT) * & gt; & Lt ;! ATTLIST p xml: Space (default | protected) "default" & gt; & Lt ;! ELEMENT DOC (#PCDATA | P | OMITIDO) * & gt; & Lt ;! ATLLIST DOC DOCID CDATA # REQUIRED & gt; & Gt; & Lt; Colhem versao = "Segundo_dourada_com_relacoes_14Abril2010" & gt; ...  

It is that, the handler writes DTD inside the output, but incorrectly [ and ] . Is this a bug in the library or in my code?

Example and (the previous file against CXML committed, 991fac513dbd 9b86628f99741a66d791552b1f02, checked out of the CXML repository Apply git to the root 0001 - Apply patch ). For me this code looks like a path, not just triggering the SAC event for the DTD subset, so after adding that the required "[" / "]" Added.

Can you verify that it works for you? I'm also not sure if SAX: START-INTERNAL-SUBSET is actually true, but it seems that there is work to do here.


Comments

Popular posts from this blog

HTML/CSS - Automatically set height width from background image? -

php - Mysql Show Process - Sleep Commands and what to do -

c - What is the address of buf (the local variable in the main function)? -