Here a bit of code which scatter each letter of a string into a vertical set
of blocks (ie: vertical string):

        <xsl:template name="scatter-string">
          <xsl:param    name="text"/> 
          <xsl:param    name="rotated"/> 
          <xsl:variable name="len"><xsl:value-of
select="string-length($text)"/></xsl:variable> 
          
          <!-- Concat the blocks containing each letters -->
          <xsl:value-of disable-output-escaping="yes" select="$rotated"/>

          
          <xsl:choose>
                  <xsl:when test="$len > 0">
                                <xsl:variable name="vrotated">
                                        <xsl:text
>&lt;fo:block&gt;</xsl:text>
                                        <xsl:value-of
select="substring($text,1,1)"/>
                                        <xsl:text
>&lt;/fo:block&gt;</xsl:text>
                                </xsl:variable>
                                <xsl:call-template name="scatter-string">
                                        <xsl:with-param name="text">
                                                <xsl:value-of
select="substring($text, 2)"/>
                                        </xsl:with-param>
                                        <xsl:with-param name="rotated">
                                                <xsl:value-of
select="$vrotated"/>
                                        </xsl:with-param>
                                </xsl:call-template>
                  </xsl:when>
                  <xsl:otherwise>
                  </xsl:otherwise>
          </xsl:choose>  
        </xsl:template>
        

I hope this could help ;)

Jack

-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Envoyé : lundi 28 mars 2005 15:57
À : fop-users@xmlgraphics.apache.org
Objet : RE: How can I rotate text for a 90o sidebar?


The following code prints top to bottom, but the letters are stacked.  It's
a starting point.

<svg:text x="1" y="1" writing-mode="tb" glyph-orientation-vertical="0"> YOUR
TEXT HERE </svg:text>

-Lou


 

                      "Andreas L.

                      Delmelle"                To:
<fop-users@xmlgraphics.apache.org>

                      <[EMAIL PROTECTED]         cc:

                      ndora.be>                Subject: RE: How can I rotate
text for a 90o sidebar?                                               
 

                      03/27/2005 06:30

                      Please respond

                      to fop-users

 

 




> -----Original Message-----
> From: Tommy Reynolds [mailto:[EMAIL PROTECTED]
>

Hi,

> I'm trying to insert some text into "xsl-region-start" and I'd like it 
> rotated 90-degrees to you'd have to tilt your head sideways to read 
> it.  I think the "reference-orientation"
> property is the right approach but it isn't implemented in FOP.
>
> Is there a work-around?

The only workaround I know of would be to use SVG to draw the rotated
text...


HTH!

Greetz,

Andreas


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







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

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

Reply via email to