newbie concat loop question

Here should go questions about transforming XML with XSLT and FOP.
LJG
Posts: 3
Joined: Tue Nov 09, 2010 11:46 pm

newbie concat loop question

Post by LJG »

I have area text that can be contained in one or many records.
I can select and print the text with the code below, however, what I would like to do is concatenate the text into one long string that will wrap in the width provided. Can anyone help me with this?

Also, does anyone have a book or online class they recommend for learning XPath and XSLT?

Current code snippet:
<xsl:template match="AREA/SMRACMT_ROWSET/SMRACMT_SET">
<fo:block font-size="8">
<xsl:for-each select="SMRACMT_TEXT" />
<xsl:value-of select="."/>
</fo:block>
</xsl:template>

Output:
* COMPASS or ACT test scores that place applicant into
MTH 121 or higher, or completion of Intermediate
Algebra (MTH 111) with a minimum grade of 2.0.
Test scores and course work needs to be within the last 5
years.

Desired Output:
* COMPASS or ACT test scores that place applicant into MTH 121 or higher, or completion of Intermediate Algebra (MTH 111) with a minimum grade of 2.0. Test scores and course work needs to be within the last 5
years.

Thanks!
Radu
Posts: 9413
Joined: Fri Jul 09, 2004 5:18 pm

Re: newbie concat loop question

Post by Radu »

Hi,

So what you actually want is to apply an XSLT on an XML file, generate a FO file which you would then use to produce the PDF output.

I don't quite know how your XML content is structured. Line breaks in the input XML document are not that important, they are normalized when processing the XML with an XSLT stylesheet.
So in order for your text to span horizontally you probably have to set some FO attributes (or perform modifications in the FO output part of the XSLT stylesheets).

We usually recommend this site for XSLT and XPath tutorials:
http://zvon.org/?nav_id=tutorials&mime=html

And this tutorial for XSL-FO beginners:
http://www.dpawson.co.uk/xsl/sect3/xsl-fo.html

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
LJG
Posts: 3
Joined: Tue Nov 09, 2010 11:46 pm

Re: newbie concat loop question

Post by LJG »

I'll check those links out. Thank you so much!
Post Reply