[alicebot-archcomm] Whitespace clarification
Kim Sullivan
alicebot-archcomm@list.alicebot.org
Wed, 17 Sep 2003 00:52:55 +0200
> - If xml:space='preserve' is applied to an element, standard whitespace
> processing rules apply.
> - Leading a trailing whitespace separating elements and character data
> should be stripped.
OK, allthough i still think we need the extra clause for some cases, unless
we can rephrase it into something all-encompassing (I was making and
implementing those rules as I was writing my AIML, they are based upon what
I needed and thought was practical at that time, they're not from the top of
my head)
> - Whitespace separating sibling elements should be normalised to a single
> space.
I'd prefer stripped (see example in previous post where whitespace separates
two sibling <random> elements).
> And, is the <br/> tag still part of the standard? If not, why isn't it? I
> think this should be the only way to add newlines, apart from using
> xml:space='preserve' attribute, or CDATA sections (though not solely for
> this purpose!).
I think <br> has something to do with appearance, for example for speech
systems it's meaningless. It also depends on the platform you're using, for
example, for IM systems, it wouldn't be clear whether a line break also
means sending the message (I'm not suer all systems support breaks in
messages), mobile phones SMS doesn't have a use for it either. There should
be nothing preventing you from implementing or using it though - most
interpreters will just ignore unknown markup (unless they're really picky
validating). The same goes for most of the other HTML based tags.
Kim