Subject: [xsl] Re: From: Lionel Crine <crine@xxxxxxxxxxxx> Date: Thu, 03 Apr 2003 09:02:09 +0200 |
1/you should write <xsl:apply-templates select="root/Value/Consum" mode="a"> instead of <xsl:apply-templates select="root/Value/Consum" mode "a">
Lionel At 19:37 01/04/2003 +0200, you wrote:
Hi I have a Problem with xsl:sort,
XML:
<root> <Value> <S95:ID>T_ID1</S95:ID> <Consum> <S95:ConsumID>T_CID1</S95:Consum> <S95:Time>25</S95:Time> </Consum> <Consum> <S95:ConsumID>T_CID6</S95:Consum> <S95:Time>38</S95:Time> </Consum> <Consum> <S95:ConsumID>T_CID8</S95:Consum> <S95:Time>29</S95:Time> </Consum>
<S95:ID>T_ID2</S95:ID> <Consum> <S95:ConsumID>T_CID5</S95:Consum> <S95:Time>25</S95:Time> </Consum> <Consum> <S95:ConsumID>T_CID8</S95:Consum> <S95:Time>23</S95:Time> </Consum> <Consum> <S95:ConsumID>T_CID3</S95:Consum> <S95:Time>28</S95:Time> </Consum> </Value> </root>
I want to have a Table like: (sort to S95:ConsumID)
T_ID1 T_CID1 25 T_ID2 T_CID3 28 T_ID2 T_CID5 25 T_ID1 T_CID6 38
XSL-fo
<fo:table-cell border-right="0.1pt solid black"> <xsl:apply-templates select="root/Value/Consum" mode "a"> <xsl:sort select="S95:ConsumID" order="ascending"/> </xsl:apply-templates> </fo:table-cell>
<fo:table-cell border-right="0.1pt solid black"> <xsl:apply-templates select="root/Value/Consum" mode "b"> <xsl:sort select="S95:ConsumID" order="ascending"/> </xsl:apply-templates> </fo:table-cell>
<fo:table-cell border-right="0.1pt solid black"> <xsl:apply-templates select="root/Value/Consum" mode "c"> <xsl:sort select="S95:ConsumID" order="ascending"/> </xsl:apply-templates> </fo:table-cell>
<xsl:template match="root/Value/Consum" mode="a"> <fo:block space-after.optimum="2pt" space-before.optimum="3pt" font-family.name="verdana" text-align="center" font-size="10pt" border-bottom="0.1pt solid black "> <xsl:value-of select="preceding::S95:ID"/> </fo:block> </xsl:template>
<xsl:template match="root/Value/Consum" mode="b"> <fo:block space-after.optimum="2pt" space-before.optimum="3pt" font-family.name="verdana" text-align="center" font-size="10pt" border-bottom="0.1pt solid black "> <xsl:value-of select="S95:Time"/> </fo:block> </xsl:template>
<xsl:template match="root/Value/Consum" mode="c"> <fo:block space-after.optimum="2pt" space-before.optimum="3pt" font-family.name="verdana" text-align="center" font-size="10pt" border-bottom="0.1pt solid black "> <xsl:value-of select="S95:ConsumID"/> </fo:block> </xsl:template>
mode b and c are working but mode a it´s not working. What must I change? Regards david
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Re:, J.Pietschmann | Thread | Re: [xsl] Re:, Wendell Piez |
Re: [xsl] many to one OR one to man, Fabien Triolet | Date | RE: [xsl] Get a comma delimited str, Allan Jones |
Month |