OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Caution! XML parsers behave differently with whitespace specified directly in attribute value versus whitespace specified via an ENTITY

> Entities have an important role in expressing what the author wants in a way that is independent of any processing.  I think voices that claim entities are outdated are missing that argument.

I never use entities myself. Several reasons:

(a) they don't survive XSLT transformation (or most other transformation tools), so if you are using them to express an abstraction, you've got a tough challenge retaining them through transformation.

(b) there are many parsers (eg. pretty well any XML parser running in a browser) that don't support them properly or at all, partly because of security worries.

(c) using them as variable parameters to be expanded by the XML parser (e.g. to hold the current date and time) is not at all well supported by processing APIs

(d) given that I nearly always do XML processing using XSLT, it's generally more flexible to use processing instructions instead.

I have seen people use entities to great effect in constructing complex-but-readable regular expressions and I can see the temptation, but personally I will continue to resist it.

Michael Kay

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS