Re: [xml] Entities defined using other entities

On Wed, Nov 22, 2006 at 12:55:27PM -0500, christophe barbe wrote:
Hi All,

I am trying to parse a document with entities using libxml2:

<?xml version="1.0" encoding="UTF-8"?>
   <!DOCTYPE schema [
    <!ENTITY ent1 "abc">
    <!ENTITY ent2  "&ent1;def">

It looks like libxml does not handle the fact that one entity is defined
in term of another.

Is it a legal use of entities?


Am I correct in assuming that libxml can not handle this use of

I am not sure if the internal tree could handle it properly.

  I am sure it should be able to handle this properly

The original XML file is a schema included in the following IETF draft:

The entities are used, as macros, to define the regular expression for
xpath expressions.

  No idea what your problem is. If you have a problem reproduceable with
xmllint please provide them as attachment and describe the problem.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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