Click here to Skip to main content
15,895,011 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: Calling a template recursively?? Pin
George L. Jackson5-Sep-07 2:15
George L. Jackson5-Sep-07 2:15 
GeneralRe: Calling a template recursively?? Pin
Rocky#5-Sep-07 2:57
Rocky#5-Sep-07 2:57 
GeneralRe: Calling a template recursively?? Pin
Rocky#5-Sep-07 3:05
Rocky#5-Sep-07 3:05 
GeneralRe: Calling a template recursively?? Pin
George L. Jackson5-Sep-07 5:56
George L. Jackson5-Sep-07 5:56 
GeneralRe: Calling a template recursively?? Pin
Rocky#5-Sep-07 18:53
Rocky#5-Sep-07 18:53 
GeneralRe: Calling a template recursively?? Pin
George L. Jackson6-Sep-07 1:50
George L. Jackson6-Sep-07 1:50 
GeneralRe: Calling a template recursively?? Pin
Rocky#5-Sep-07 19:50
Rocky#5-Sep-07 19:50 
GeneralRe: Calling a template recursively?? Pin
Rocky#6-Sep-07 1:30
Rocky#6-Sep-07 1:30 
<xsl:template name="CallSequenceTemplate">
<xsl:param name="nodeset"/>
<xsl:for-each select="msxsl:node-set($nodeset)/CallSequence/Call">
<table>
<br/>
<tr>
<td class='heading3'><b>Call to <xsl:value-of select="Method"/></b></td>
</tr>
</table>
<table width="100%">
<tr><td width="10%">Object Type&#160;</td><td><i><xsl:value-of select="ObjectType"/></i></td></tr>
<tr><td>Object Name&#160;</td><td><i><xsl:value-of select="ObjectName"/></i></td></tr>
<tr><td>Interface Name&#160;</td><td><i><xsl:value-of select="Interface"/></i></td></tr>
<tr><td>Return Code&#160;</td><td><i><xsl:value-of select="ReturnCode"/></i></td></tr>

</table>
<xsl:for-each select="Arguments">
<table width = "100%" border="0" class="border" cellpadding="0" cellspacing="1">
<tr><td class='heading4'>&#160;</td></tr>

<xsl:if test="Results/Value">
<tr class="nonSelectedRow">
<td colspan="6" class = 'detail_table_element'><b>Inputs</b></td>
</tr>
</xsl:if>
<xsl:if test="Results/Compound">
<tr class="nonSelectedRow">
<td colspan="4" class = 'detail_table_element'><b>Inputs</b></td>
<td colspan="2" class = 'detail_table_element'><b>Output</b></td>
</tr>
</xsl:if>
<tr class="nonSelectedRow">

<xsl:for-each select="*[name() != 'Results'] | Results/child::node()[1] | Results/child::node()[1] / child::node()[2]">
<th><xsl:value-of select="name()"/></th>
</xsl:for-each>
</tr>
<tr>
<xsl:for-each select="*[node() and name() != 'Results']">
<td valign = "top"><xsl:value-of select="node()"/></td>
</xsl:for-each>

<xsl:if test="Results/Compound">
<td>
<table border="0" width = "100%">
<xsl:for-each select="Results/Compound">
<tr>
<td><xsl:value-of select="Name"/></td>
</tr>
</xsl:for-each>
</table>
</td>
<td>
<table border="0" width = "100%">
<xsl:for-each select="Results/Compound">
<tr>
<td><xsl:value-of select="Value"/></td>
</tr>
</xsl:for-each>
</table>
</td>
</xsl:if>

<xsl:if test="Results/Value">
<xsl:for-each select="Results">
<td><xsl:value-of select="Value"/></td>
</xsl:for-each>
</xsl:if>
</tr>
</table>
</xsl:for-each>
</xsl:for-each>
</xsl:template>

-----------------

I've almost done it!! the calling doesnt go to the third level so I call it this way...

<xsl:call-template name="CallSequenceTemplate">
<xsl:with-param name="nodeset" select="/LOG"/>
</xsl:call-template>
<xsl:call-template name="CallSequenceTemplate">

<xsl:with-param name="nodeset" select="/LOG/CallSequence/Call"/>
</xsl:call-template>

The only problem now is that as its taking All the call which are at the same level. It ignores the sequence of call for example when a method is called after lots of nested calls in a previous method.

Thanks very much u know I really appreciate your effort. I wouldnt have done this with out u.

Thanks!

Rocky

You can't climb up a ladder with your hands in your pockets.
GeneralRe: Calling a template recursively?? Pin
George L. Jackson6-Sep-07 1:54
George L. Jackson6-Sep-07 1:54 
GeneralRe: Calling a template recursively?? Pin
Rocky#6-Sep-07 2:17
Rocky#6-Sep-07 2:17 
GeneralRe: Calling a template recursively?? Pin
George L. Jackson6-Sep-07 2:25
George L. Jackson6-Sep-07 2:25 
GeneralRe: Calling a template recursively?? Pin
Rocky#6-Sep-07 2:33
Rocky#6-Sep-07 2:33 
GeneralRe: Calling a template recursively?? Pin
George L. Jackson6-Sep-07 2:41
George L. Jackson6-Sep-07 2:41 
GeneralRe: Calling a template recursively?? [modified] Pin
Rocky#6-Sep-07 20:33
Rocky#6-Sep-07 20:33 
GeneralFound where the bug is now Pin
Rocky#6-Sep-07 21:20
Rocky#6-Sep-07 21:20 
GeneralRe: Calling a template recursively?? Pin
Rocky#7-Sep-07 0:09
Rocky#7-Sep-07 0:09 
GeneralRe: Calling a template recursively?? Pin
George L. Jackson7-Sep-07 2:49
George L. Jackson7-Sep-07 2:49 
GeneralRe: Calling a template recursively?? Pin
Rocky#8-Sep-07 0:10
Rocky#8-Sep-07 0:10 
GeneralRe: Calling a template recursively?? Pin
Rocky#10-Sep-07 21:45
Rocky#10-Sep-07 21:45 
GeneralRe: Calling a template recursively?? Pin
George L. Jackson11-Sep-07 0:30
George L. Jackson11-Sep-07 0:30 
GeneralRe: Calling a template recursively?? Pin
Rocky#11-Sep-07 0:49
Rocky#11-Sep-07 0:49 
QuestionWDSL Jagged array problem Pin
sander BB4-Sep-07 23:20
sander BB4-Sep-07 23:20 
QuestionProblem in using call-template Pin
Rocky#4-Sep-07 23:13
Rocky#4-Sep-07 23:13 
AnswerRe: Problem in using call-template Pin
George L. Jackson5-Sep-07 1:51
George L. Jackson5-Sep-07 1:51 
QuestionHow to Check whether we can use XSL 2.0? Pin
Rocky#3-Sep-07 21:39
Rocky#3-Sep-07 21:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.