check position of 'generate-id()'s
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 5
- Joined: Wed Jan 05, 2005 1:07 pm
check position of 'generate-id()'s
hello,
how can i check if two 'generate-id()''s are on the same page? every item of my table of contents has two different pagenumbers (from page - to page), if both are the same only one should be printed.
<xsl:variable name="pagenumber">
<fo:page-number-citation ref-id="{generate-id(notes/note)}" />
</xsl:param>
doesn't work.
any ideas?
how can i check if two 'generate-id()''s are on the same page? every item of my table of contents has two different pagenumbers (from page - to page), if both are the same only one should be printed.
<xsl:variable name="pagenumber">
<fo:page-number-citation ref-id="{generate-id(notes/note)}" />
</xsl:param>
doesn't work.
any ideas?
-
- Posts: 5
- Joined: Wed Jan 05, 2005 1:07 pm
sorry about my english.
i don't want my pdf look like this:
first recipe .......2-5
second recipe ..6 -6
but:
first recipe .......2-5
second recipe ..6
my .xml:
<recipes>
<menu>
<head />
<recipe>
<notes>
<note />
</notes
</recipe>
</menu
</recipes>
.. and my .xsl:
<xsl:template match="menu">
<fo:block space-after="2cm" font-weight="bold">
<xsl:value-of select="head/title" />
</fo:block>
<fo:block>
<xsl:for-each select="recipe">
<fo:block text-align-last="justify">
<fo:table>
<fo:table-column column-width="350pt" />
<fo:table-column column-width="12pt" />
<fo:table-body>
<fo:table-row>
<fo:table-cell number-columns-spaned="2">
<fo:block text-align-last="justify">
<xsl:value-of select="head/title" />
<fo:leader leader-pattern="dots" keep-with-next.within-line="always" />
<fo:page-number-citation ref-id="{generate-id(notes)}" /> -
<fo:page-number-citation ref-id="{generate-id(notes/note)}" />
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:for-each>
</fo:block>
<xsl:apply-templates select="recipe" />
</xsl:template>
<xsl:template match="recipe">
<fo:block font-weight="bold" break-before="page">
<xsl:value-of select="head/title" />
</fo:block>
<fo:block id="{generate-id(notes)}" />
<xsl:value-of select="notes/note" />
<fo:block id="{generate-id(notes/note)}" />
</xsl:template>
i don't want my pdf look like this:
first recipe .......2-5
second recipe ..6 -6
but:
first recipe .......2-5
second recipe ..6
my .xml:
<recipes>
<menu>
<head />
<recipe>
<notes>
<note />
</notes
</recipe>
</menu
</recipes>
.. and my .xsl:
<xsl:template match="menu">
<fo:block space-after="2cm" font-weight="bold">
<xsl:value-of select="head/title" />
</fo:block>
<fo:block>
<xsl:for-each select="recipe">
<fo:block text-align-last="justify">
<fo:table>
<fo:table-column column-width="350pt" />
<fo:table-column column-width="12pt" />
<fo:table-body>
<fo:table-row>
<fo:table-cell number-columns-spaned="2">
<fo:block text-align-last="justify">
<xsl:value-of select="head/title" />
<fo:leader leader-pattern="dots" keep-with-next.within-line="always" />
<fo:page-number-citation ref-id="{generate-id(notes)}" /> -
<fo:page-number-citation ref-id="{generate-id(notes/note)}" />
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:for-each>
</fo:block>
<xsl:apply-templates select="recipe" />
</xsl:template>
<xsl:template match="recipe">
<fo:block font-weight="bold" break-before="page">
<xsl:value-of select="head/title" />
</fo:block>
<fo:block id="{generate-id(notes)}" />
<xsl:value-of select="notes/note" />
<fo:block id="{generate-id(notes/note)}" />
</xsl:template>
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Generally it is difficult to calculate exactly on what page starts and ends an item from table of contents because that depends on the output page size, font used, FO processor. Maybe you can ask about this on specialized mailing lists like http://groups.yahoo.com/group/xsl-fo/ and http://xml.apache.org/mail.html#fop-user.
Best regards,
Sorin
Generally it is difficult to calculate exactly on what page starts and ends an item from table of contents because that depends on the output page size, font used, FO processor. Maybe you can ask about this on specialized mailing lists like http://groups.yahoo.com/group/xsl-fo/ and http://xml.apache.org/mail.html#fop-user.
Best regards,
Sorin
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