You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Steffanina, Jeff" <Je...@marriott.com> on 2008/08/16 05:19:12 UTC

Just trying to print two values on the same line not in a table

Friends, 
I am trying to print the value of mrw-message-prefix  followed by
mrw-message on the same line.  This line of text is not in a table.  I
was sure "inline" was the way to go.  BUT, my code prints on two lines.
Any suggestions?


 <fo:block
                  line-height=".11in" white-space-collapse="false"
                  linefeed-treatment="preserve" font-size="9pt"
font-weight="bold">
<fo:inline>
             <xsl:value-of select="./mrw-message-prefix"/>
             <xsl:attribute name="text-align">justify</xsl:attribute> 
            <xsl:value-of select="./mrw-message"/>
</fo:inline>

</fo:block>



Jeff 

RE: Just trying to print two values on the same line not in a table

Posted by "Steffanina, Jeff" <Je...@marriott.com>.
You are exactly correct!  

Thank you very much! 


Jeff

-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be] 
Sent: Saturday, August 16, 2008 2:59 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: Just trying to print two values on the same line not in a
table

On Aug 16, 2008, at 05:19, Steffanina, Jeff wrote:

Hi

> I am trying to print the value of mrw-message-prefix  followed by   
> mrw-message on the same line.  This line of text is not in a  
> table.  I was sure "inline" was the way to go.  BUT, my code prints  
> on two lines.  Any suggestions?
>
>
>  <fo:block
>                   line-height=".11in" white-space-collapse="false"
>                   linefeed-treatment="preserve" font-size="9pt"  
> font-weight="bold">
> <fo:inline>
>              <xsl:value-of select="./mrw-message-prefix"/>
>              <xsl:attribute name="text-align">justify</xsl:attribute>
>             <xsl:value-of select="./mrw-message"/>
> </fo:inline>
>
> </fo:block>
>

This code will, cause the warning message you mentioned in an earlier  
thread: "Cannot add attribute text-align after ..."
You will want to put that xsl:attribute before the first xsl:value-of.

Note also that setting linefeed-treatment to "preserve" on the block  
will retain any linefeed that results from the transform.
If your input would contain:

<mrw-message-prefix>prefix
</mrw-message-prefix>

Then the linefeed following the word prefix will effectively lead to  
a new line in the output.

Either:
a) remove linefeed-treatment (= default treat-as-space),
b) make sure the input does not contain any linefeeds
c) use xsl:value-of select="normalize-space(./mrw-message-prefix)" to  
strip leading/trailing white-space from the source node


HTH!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Just trying to print two values on the same line not in a table

Posted by Andreas Delmelle <an...@telenet.be>.
On Aug 16, 2008, at 05:19, Steffanina, Jeff wrote:

Hi

> I am trying to print the value of mrw-message-prefix  followed by   
> mrw-message on the same line.  This line of text is not in a  
> table.  I was sure "inline" was the way to go.  BUT, my code prints  
> on two lines.  Any suggestions?
>
>
>  <fo:block
>                   line-height=".11in" white-space-collapse="false"
>                   linefeed-treatment="preserve" font-size="9pt"  
> font-weight="bold">
> <fo:inline>
>              <xsl:value-of select="./mrw-message-prefix"/>
>              <xsl:attribute name="text-align">justify</xsl:attribute>
>             <xsl:value-of select="./mrw-message"/>
> </fo:inline>
>
> </fo:block>
>

This code will, cause the warning message you mentioned in an earlier  
thread: "Cannot add attribute text-align after ..."
You will want to put that xsl:attribute before the first xsl:value-of.

Note also that setting linefeed-treatment to "preserve" on the block  
will retain any linefeed that results from the transform.
If your input would contain:

<mrw-message-prefix>prefix
</mrw-message-prefix>

Then the linefeed following the word prefix will effectively lead to  
a new line in the output.

Either:
a) remove linefeed-treatment (= default treat-as-space),
b) make sure the input does not contain any linefeeds
c) use xsl:value-of select="normalize-space(./mrw-message-prefix)" to  
strip leading/trailing white-space from the source node


HTH!

Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org