473,386 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to do a distinct in XSLT as you loop through Nodes

I have a xml file and i want to format it using XSL
My XSL file and XML below
I needed to do a distinct which is ok on the first node "Code"
For the "programDescription" i did below which gets the Count of the nodes
and i get the
programDescription node but it duplicates for the selected "Code" Node.
So if the Count is 3 its shows values "Crazy Training 2" 3 times
for Code "PRG004"
Any help?

<!-- for programDescription-->
<xsl:variable name="pdescription"
select="//ProgramDetail[code=current()]/programDescription" />
<!-- this is for the ModuleCode Node that i also doa a distinct-->
<xsl:variable name="uniqueModuleDesc"
select="//ProgramDetail[not(uniqueModuleDesc=preceding-sibling::ProgramDetai
l/uniqueModuleDesc)]/ModuleCode"/>

<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<!--
Output count of owners
//-->
<td valign="top"><xsl:value-of select="count($pdescription)" /></td>
<td valign="top">
<!--
Process owners and print them out
//-->
<xsl:for-each select="$pdescription">
<xsl:sort select="." />
<xsl:value-of select="current()" /><br/>
</xsl:for-each>
</td>
</tr>
But when it gets to the "programDescription" node it prints out values for
both Code="PRG004"
and PRG005 which is CrazyTraining 2 and Program6
I want CrazyTraining 2 for PRG004 and Program6 for PRG005

Any help?
Thx
XSL file
--------
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" />
<!--
Get distinct programs into variable
//-->
<xsl:variable name="uniqueCode"
select="//ProgramDetail[not(Code=preceding-sibling::ProgramDetail/Code)]/Cod
e"/>
<xsl:variable name="uniqueProgramDesc"
select="//ProgramDetail[not(programDescription=preceding-sibling::ProgramDet
ail/programDescription)]/programDescription"/>

<xsl:variable name="uniqueCoursecode"
select="//ProgramDetail[not(CourseCode=preceding-sibling::ProgramDetail/Cour
seCode)]/CourseCode"/>
<xsl:variable name="uniqueCourseDesc"
select="//ProgramDetail[not(CourseDescription=preceding-sibling::ProgramDeta
il/CourseDescription)]/CourseDescription"/>
<xsl:variable name="uniqueModuleCode"
select="//ProgramDetail[not(ModuleCode=preceding-sibling::ProgramDetail/Modu
leCode)]/ModuleCode"/>
<xsl:variable name="uniqueModuleDesc"
select="//ProgramDetail[not(uniqueModuleDesc=preceding-sibling::ProgramDetai
l/uniqueModuleDesc)]/ModuleCode"/>


<!--
Reflect to root node and form the HTML page
//-->
<xsl:template match="/">
<html>
<head>
<title>
Programs to be sent
</title>
</head>
<body>
<table border="1">
<tr>
<td><b>Code</b></td>
<td><b>Counts</b></td>
<td><b>Program Description</b></td>
<td><b>Course Code</b></td>
<td><b>Course Description</b></td>
</tr>
<!--
Process specified template
//-->
<xsl:call-template name="processprogramdetail"/>
<xsl:call-template name="processprogramdetail2"/>

<!--
<xsl:call-template name="processprogramdetail3"/>
<xsl:call-template name="processprogramdetail4"/>
<xsl:call-template name="processprogramdetail5"/>

-->
</table>
<table border="1">
<tr>
<td>
<xsl:call-template name="processprogramdetail3"/>
</td>

<td>
<xsl:call-template name="processprogramdetail4"/>
</td>

<td>
<xsl:call-template name="processprogramdetail5"/>
</td>

</tr>
</table>

</body>
</html>
</xsl:template>

<xsl:template name="processprogramdetail">

<!--
Process each distinct Code
//-->
<xsl:for-each select="$uniqueCode">
<!--
Sort by manufacturer
//-->
<xsl:sort select="." />

