[xml] Undefined character entities and libxml



I have documents with the XHTML 1.1 doctype:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>

These documents contain character entities like &nbsp;

I would like to be able to parse these documents into a tree without
generating errors like this:
root.xml:26: parser error : Entity 'nbsp' not defined
host/">Parent Directory</a>/</td><td class="m">&nbsp;</td><td class="s">- &nbsp;

I built all of the catalogs needs for XHTML 1.1 and I can run the
documents through "xmllint -valid -nonet -noout doc.xml" without
errors. (Was there some place to get the xhtml 1.1 DTD as an rpm? I
could only find the xhtml 1.0 rpm)

Is it possible to run the docs through libxml in non-validating mode
without having the entities defined and not get error reports? The
undefined entities would just get built as nodes in the output tree.

xmllint with --noent has no effect on the error messages.

--
Jon Smirl
jonsmirl gmail com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]