Re: [xslt] xhtml input encoding problem
- From: Daniel Veillard <veillard redhat com>
- To: xslt gnome org
- Subject: Re: [xslt] xhtml input encoding problem
- Date: Mon, 10 Sep 2001 13:26:10 -0400
On Mon, Sep 10, 2001 at 09:16:45PM +0200, Bernhard Zwischenbrugger wrote:
> > If tidy generates  in an XHTML output it's an error.
> > Libxml removes them it seems which sounds a better if not perfect
> > handling of the problem.
> I already switched to "xsltproc --html ...", tidy is out of the game.
> It seams libxml2.4 does not remove  is this solved in a newer
> release?
It does when building the HTML document tree:
---------------------
orchis:~/XML -> ./xmllint --debug --html tst.html
tst.html:3: error: htmlParseCharRef: invalid xmlChar value 25
bla  bla
^
HTML DOCUMENT
URL=tst.html
standalone=true
DTD(HTML), PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN, SYSTEM http://www.w3.org/TR/REC-html40/loose.dtd
ELEMENT html
TEXT
content=
ELEMENT body
ELEMENT p
TEXT
content= bla bla
orchis:~/XML ->
---------------------
the character is actually discarded by the character reference parsing
routine:
---------------------
/*
* Check the value IS_CHAR ...
*/
if (IS_CHAR(val)) {
return(val);
} else {
if ((ctxt->sax != NULL) && (ctxt->sax->error != NULL))
ctxt->sax->error(ctxt->userData, "htmlParseCharRef: invalid xmlChar value %d\n",
val);
ctxt->wellFormed = 0;
}
return(0);
---------------------
It will complain but not generate any character for it.
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]