<!--
Output the Codes into first row
//-->
<tr>
<td><xsl:value-of select="." /></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
</tr>

<!--
Gets all program Desc listed
//-->
<xsl:variable name="programDescription"
select="//ProgramDetail[code=current()]/programDescription" />

<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<!--
Output count of ProgramDescription
//-->
<td valign="top">
<xsl:value-of select="count($programDescription)" /></td>

<td valign="top">
<!--
Process Program Description and print them out
//-->
<xsl:for-each select="$uniqueProgramDesc">
<xsl:sort select="." />
<xsl:value-of select="current()" /><br/>
</xsl:for-each>
</td>


</tr>


<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td valign="top">
<!--
Process Program description print them out
//-->
<!--
<xsl:for-each select="$programDescription">
-->
<xsl:for-each select="$uniqueCoursecode">

<xsl:sort select="." />
<xsl:value-of select="current()" />

<br/>

</xsl:for-each>
</td>
</tr>
<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td valign="top">
<!--
Process Program description print them out
//-->
<!--
<xsl:for-each select="$programDescription">
-->
<xsl:for-each select="$uniqueCourseDesc">

<xsl:sort select="." />
<xsl:value-of select="current()" />

<br/>

</xsl:for-each>
</td>
</tr>

<xsl:variable name="owners"
select="//ProgramDetail[programDescription=current()]/programDescription" />



</xsl:for-each>

</xsl:template>

<xsl:template name="processprogramdetail2">

<xsl:for-each select="$uniqueCode">

<xsl:sort select="." />


<tr>
<td><xsl:value-of select="." /></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
</tr>
<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<td>
<xsl:for-each select="$uniqueProgramDesc">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>
</td>

<td><xsl:text>&#xa0;</xsl:text></td>
</tr>



</xsl:for-each>

<!--
<xsl:for-each select="$uniqueCoursecode">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>
<xsl:for-each select="$uniqueCourseDesc">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>

<tr>
<td><xsl:text>&#xa0;</xsl:text></td>

<td>

<xsl:for-each select="$uniqueCoursecode">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>
</td>

<td>

<xsl:for-each select="$uniqueCourseDesc">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>
</td>

<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>

</tr>
-->
<!--
Output the Codes into first row
//-->
</xsl:template>
<xsl:template name="processprogramdetail3">
<xsl:for-each select="$uniqueCode">

<xsl:sort select="." />
<xsl:value-of select="." /> <br/>
</xsl:for-each>

</xsl:template>

<xsl:template name="processprogramdetail4">
<xsl:for-each select="$uniqueProgramDesc">

<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>

</xsl:template>
<xsl:template name="processprogramdetail5">
<xsl:for-each select="$uniqueCourseDesc">

<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>

</xsl:template>
</xsl:stylesheet>
XML file
--------------
<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="testemail.xsl"?>
<NewDataSet>
<ProgramDetail>
<Code>PRG004</Code>
<programDescription>Crazy Training 2</programDescription>
<CourseCode>MAT01</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths For Beginners</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
</ProgramDetail>
<ProgramDetail>
<Code>PRG004</Code>
<programDescription>Crazy Training 2</programDescription>
<CourseCode>PHS101</CourseCode>
<DurationHours>36</DurationHours>
<CourseDescription>Physics</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
<PreReqCourseCode>MAT234</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG004</Code>
<programDescription>Crazy Training 2</programDescription>
<CourseCode>PHS101</CourseCode>
<DurationHours>36</DurationHours>
<CourseDescription>Physics</CourseDescription>
<ModuleCode>TEST103</ModuleCode>
<ModuleDescription>TESTMODULEWITHLONGNAME</ModuleDescription>
<PreReqCourseCode>MAT234</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>COURSE102</CourseCode>
<DurationHours>5</DurationHours>
<CourseDescription>Course for learning Courses</CourseDescription>
<ModuleCode>MODULE101</ModuleCode>
<ModuleDescription>Module 1</ModuleDescription>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT01</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths For Beginners</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
<PreReqCourseCode>MAT01</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
<PreReqCourseCode>MAT101</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
<PreReqCourseCode>PHS101</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST102</ModuleCode>
<ModuleDescription>TestModule2</ModuleDescription>
<PreReqCourseCode>MAT01</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST102</ModuleCode>
<ModuleDescription>TestModule2</ModuleDescription>
<PreReqCourseCode>MAT101</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST102</ModuleCode>
<ModuleDescription>TestModule2</ModuleDescription>
<PreReqCourseCode>PHS101</PreReqCourseCode>
</ProgramDetail>
</NewDataSet>
Feb 23 '06 #1
1 4027
http://jenitennison.com/xslt/grouping/index.xml

