[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

[xsl] Looping through a list of items

Subject: [xsl] Looping through a list of items
From: KAATMAN Matthew <matthew.kaatman@xxxxxxxxxxxxxx>
Date: Thu, 15 Aug 2013 16:38:54 +0200

This is a DITA related problem, I'll try to break it down into something
sensical for the context of this list.

My XML structure ultimately consists of chapters and appendixes filled with
child topics.

Within an inline block I setup all the TOC links to the pages. I'm trying to
do Chapter-Page numbering.

When I hit the child topics, within the transformation, $topicType is set to

I need some way to reference the parent to determine if the number should have
a format of A or 1.
Or if I could simply access the previously used number I'd be set.

Because I'm within an inline, I can't set a marker.

Let me know if this problem is too DITA specific for this list. I feel there's
got to be a simple solution to this but my XSLT skills aren't quite there

<xsl:variable name="tocItemContent">
<fo:inline >
    <xsl:if test="not($topicType='topicPart')">
	<xsl:for-each select="key('map-id', @id)[1]">
	    <xsl:when test="$topicType='topicAppendix'">
	      <xsl:number format="A" count="*[contains(@class, ' bookmap/appendix
	    <xsl:when test="$topicType='topicChapter'">
	      <xsl:number format="1" count="*[contains(@class, ' bookmap/chapter

// $topicType="topicSimple" here, I need to use the chapter|appendix
number|letter that was last used.

	<xsl:attribute name="ref-id">
	    <xsl:call-template name="generate-toc-id"/>

AVIS : Ce courrier et ses pieces jointes sont destines a leur seul
destinataire et peuvent contenir des informations confidentielles appartenant
a bioMerieux. Si vous n'etes pas destinataire, vous etes informe que toute
lecture, divulgation, ou reproduction de ce message et des pieces jointes est
strictement interdite. Si vous avez recu ce message par erreur merci d'en
prevenir l'expediteur et de le detruire, ainsi que ses pieces jointes.
NOTICE: This message and attachments are intended only for the use of their
addressee and may contain confidential information belonging to bioMerieux. If
you are not the intended recipient, you are hereby notified that any reading,
dissemination, distribution, or copying of this message, or any attachment, is
strictly prohibited. If you have received this message in error, please notify
the original sender immediately and delete this message, along with any

Current Thread