Click here to Skip to main content
15,903,856 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: one page sequence for each 30 rows in a table[modified] Pin
Support12324-Jul-06 4:20
Support12324-Jul-06 4:20 
GeneralRe: one page sequence for each 30 rows in a table[modified] Pin
Rizwan Bashir24-Jul-06 22:54
Rizwan Bashir24-Jul-06 22:54 
AnswerRe: Page-Sequence in fop Pin
Dustin Metzgar24-Jul-06 5:01
Dustin Metzgar24-Jul-06 5:01 
GeneralRe: Page-Sequence in fop Pin
Support12324-Jul-06 5:14
Support12324-Jul-06 5:14 
GeneralRe: Page-Sequence in fop Pin
Dustin Metzgar24-Jul-06 5:42
Dustin Metzgar24-Jul-06 5:42 
GeneralRe: Page-Sequence in fop Pin
Support12324-Jul-06 5:54
Support12324-Jul-06 5:54 
QuestionRe: i found this example Pin
Support12324-Jul-06 20:29
Support12324-Jul-06 20:29 
QuestionRe:How i tried it. Sorry, Another Long one Pin
Support12324-Jul-06 20:32
Support12324-Jul-06 20:32 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="ClientLookUp">

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="21cm"
page-width="29.7cm"
margin-top="1cm"
margin-bottom="2cm"
margin-left="1.5cm"
margin-right="1.5cm">
<fo:region-body margin-top="2cm"/>
<fo:region-before extent="1.5cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<xsl:variable name="STOP" select="2"/>
<fo:page-sequence master-reference="simple">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<xsl:apply-templates select="ClientLookUp"/>
<xsl:apply-templates select="Title"/>
</fo:block>
</fo:flow>
</fo:page-sequence>
<xsl:for-each select="TableEntries[position() mod $STOP = 1]">
<fo:page-sequence master-reference="simple" initial-page-number="auto">
<fo:flow flow-name="xsl-region-body">
<fo:table table-layout="fixed" width="750pt">
<xsl:if test="ClientTitle1">
<fo:table-column column-width="30pt"/>
</xsl:if>
<xsl:if test="ClientName1">
<fo:table-column column-width="60pt"/>
</xsl:if>
<xsl:if test="ClientSur1">
<fo:table-column column-width="80pt"/>
</xsl:if>
<xsl:if test="ClientCode1">
<fo:table-column column-width="35pt"/>
</xsl:if>
<xsl:if test="ClientType1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientBDay1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientStaff1">
<fo:table-column column-width="85pt"/>
</xsl:if>
<xsl:if test="TelH">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="TelW">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="Cell1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-column column-width="105pt"/>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-column column-width="105pt"/>
</xsl:if>
<fo:table-body>
<fo:table-row>
<xsl:if test="ClientTitle1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Title
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientName1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientName
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientSur1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientSurname
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientCode1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientCode
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientType1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
ClientType
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientBDay1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
BirthDate
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientStaff1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Staff
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelH">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Tel(H)
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelW">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Tel(W)
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="Cell1">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Cell
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Email(H)
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-cell font-size="7pt" padding="1pt">
<fo:block background-color="silver">
Email(W)
</fo:block>
</fo:table-cell>
</xsl:if>
</fo:table-row>
</fo:table-body>
</fo:table>
<xsl:for-each select=".|following-sibling::TableEntries[position() &lt; $STOP]">
<xsl:apply-templates select="."/>
</xsl:for-each>
</fo:flow>
</fo:page-sequence>
</xsl:for-each>
</fo:root>

</xsl:template>

<xsl:template match="Title">
<fo:block font-size="18pt"
font-family="sans-serif"
line-height="20pt"
space-after.optimum="1pt"
background-color="blue"
color="white"
text-align="center"
padding-top="3pt">
<xsl:value-of select="Heading"/>
</fo:block>
<fo:block font-size="16pt"
font-family="sans-serif"
line-height="18pt"
space-after.optimum="1pt"
background-color="blue"
color="white"
text-align="center"
padding-top="3pt">
<xsl:value-of select="DateCreated"/>
</fo:block>
</xsl:template>

