Re: [xsl] usage of entities (for dummies)

Subject: Re: [xsl] usage of entities (for dummies)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 3 Aug 2006 10:54:41 +0100
> How do i know which entities are declared by default and which not? 
XML has 5 predecared entities (just for characters used in xml syntax)
amp lt gt quot apos
so if it's one of those, it's declared, otherwise it isn't.

> How can i declare an entity of my own?
you write a DTD and use an <!ENTITY declaration. But you don't want to
do this.

Entities are expanded by the parser _before_ XSLT starts, so XSLT sees
the same input whether you use the entity reference, or just use the
character directly, or if you use a numeric character reference (which
doesn't need to be declared).

So if your keyboard or editor allows you just to type a c-cedila
character then you can just do that (if your editor uses iso-8859-1
you'd need to say your xsl file was in that encoding by putting
<?xml version="1.0" encoding="iso-8859-1"?>
at the top, or you can use the numeric reference & # x e 7 ;


Current Thread