> > What I'm looking for is a FO element that I can put between the
> > <fo:character> above and the <fo:inline>.  I thought that
> >
> > <fo:character character=" "/>
> >
> > would work, but it does not.
> In what sense it doesn't work? Also, if you can ensure an element
> follows the copyright character, you should be able to (unconditionally)
> put a space there too. Usually consecutive spaces are collapsed into
> one, therefore it shouldn't matter whether you get additional spaces
> form various sources at this point.
> If all fails, try a non-breaking space, &#xA0;

        It doesn't work in the sense that the result of using the
<fo:character character=" ">
is visually indistinguishable from leaving it out.

        Start with this XML:

----------- cut here --------------
<?xml version="1.0" encoding="utf-8"?>
        <copy>2003 Patrick Dean Rusk</copy>
----------- cut here --------------

        Process it with this XSL:

----------- cut here --------------
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";

        <xsl:template match="root">
                <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
                                <fo:simple-page-master master-name="pg">
                        <fo:page-sequence master-reference="pg">
                                <fo:flow flow-name="xsl-region-body">
                                        <xsl:apply-templates select="copy"/>

        <xsl:template match="copy">
                <fo:block font-family="serif" font-size="8pt">
                        <fo:character character="C"/>
                        <xsl:value-of select="."/>
                <!-- Extra spaces after the <fo:character> tag -->
                <fo:block font-family="serif" font-size="8pt">
                        <fo:character character="C"/>
                        <xsl:value-of select="."/>
                <fo:block font-family="serif" font-size="8pt">
                        <fo:character character="C"/>
                        <fo:character character=" "/>
                        <xsl:value-of select="."/>
                </fo:block>     </xsl:template>

----------- cut here --------------

        Note the three blocks above.  If I had to look at that and guess for 
whether there would be a space after the "C", I would say the following:

1) Don't know.  Depends upon whether the new line is collapsed into a space.

2) I would give a higher probability of there being a space after the "C",
because of the explicit extra spaces put in.

3) I would definitely expect at least one space between the "C" and the text
of the "copy" node, forced by the <fo:character character=" "/>

        When I generate the .fo file directly with xalan, I get a two line file.
The first line is the <?xml> directive.  The second lines contains all of
the other elements, with *no* spaces between any of them.  Understanding
that none of the line breaks (beyond the first line) exist in the actual
file, here are the results:

----------- cut here --------------
<?xml version="1.0" encoding="UTF-8"?>
-set><fo:page-sequence master-reference="pg"><fo:flow
flow-name="xsl-region-body"><fo:block font-size="8pt"
font-family="serif"><fo:character character="C"/>2003 Patrick Dean
Rusk</fo:block><fo:block font-size="8pt" font-family="serif"><fo:character
character="C"/>2003 Patrick Dean Rusk</fo:block><fo:block font-size="8pt"
font-family="serif"><fo:character character="C"/><fo:character character="
"/>2003 Patrick Dean Rusk</fo:block></fo:flow></fo:page-sequence></fo:root>
----------- cut here --------------

        Looking at this file, then, I would assume that the first two blocks 
not have a space after the "C", but I would still think the third block
would have the space.  However, all three do not have any space.

        In the last few minutes, I have figured out what I can do.  Rather than 
the <fo:character character="C"> tag, I can do

        <fo:inline>C </fo:inline>

or, in the case of my real use of the copyright symbol,

        <fo:inline>&#x00A9; </fo:inline>

        So, I have a workaround, but it sure seems to me like
<fo:character character=" "/>
is effectively being ignored.  I would guess that the spec does not intend

        If I had to take a stab at guessing why this happens, I would suspect 

<fo:character character="x"/> could essentially be translated to

Done for space, then, the result would be:
<fo:inline> </fo:inline>

I've noticed that XSLT treats that as semantically the same as:
which generates nothing in rendered output.

        However, since the XSLT part of things is already done at this point, 
would suggest that the issue is in FOP's area tree handling or some other
such downstream process, so I'm not sure my speculation holds much water.

        So, Joerg, I'll leave it to your better judgement to decide whether 
this is
a bug in the handling of <fo:character character=" ">.


To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to