paging
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 2
- Joined: Fri Dec 01, 2006 2:06 pm
paging
Hi! 
Im havin xml:
<?xml version="1.0" encoding="iso-8859-1" ?>
<data>
<item id="i1" catalog="s1" subcatalog="u1">561</item>
<item id="i10" catalog="s3" subcatalog="u4">15</item>
<item id="i22" catalog="s2" subcatalog="u2">1234</item> etc
<catalog id="s1">catalog 1</catalog>
<catalog id="s2">catalog 2</catalog>
<catalog id="s3">catalog 3</catalog>
<subcatalog id="u1">Subcatalog 1</subcatalog>
<subcatalogid="u2">Subcatalog 2</subcatalog> etc
</data>
I ve grouped (2-level, using keys) it to recive:
catalog 1
Subcatalog 1
ID Value
id1 value1
...
...
catalog 2
Subcatalog 1
ID Value
id1 value1...
....
etc
I need to output it no more than 30 items/per page with page breaks but (the most interesting) page breakes shoulb be before catalog/subcatalog ONLY not within subcatalog.
Some suggestions?
may be like...
<xsl:choose>
<xsl:when test="position()mod 30!=0">
<xsl:choose>
<xsl:when test="(SOME TEST-??? which??)">
<xsl:apply-templates select="following-sibling::item[1]" mode="Mode">
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:text>(PageBreak)</xsl:text>
<xsl:apply-templates select="following-sibling::item[1]" mode="Mode"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<span style="page-break-before: always"></span>
<xsl:text>(PageBreak)</xsl:text>
<xsl:apply-templates select="following-sibling::item[1]" mode="Mode"/>
</xsl:otherwise>
</xsl:choose>
Thanks a lot

Im havin xml:
<?xml version="1.0" encoding="iso-8859-1" ?>
<data>
<item id="i1" catalog="s1" subcatalog="u1">561</item>
<item id="i10" catalog="s3" subcatalog="u4">15</item>
<item id="i22" catalog="s2" subcatalog="u2">1234</item> etc
<catalog id="s1">catalog 1</catalog>
<catalog id="s2">catalog 2</catalog>
<catalog id="s3">catalog 3</catalog>
<subcatalog id="u1">Subcatalog 1</subcatalog>
<subcatalogid="u2">Subcatalog 2</subcatalog> etc
</data>
I ve grouped (2-level, using keys) it to recive:
catalog 1
Subcatalog 1
ID Value
id1 value1
...
...
catalog 2
Subcatalog 1
ID Value
id1 value1...
....
etc
I need to output it no more than 30 items/per page with page breaks but (the most interesting) page breakes shoulb be before catalog/subcatalog ONLY not within subcatalog.
Some suggestions?

may be like...
<xsl:choose>
<xsl:when test="position()mod 30!=0">
<xsl:choose>
<xsl:when test="(SOME TEST-??? which??)">
<xsl:apply-templates select="following-sibling::item[1]" mode="Mode">
</xsl:apply-templates>
</xsl:when>
<xsl:otherwise>
<xsl:text>(PageBreak)</xsl:text>
<xsl:apply-templates select="following-sibling::item[1]" mode="Mode"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:otherwise>
<span style="page-break-before: always"></span>
<xsl:text>(PageBreak)</xsl:text>
<xsl:apply-templates select="following-sibling::item[1]" mode="Mode"/>
</xsl:otherwise>
</xsl:choose>
Thanks a lot

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