Cheers,
Dimitre Novatchev

"Patrick.O.Ige" <na********@hotmail.com> wrote in message
news:e7**************@TK2MSFTNGP11.phx.gbl...
I have a xml file and i want to format it using XSL
My XSL file and XML below
I needed to do a distinct which is ok on the first node "Code"
For the "programDescription" i did below which gets the Count of the nodes
and i get the
programDescription node but it duplicates for the selected "Code" Node.
So if the Count is 3 its shows values "Crazy Training 2" 3 times
for Code "PRG004"
Any help?

<!-- for programDescription-->
<xsl:variable name="pdescription"
select="//ProgramDetail[code=current()]/programDescription" />
<!-- this is for the ModuleCode Node that i also doa a distinct-->
<xsl:variable name="uniqueModuleDesc"
select="//ProgramDetail[not(uniqueModuleDesc=preceding-sibling::ProgramDetai
l/uniqueModuleDesc)]/ModuleCode"/>

<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<!--
Output count of owners
//-->
<td valign="top"><xsl:value-of select="count($pdescription)" /></td>
<td valign="top">
<!--
Process owners and print them out
//-->
<xsl:for-each select="$pdescription">
<xsl:sort select="." />
<xsl:value-of select="current()" /><br/>
</xsl:for-each>
</td>
</tr>
But when it gets to the "programDescription" node it prints out values for
both Code="PRG004"
and PRG005 which is CrazyTraining 2 and Program6
I want CrazyTraining 2 for PRG004 and Program6 for PRG005

Any help?
Thx
XSL file
--------
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" />
<!--
Get distinct programs into variable
//-->
<xsl:variable name="uniqueCode"
select="//ProgramDetail[not(Code=preceding-sibling::ProgramDetail/Code)]/Cod
e"/>
<xsl:variable name="uniqueProgramDesc"
select="//ProgramDetail[not(programDescription=preceding-sibling::ProgramDet
ail/programDescription)]/programDescription"/>

<xsl:variable name="uniqueCoursecode"
select="//ProgramDetail[not(CourseCode=preceding-sibling::ProgramDetail/Cour
seCode)]/CourseCode"/>
<xsl:variable name="uniqueCourseDesc"
select="//ProgramDetail[not(CourseDescription=preceding-sibling::ProgramDeta
il/CourseDescription)]/CourseDescription"/>
<xsl:variable name="uniqueModuleCode"
select="//ProgramDetail[not(ModuleCode=preceding-sibling::ProgramDetail/Modu
leCode)]/ModuleCode"/>
<xsl:variable name="uniqueModuleDesc"
select="//ProgramDetail[not(uniqueModuleDesc=preceding-sibling::ProgramDetai
l/uniqueModuleDesc)]/ModuleCode"/>


<!--
Reflect to root node and form the HTML page
//-->
<xsl:template match="/">
<html>
<head>
<title>
Programs to be sent
</title>
</head>
<body>
<table border="1">
<tr>
<td><b>Code</b></td>
<td><b>Counts</b></td>
<td><b>Program Description</b></td>
<td><b>Course Code</b></td>
<td><b>Course Description</b></td>
</tr>
<!--
Process specified template
//-->
<xsl:call-template name="processprogramdetail"/>
<xsl:call-template name="processprogramdetail2"/>

