newbie concat loop question
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 3
- Joined: Tue Nov 09, 2010 11:46 pm
newbie concat loop question
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!
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!
-
- Posts: 9413
- Joined: Fri Jul 09, 2004 5:18 pm
Re: newbie concat loop question
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
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
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service