[
Lists Home |
Date Index |
Thread Index
]
one curious thing about entities is that they must be decoded at the end
of the process. a macro process works before parsing, but entities
partly exist (and are certainly commonly used) to insert characters in
documents that would otherwise conflict with the tag syntax - < >
& being very common ( for html targets as well). but these can
only be substitued when you have an atomic entity. ie after the parsing,
not before...
previously languages have coped with this problem by using an escape
character of some kind (\ in c eg) so that the macro substitution can
happen first.
q. why not an escape character in xml? or did i miss something in the
archives?
rick
Amelia A Lewis wrote:
>On Fri, Feb 04, 2005 at 12:57:01PM -0800, Jeff Rafter wrote:
>
>
>>>At present, there's no apparent activity targeted toward providing an
>>>alternate entity-definition mechanism.
>>>
>>>
>>Maybe XInclude? I guess it would depend on the use case...
>>
>>
>
>I guess it would.
>
>XInclude can't define anything like named character entities. Nothing
>defined by XInclude can appear in an attribute.
>
>This becomes significant, for instance, in working groups, where it's
>relatively straightforward to define the URL of the spec as an entity, which
>can then appear in attribute or text nodes.
>
>XSLT for inclusions is ... moderate overkill, let's say. In any event, it
>needs some "reserved characters" concept to operate upon, if what you're
>doing can happen inside attributes as well as text nodes.
>
>Almost all of this has to do with authoring, for folks who actually don't
>mind (or even like, frightening as that may be) pointy brackets and
>ampersands. If you're pipelining it and running it through all sorts of
>cool transformations and in general ignoring the folks who *like* editing
>XML in text editors, then entities very likely do "blow."
>
>Amy!
>
>
begin:vcard
fn:Rick Marshall
n:Marshall;Rick
email;internet:rjm@zenucom.com
tel;cell:+61 411 287 530
x-mozilla-html:TRUE
version:2.1
end:vcard
|