<!--
<xsl:call-template name="processprogramdetail3"/>
<xsl:call-template name="processprogramdetail4"/>
<xsl:call-template name="processprogramdetail5"/>

-->
</table>
<table border="1">
<tr>
<td>
<xsl:call-template name="processprogramdetail3"/>
</td>

<td>
<xsl:call-template name="processprogramdetail4"/>
</td>

<td>
<xsl:call-template name="processprogramdetail5"/>
</td>

</tr>
</table>

</body>
</html>
</xsl:template>

<xsl:template name="processprogramdetail">

<!--
Process each distinct Code
//-->
<xsl:for-each select="$uniqueCode">
<!--
Sort by manufacturer
//-->
<xsl:sort select="." />

<!--
Output the Codes into first row
//-->
<tr>
<td><xsl:value-of select="." /></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
</tr>

<!--
Gets all program Desc listed
//-->
<xsl:variable name="programDescription"
select="//ProgramDetail[code=current()]/programDescription" />

<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<!--
Output count of ProgramDescription
//-->
<td valign="top">
<xsl:value-of select="count($programDescription)" /></td>

<td valign="top">
<!--
Process Program Description and print them out
//-->
<xsl:for-each select="$uniqueProgramDesc">
<xsl:sort select="." />
<xsl:value-of select="current()" /><br/>
</xsl:for-each>
</td>


</tr>


<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td valign="top">
<!--
Process Program description print them out
//-->
<!--
<xsl:for-each select="$programDescription">
-->
<xsl:for-each select="$uniqueCoursecode">

<xsl:sort select="." />
<xsl:value-of select="current()" />

<br/>

</xsl:for-each>
</td>
</tr>
<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td valign="top">
<!--
Process Program description print them out
//-->
<!--
<xsl:for-each select="$programDescription">
-->
<xsl:for-each select="$uniqueCourseDesc">

<xsl:sort select="." />
<xsl:value-of select="current()" />

<br/>

</xsl:for-each>
</td>
</tr>

<xsl:variable name="owners"
select="//ProgramDetail[programDescription=current()]/programDescription"
/>



</xsl:for-each>

</xsl:template>

<xsl:template name="processprogramdetail2">

<xsl:for-each select="$uniqueCode">

<xsl:sort select="." />


<tr>
<td><xsl:value-of select="." /></td>
<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>
</tr>
<tr>
<td><xsl:text>&#xa0;</xsl:text></td>
<td>
<xsl:for-each select="$uniqueProgramDesc">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>
</td>

<td><xsl:text>&#xa0;</xsl:text></td>
</tr>



</xsl:for-each>

<!--
<xsl:for-each select="$uniqueCoursecode">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>
<xsl:for-each select="$uniqueCourseDesc">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>

<tr>
<td><xsl:text>&#xa0;</xsl:text></td>

<td>

<xsl:for-each select="$uniqueCoursecode">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>
</td>

<td>

<xsl:for-each select="$uniqueCourseDesc">
<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>
</td>

<td><xsl:text>&#xa0;</xsl:text></td>
<td><xsl:text>&#xa0;</xsl:text></td>

</tr>
-->
<!--
Output the Codes into first row
//-->
</xsl:template>
<xsl:template name="processprogramdetail3">
<xsl:for-each select="$uniqueCode">

<xsl:sort select="." />
<xsl:value-of select="." /> <br/>
</xsl:for-each>

</xsl:template>

<xsl:template name="processprogramdetail4">
<xsl:for-each select="$uniqueProgramDesc">

<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>

</xsl:template>
<xsl:template name="processprogramdetail5">
<xsl:for-each select="$uniqueCourseDesc">

<xsl:sort select="." />
<xsl:value-of select="." /><br/>
</xsl:for-each>

