Re: speaking of XSLT...

From: Eugene Eric Kim (eekim@eekim.com)
Date: Wed Jan 31 2001 - 18:02:32 PST


On Wed, 31 Jan 2001, Joe D Willliams wrote:

> > include some URLs in some attributes that contain ampersands.
> I think one reason might be is that the & is used in the the
> sequence like <=> to indicate a mix of characters
> where the > sequence is actually a reference to a
> character in the current character set. i'm sure someone
> knows a better definition than that, Send that unparsed or
> somehow escape it and it might work.

Well, the attribute content is specified as CDATA (not that xt pays
attention to the DTD anyway), so it shouldn't be looking for entity
references in attributes. Out of curiosity, I changed "&" to "&".
This time, xt didn't complain, but it also didn't replace the entity
reference, which is the correct behavior. That leads me to believe that
there's a bug in xt's attribute validation routine.

> There are a couple of things not to do with a uri,
> like spaces are not allowed, although you may use+-.
> http://www.w3.org/TR/html4/intro/intro.html#h-2.1.1

Ampersands are allowed.

> I guess worst case you make it content instead of an attribute.
> also check the rules for w3c.dom.attr
> which i will also do.

Ugh. Would hate to change a schema (and possibly weaken a design) just to
comply with a broken parser. Thanks for your suggestions, though, Joe.

-Eugene

-- 
+=== Eugene Eric Kim ===== eekim@eekim.com ===== http://www.eekim.com/ ===+
|       "Writer's block is a fancy term made up by whiners so they        |
+=====  can have an excuse to drink alcohol."  --Steve Martin  ===========+



This archive was generated by hypermail 2.0.0 : Tue Aug 21 2001 - 17:58:00 PDT