Re: [xml] Parameter entities ?

On 21 Jun 2001 01:33:29 +0200, Raphael Hertzog wrote:

does libxml fully support parameter entities ? It doesn't looks
like so ... is there any explanation ?

Parameter entities are allowed only in DTDs, according to the XML

The only legal marked sections in XML is <![CDATA[...]]>.  And the
"CDATA" part has to be the literal "CDATA", not parameter entities or
general entities.

By parameter entity I mean things like that :

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE vide SYSTEM "test.dtd" [
<!ENTITY % debian "INCLUDE">
<!ENTITY % caldera "IGNORE">
<!ENTITY % redhat "IGNORE">
<![%debian[ Debian blabla ]]>
<![%caldera[ Caldera blabla ]]>
<![%redhat[ Redhat blabla ]]>

This file when run through xmllint complains about the <![...]]> because
it's not a valid element. :)

Ultimately I'd even need to be able to force by command line (to xsltproc
or xmllint) one of those entities to INCLUDE in order to do a kind of
conditionnal processing... (and by default all those entities would be
set to IGNORE).

Raphaël Hertzog -+-
Le bouche à oreille du Net :
Naviguez sans se fatiguer à chercher :
Formation Linux et logiciel libre :

xml mailing list
xml gnome org

Weiqi Gao
weiqigao networkusa net

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