</xsl:template>
</xsl:stylesheet>
XML file
--------------
<?xml version="1.0" standalone="yes"?>
<?xml-stylesheet type="text/xsl" href="testemail.xsl"?>
<NewDataSet>
<ProgramDetail>
<Code>PRG004</Code>
<programDescription>Crazy Training 2</programDescription>
<CourseCode>MAT01</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths For Beginners</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
</ProgramDetail>
<ProgramDetail>
<Code>PRG004</Code>
<programDescription>Crazy Training 2</programDescription>
<CourseCode>PHS101</CourseCode>
<DurationHours>36</DurationHours>
<CourseDescription>Physics</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
<PreReqCourseCode>MAT234</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG004</Code>
<programDescription>Crazy Training 2</programDescription>
<CourseCode>PHS101</CourseCode>
<DurationHours>36</DurationHours>
<CourseDescription>Physics</CourseDescription>
<ModuleCode>TEST103</ModuleCode>
<ModuleDescription>TESTMODULEWITHLONGNAME</ModuleDescription>
<PreReqCourseCode>MAT234</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>COURSE102</CourseCode>
<DurationHours>5</DurationHours>
<CourseDescription>Course for learning Courses</CourseDescription>
<ModuleCode>MODULE101</ModuleCode>
<ModuleDescription>Module 1</ModuleDescription>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT01</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths For Beginners</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
<PreReqCourseCode>MAT01</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
<PreReqCourseCode>MAT101</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST101</ModuleCode>
<ModuleDescription>Test Module</ModuleDescription>
<PreReqCourseCode>PHS101</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST102</ModuleCode>
<ModuleDescription>TestModule2</ModuleDescription>
<PreReqCourseCode>MAT01</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST102</ModuleCode>
<ModuleDescription>TestModule2</ModuleDescription>
<PreReqCourseCode>MAT101</PreReqCourseCode>
</ProgramDetail>
<ProgramDetail>
<Code>PRG005</Code>
<programDescription>Program 6</programDescription>
<CourseCode>MAT234</CourseCode>
<DurationHours>8</DurationHours>
<CourseDescription>Maths</CourseDescription>
<ModuleCode>TEST102</ModuleCode>
<ModuleDescription>TestModule2</ModuleDescription>
<PreReqCourseCode>PHS101</PreReqCourseCode>
</ProgramDetail>
</NewDataSet>

Feb 23 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: K. N. | last post by:
Is there any good and fast Python module for XSLT processing ? I'm going to use XML and XSLT to generate web pages, so I need XSLT processor that will be able to transform for example a DOM object...
4
by: Marco Alting | last post by:
Hi I have two table which are related: table1 holds personellinformation table2 holds nodeInformation The nodes in table2 can have a nodeOwner which will then get a recordID from table1. A...
4
by: kristofera | last post by:
I am trying to do a distinct grouping of some nodes sorted by a numeric value but for some reason the distinct (preceding-sibling filter) is applied to the result as if not sorted. If I don't use...
5
by: Chris Kettenbach | last post by:
Good Morning, Sorry for xposting. Just need a liitle help. I have an xml file that's generated from a database. How do I select distinct values from a field in xslt and then loop through the...
3
by: Yogs | last post by:
Hello All, I have an RSS XML file that is read in and then displayed on the site. The RSS file has repeating news articles, is there a way to tell the XmlDocument object to display the article...
6
by: Neal | last post by:
Hi All, I used an article on XSLT and XML and creating a TOC written on the MSDN CodeCorner. ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm However, it did'nt...
1
by: Chris | last post by:
I have a problem with grouping elements in my XSL. What I want to do is select all of the distinct SCE_CGPC records, then by the FSG_SNAM records for each SCE_CGPC and then again by MOA_NAME for...
1
by: balderdash | last post by:
Hi I am very close to achieving the output I need but I cant seem to get it right. The problem is I am looping through a table and selecting values, if there are 2 values per (row) Issuer I...
2
by: ork | last post by:
How to select only distinct nodes from XML using XSLT?
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.