I'd like to disagree; Saxon is correct. No whitespace that appears in
the source should be deleted, unless you have an explicit rule to
delete characters when they are in a <persName> element.
Internet explorer is famous for getting whitespace handling wrong
because it tries to "normalize" space.
XML was very careful to say that all whitespace counts, because it's
easier to ingore inconvenient space (say between table cells) than it
is to figure out where a space has vanished away.
Now, it's possible that your stylesheet explicitly did something that
had the effect of deleting the text, but you'd have to post it for
anyone to be sure.
If you're using any whitespace normalization or ingoring features,
I'd turn them off, and do things explicitly.
Using xml:space="preserve" should not be necessary, as the correct
behavior for a parser is to preserve space _unless_
xml:space="something else" is present, and that parser implements the
_optional_ space normalizing features.
On the other hand, it doesn't break saxon to use xml:space, and
waiting for MS to fix something like this is a chump's game.
At 3:32 PM +0100 12/2/02, Rafal T. Prinke wrote:
>Thanks to everyone who replied on and off list. Here are
>some of my comments and further doubts:
>1) There seems to be some consensus that MS is correct
> and Saxon is not (quite unexpected on this list!).
>2) There were three types of solutions suggested:
>(a) Using the general:
>with either one or a space separated list of elements names
>does not seem to work for MSIE. If it worked, it would
>certainly be the best solution. I am not sure but I guess
>this deals with the leading and trailing spaces *within*
>the element - and is actually the default behaviour.
>(b) Using <xsl:text> </xsl:text> in a variety of ways:
> <xsl:text> </xsl:text>
><xsl:value-of select="concat(persName, ' ', surname)"/>
>requires predictability of element pairs which require
>a space between. While it may be argued that they are
>predictable, such enumeration of all possible pairs
>is not what Tiggers like - with 30 tags there are 900 pairs
>to consider. But I am afraid this is the only way to
>On rethinking my initial question I see that the MSIE
>behaviour is clearly correct: one doesn't want spaces
>everywhere in between elements and indented source
>documents usually have plenty of them. So one wouldn't
>expect a space between <doctitle> and <byline> on
>the <titlePage> even though there may be quite a lot
>of them in the source. So perhaps the third suggested
>solution should be considered:
>(c) Using the xml:space attribute in the source document:
>which actually works in MSIE and is inherited by
>the named element's sub-elements. The problem here is
>that it must be entered into the source which spoils
>the beauty of a TEI document, requires DTD extension, etc.
>The ideal would perhaps be to add this attribute on-the-fly
>- but playing with <xsl:attribute> has not yielded any
>sensible results for me. I guess the attribute added in
>this way it just output and not evaluated again?
>Just to explain, my example was not typical (or even real).
>Actually, I am dealing with narrative and unstructured
>texts, and encountered this problem when one word was
>highlighted <hi> and the next word was an abbreviation <expan>
>within a simple paragraph <p>.
David G. Durand
VP, Software Architecture
12 Bassett St.
Providence RI, 02903-4628 USA
T: +1 401-331-2014 x111
T: +1 401-935-5317 Mobile
E: [log in to unmask]