xsl-list
[Top] [All Lists]

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

2006-08-03 03:30:07
Many thanks for your quick help and the explanations!
With your support and the usage of the numeric reference i got it
working now. And i think i will take a deep look at the unicode
website in near future ... ;-)

Thinking of it, i wonder about the following:
Maybe it would be a good idea to have the numeric reference in the
target data too. Is there  a possibility to leave the "& # x e 7 ;"
unchanged and let it appear as "& # x e 7 ;" in the target data too?

Greets,
Georg



2006/8/3, David Carlisle <davidc(_at_)nag(_dot_)co(_dot_)uk>:

> 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 ;

David

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--