Solved

Justify align codes for RTF (XSL)

Posted on 2007-11-28
3
5,234 Views
Last Modified: 2013-11-18
I'm writing an html to RTF transformer. Typically the align attribute appears in a <p> i.e:

<p align="justify">

Here is the xsl code i have (XSL knowledge isn't strictly necessary to answer this so read on regardless):

<xsl:template name="attribute_align">
  <xsl:choose>
    <xsl:when test="@align = 'center'">\qc </xsl:when>
    <xsl:when test="@align = 'left'">\ql </xsl:when>
    <xsl:when test="@align = 'right'">\qr </xsl:when>
    <xsl:otherwise>\ql </xsl:otherwise>
  </xsl:choose>
</xsl:template>

.. however, my code does not support "justify" align as shown in the above example. So if:

center align RTF= \qc
left align RTF = \ql
right align RTF = \qr
justify align RTF = ???

.. then what is the code for justify align? Or how would i accomplish this?
0
Comment
Question by:paddycobbett
  • 2
3 Comments
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 500 total points
ID: 20368970
\qj
0
 
LVL 1

Author Comment

by:paddycobbett
ID: 20369438
Not quite sure why i couldn't find that! thanks once again :)
0
 
LVL 60

Expert Comment

by:Geert Bormans
ID: 20369576
welcome
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
The viewer will learn how to count occurrences of each item in an array.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now