Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: pagination - sort of pagination - sort ofTo: NULL Date: 7/7/2005 2:36:00 PM I have my xml and xslt below.I am trying to build previous and Next buttons.
these would be dependent on what 'page' I would be on. The value of
'LessontIntro/testContent/tcc/testContentID' defines what Page I am on. The
group of pages would change depending on the value of
'LessontIntro/testContent/tcc/testID'
For the lesson with the testID of 1010
I have 3 Id's 155, 156 and 157
If I am on page 156 - I need to beable to go back to 155 and forward to 157
How do I get the previous and following testContentID's
See my xslt below
I can restrict it down to the pages in the test - but I cannot figure out
how to get only ONE returened.
<LessonIntro>
<testContentTypeID>11</testContentTypeID>
<testContentType>Lesson Intro</testContentType>
<typeDesc>First Page into the Lesson - Can Be Learner
Objectives</typeDesc>
<sortOrder>7</sortOrder>
<testContent>
<testContentID>114</testContentID>
<testContentTypeID>11</testContentTypeID>
<title>INTRO</title>
<sortOrder>0</sortOrder>
<parentContentID>0</parentContentID>
<tcc>
<testContent_ConnID>51</testContent_ConnID>
<testContentID>114</testContentID>
<testID>1009</testID>
<subPages/>
</tcc>
</testContent>
<testContent>
<testContentID>115</testContentID>
<testContentTypeID>11</testContentTypeID>
<title>INTRO</title>
<sortOrder>0</sortOrder>
<parentContentID>0</parentContentID>
<tcc>
<testContent_ConnID>51</testContent_ConnID>
<testContentID>115</testContentID>
<testID>1009</testID>
<subPages/>
</tcc>
</testContent>
<testContent>
<testContentID>155</testContentID>
<testContentTypeID>11</testContentTypeID>
<title>INTRO</title>
<sortOrder>0</sortOrder>
<parentContentID>0</parentContentID>
<tcc>
<testContent_ConnID>51</testContent_ConnID>
<testContentID>155</testContentID>
<testID>1010</testID>
<subPages/>
</tcc>
</testContent>
<testContent>
<testContentID>156</testContentID>
<testContentTypeID>11</testContentTypeID>
<title>INTRO</title>
<sortOrder>0</sortOrder>
<parentContentID>0</parentContentID>
<tcc>
<testContent_ConnID>51</testContent_ConnID>
<testContentID>156</testContentID>
<testID>1010</testID>
<subPages/>
</tcc>
</testContent>
<testContent>
<testContentID>157</testContentID>
<testContentTypeID>11</testContentTypeID>
<title>INTRO</title>
<sortOrder>0</sortOrder>
<parentContentID>0</parentContentID>
<tcc>
<testContent_ConnID>51</testContent_ConnID>
<testContentID>157</testContentID>
<testID>1010</testID>
<subPages/>
</tcc>
</testContent>
<xsl:template match="text()"/>
<xsl:template match="results/LessonIntro/testContent/tcc/testID">
<xsl:if test="$testContentTypeID ='11'">
<xsl:if test="preceding-sibling::testContentID">
<table border="1">
<tr>
<th>Node name</th>
<th>Node value</th>
</tr>
<xsl:for-each select="preceding-sibling::testContentID[../testID=$testID]">
<tr>
<td>
<xsl:value-of select="name()"/>
</td>
<td>
<xsl:value-of select="."/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:if>
</xsl:if>
</xsl:template>
Thank you in advance,
Kim
</LessonIntro>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
