XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Jerry JanofskySubject: Index Formatting Question with XSLT and XSL-FO
Author: Jerry Janofsky
Date: 09 Oct 2006 09:20 AM

I am trying to format an index. Everything looks fine if the index entry fits on a single line, however, if the entry scrolls to another line I have trouble with the justification. I’ve tried various combinations of blocks and justifications, however, I can’t seem to get it right.

Here is an example of my rendered index. The view is the width of one colum on the index page. The first entry looks fine because it is both right and left justified and does not need to scroll. The second entry has a problem because text-align-last="justify" is forcing the page numbers to spread out. The third entry would be fine if the scrolled line would indent.



G
Gelman, Martin L., MD..............48, 129
Girolamo, Jr., Allessandro A., MD.....37,
1 1 8
Greenwald, Lawrence L., MD,
FACC...............................15, 96


Below is what I think would be acceptable. How do I do this?

G
Gelman, Martin L., MD..............48, 129
Girolamo, Jr., Allessandro A., MD.....37,
118
Greenwald, Lawrence L., MD,
FACC.............................15, 96



Another way to word what I am trying to do is that I just
want the first line of an entry to justify to the left and right and then have any scrolled lines to indent only. I suppose I would also accept the scrolled line to be right side justified such as this:

Girolamo, Jr., Allessandro A., MD.....37,
45,118


Below is the template that generates the first example. It uses XEP extensions, however, I don't think that is relevant to the problem.

<xsl:template match="dir:name">
<fo:block text-align-last="justify">
<xsl:value-of select="concat(dir:lastname, ', ', dir:firstname, ' ', dir:mi, ', ', dir:title)"/>
<fo:leader leader-pattern="dots"/>
<rx:page-index>
<rx:index-item link-back="true">
<xsl:attribute name="ref-key">
<xsl:value-of select="parent::dir:person/@id"/>
</xsl:attribute>
</rx:index-item>
</rx:page-index>
</fo:block>
</xsl:template>

Jerry J

Posttop
Jerry JanofskySubject: Index Formatting Question with XSLT and XSL-FO
Author: Jerry Janofsky
Date: 09 Oct 2006 09:26 AM

I noticed that the formatting of my initial text did not post properly. I have attached a word doc to better display the issue.

Sorry,

Jerry J


DocumentNewMicrosoftWordDocument2.doc
reformatted question

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.