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
specification.

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">
]>
<vide>
<![%debian[ Debian blabla ]]>
<![%caldera[ Caldera blabla ]]>
<![%redhat[ Redhat blabla ]]>
</vide>

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).

Cheers,
-- 
Raphaël Hertzog -+- http://strasbourg.linuxfr.org/~raphael/
Le bouche à oreille du Net : http://www.beetell.com
Naviguez sans se fatiguer à chercher : http://www.deenoo.com
Formation Linux et logiciel libre : http://www.logidee.com

_______________________________________________
xml mailing list
xml gnome org
http://mail.gnome.org/mailman/listinfo/xml

-- 
Weiqi Gao
weiqigao networkusa net





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