<xsl:template match="TableEntries">
<fo:block width="750pt">
<fo:table table-layout="fixed" width="750pt">
<xsl:if test="ClientTitle1">
<fo:table-column column-width="30pt"/>
</xsl:if>
<xsl:if test="ClientName1">
<fo:table-column column-width="60pt"/>
</xsl:if>
<xsl:if test="ClientSur1">
<fo:table-column column-width="80pt"/>
</xsl:if>
<xsl:if test="ClientCode1">
<fo:table-column column-width="35pt"/>
</xsl:if>
<xsl:if test="ClientType1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientBDay1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="ClientStaff1">
<fo:table-column column-width="85pt"/>
</xsl:if>
<xsl:if test="TelH">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="TelW">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="Cell1">
<fo:table-column column-width="50pt"/>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-column column-width="105pt"/>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-column column-width="105pt"/>
</xsl:if>
<fo:table-body>
<xsl:for-each select="TableInfo">
<fo:table-row>
<xsl:if test="ClientTitle">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientTitle"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientName">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientName"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientSurname">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientSurname"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientCode">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientCode"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientType">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientType"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientBDay">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientBDay"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="ClientStaff">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="ClientStaff"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelH">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="TelH"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="TelW">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="TelW"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="Cell">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="Cell"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailH">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="EmailH"/>
</fo:block>
</fo:table-cell>
</xsl:if>
<xsl:if test="EmailW">
<fo:table-cell font-size="7pt" border="1" border-color="black" border-style="solid" padding="2pt">
<fo:block>
<xsl:value-of select="EmailW"/>
</fo:block>
</fo:table-cell>
</xsl:if>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
</xsl:template>

</xsl:stylesheet>

He who laughs last...
QuestionRe: Problem, I think.... [modified] Pin
Support12324-Jul-06 20:38
Support12324-Jul-06 20:38 
Questionxsl calling styles Pin
Craigjw23-Jul-06 11:02
Craigjw23-Jul-06 11:02 
QuestionVS 2003 XML validation How to switch off? Pin
dl4gbe21-Jul-06 22:25
dl4gbe21-Jul-06 22:25 
QuestionHow do i download the fop patch? Pin
Support12321-Jul-06 4:05
Support12321-Jul-06 4:05 
AnswerRe: How do i download the fop patch? Pin
Dustin Metzgar21-Jul-06 4:28
Dustin Metzgar21-Jul-06 4:28 
GeneralRe: How do i download the fop patch? Pin
Support12323-Jul-06 21:18
Support12323-Jul-06 21:18 
QuestionRe: How do i download the fop patch? Quite a Big one, sorry Pin
Support12323-Jul-06 23:14
Support12323-Jul-06 23:14 
AnswerRe: How do i download the fop patch? Quite a Big one, sorry Pin
Dustin Metzgar24-Jul-06 2:36
Dustin Metzgar24-Jul-06 2:36 
QuestionCode error Pin
biaali20-Jul-06 22:50
biaali20-Jul-06 22:50 
AnswerRe: Code error Pin
Dustin Metzgar21-Jul-06 11:46
Dustin Metzgar21-Jul-06 11:46 
GeneralRe: Code error Pin
biaali25-Jul-06 20:31
biaali25-Jul-06 20:31 
Questionhow to use outer_xml? Pin
anguslam19-Jul-06 21:37
anguslam19-Jul-06 21:37 
QuestionStylus Studio? Pin
charlieg19-Jul-06 15:07
charlieg19-Jul-06 15:07 
QuestionAdd attribute to xml file using C# Pin
VK-Cadec19-Jul-06 7:14
VK-Cadec19-Jul-06 7:14 
AnswerRe: Add attribute to xml file using C# Pin
led mike19-Jul-06 11:44
led mike19-Jul-06 11:44 
QuestionFop Memory help [modified] Pin
Support12319-Jul-06 4:13
Support12319-Jul-06 4:13 
QuestionRe: Fop Memory help plz [modified] Pin
Support12320-Jul-06 0:55
Support12320-Jul-06 0:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.