Re: entities in SXML

[email protected] Sat, 12 Mar 2005 00:11:58 -0800 (PST)
Newsgroups gmane.lisp.scheme.ssax-sxml
Message-ID <[email protected]>
Hello!

There seems to be two problems: 
    - of parser's letting the application know of `parsed',
internal entities (which the parser normally silently inlines)
    - SXML notation for such entities

Right? I think we're discussing the latter.

Just for the record, the former problem can be solved, but it does
pose challenges. For example, if
	&gt;
appears within element content, there is no problem in general of
representing it with (*REF* "gt") rather than with text fragment ">".

However, "&gt;" may appear within the attribute value, e.g.,

	<a href="schema://xxxxx/&gt;xxxxx"> xxxx</a>

Now, what do we do? The value of an attribute must be a string, it
can't include non-string SXML fragments. It's not for nothing that XML
grammar specifically prohibits any `structure' within the attribute
value. The attribute value must be a string. So, we can't use (*REF*
here). The XML Recommendation (section 4.4.4) is quite clear that any
appearance of an unparsed or external parsed entity (that is, any
entity that can't be inlined by even a non-validating parser) is a
_fatal_ error. Please also see Section 3.3.3, Attribute value
normalization. The specification compels the parser to produce a
string value (and use a particular normalization algorithm, or an
observational equivalent thereof).


Regarding the notational problem:

> http://sourceforge.net/mailarchive/message.php?msg_id=7743681
>
>   It suggests trying a the existing SXML notation *ENTITY*. But, in my
> opinion, it's just an ugly workaround, not a clean solution.

What exactly is the problem with using *ENTITY* for marking not only
unexpanded (external parsed) entities but the internal general
entities as well? Is it verbosity, or is there a another reason? If
verbosity, then Neil's notation seems to be the most concise and can
serve the purposes here too.

	Cheers,
	Oleg


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click