xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Morrison <Thomas.Morri...@microfocus.com>
Subject RE: Repeating elements within repeating elements
Date Thu, 21 Mar 2013 15:07:32 GMT
Robert,

Not sure it is a better way, but you can use the document structure and the XPath preceding-sibling
axis to get the same result.  The attached is a modification of your first XSL.

Best regards,
Tom Morrison

From: Robert Meyer [mailto:rmeyer@hotmail.co.uk]
Sent: Friday, March 15, 2013 9:31 AM
To: fop-users@xmlgraphics.apache.org
Subject: RE: Repeating elements within repeating elements

It was trickier than I first thought. I don't deal with XSLT that often but got there in the
end. I had to use an xsl:for-each as that allowed me to get the current position and do a
conditional on it. You could almost move the contents of that template back to where it was
before and just use the xsl:for-each, but it's up to you.

There may be a better way of doing it, but hope this points you in the right direction.

Regards,

Robert Meyer
> Date: Fri, 15 Mar 2013 05:52:51 -0700
> From: nbhchan@gmail.com<mailto:nbhchan@gmail.com>
> To: fop-users@xmlgraphics.apache.org<mailto:fop-users@xmlgraphics.apache.org>
> Subject: RE: Repeating elements within repeating elements
>
> You're a star. I did define such a template before but it didn't display any
> of the CHARGEITEMs so took it out. I see now that yours includes this line:
> <xsl:apply-templates/>
> And it seems as if it is this that makes it magically show all iterations.
> Incidentally the fields QTY, DESC, PLTS and CLASS are repeating for each
> CHARGEITEM and if I wanted to suppress the 2nd and successive occurrences
> would it be trivial to do?
>
>
>
> -----
> just starting out with FOP - don't hurt me!
> --
> View this message in context: http://apache-fop.1065347.n5.nabble.com/Repeating-elements-within-repeating-elements-tp38157p38159.html
> Sent from the FOP - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org<mailto:fop-users-unsubscribe@xmlgraphics.apache.org>
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org<mailto:fop-users-help@xmlgraphics.apache.org>
>

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com
______________________________________________________________________
Mime
View raw message