[xml] Entities defined using other entities



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
entities? I am not sure if the internal tree could handle it properly.

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

http://www.ietf.org/internet-drafts/draft-ietf-simple-xml-patch-ops-02.txt

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

Thanks,
Christophe 

-- 
Christophe Barbe - Software Engineer
Objective Systems, Inc.
REAL WORLD ASN.1 AND XML SOLUTIONS
Tel: +1 (484) 875-9841
Fax: +1 (484) 875-9830
Toll-free: (877) 307-6855 (USA only)
http://www.obj-sys.com




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