[XOM-interest] entity in attribute value
Luca Passani
passani at eunet.no
Tue Jan 13 18:49:05 EST 2009
Michael Kay wrote:
>
> You can write it as € if you really want to. But why on earth would
> you want to use something that looks just like an entity reference but isn't
> one?
>
because, in this framework (WURFL), an XML file is the core of a simple
DB to store strings. Usually those strings are not entities, but
yesterday I happened to need to store a string which looked identical to
an XML entity.
> Every technology sucks if you misuse it.
what should I have done in 2002 when I started the project? decide that
XML was not good for me because maybe one day this XML file may have to
contain a string which could be confused with an XML entity?
> I've got a brand new digital camera
> and it's no good at hammering nails. Perhaps the problem is with the user,
> not with the technology?
WURFL is a very successful project in its field. Thousands of developers
around the planet have been able to download it and use it out of the
box without much trouble. Anyway, the problem is solved. I now know how
to escape those "things". I always knew that & escapes &, but for
some reason I was assuming that the XML parser would return "€"
as "€" (and not as "€" which is what I want).
Please observe that declaring the entity is not possible, because the
WURFL model is such that a developer can throw any kind of property
inside WURFL without changing anything else, and legitimately expect to
find it at a later stage.
Thank you for your interest in the problem.
Luca
More information about the XOM-interest
mailing list