|
From: Daniel V. <vei...@re...> - 2001-05-18 16:07:40
|
On Fri, May 18, 2001 at 04:57:31PM +0100, L=E1szl=F3 Kov=E1cs wrote: > Dan Mueth wrote: > >=20 > > On Thu, 17 May 2001, L=E1szl=F3 Kov=E1cs wrote: > >=20 > > > 1. The SGML parser is not perfect, there are DocBook tags it doesnt= know > > > about. This is easy to fix though, I already sent a couple of patch= es to > > > Daniel and I will send more. > >=20 > > I don't understand this, but I'm probably just being dumb. What sort= of > > tags does the SGML parser need to know about? Most tags are defined = in > > the DocBook DTD, not in the parser. > That is a question for DV, not for me. In the source file of the SGML > parser there is a big table with the DocBook tags. If the tag is not > there then it is not recognized by the parser. libxml don't read SGML Dtds, this parser is an had-hoc parser. All tags need to be compiled in. Sorry it's gross but developping a full blown SGML parser is not a good use of anybody's time now :-) > > Did you discuss this with DV? I thought the reason he put the SGML p= arser > > into libxml2 was to handle these sort of docs and problems. I doubt = he > > expected all SGML docs to have the encoding specified. > No, he didnt expect them to have the encoding inside them, but the SGML > parser routines take an extra parameter which is the encoding. As far a= s > the SGML parser is concerned the encoding has to be passed in by the > caller. As far as I see the situation the SGML parser is not able to > detect the encoding. I think (seeing Norman's mail) that DocBook SGML > does not have any way to specify the encoding in the file while XML in > general specifies it in the header. This is why it can be detected in > XML, it is not based on the content. Yes that's the problem. We need to know what is the encoding used by the SGML document. I don't k= now how to guess/compute it. Daniel --=20 Daniel Veillard | Red Hat Network http://redhat.com/products/network= / vei...@re... | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ |