E
Eliza Zadura
I have the following loops:
<xsl:for-each
select="//node[@type='N_MICROFLOW_SD'][@display=$microflow_id]">
<xsl:variable name="sd_id" select="./@object"/>
<xsl:variable name="doc_id"
select="//link[@type='L_DC_SD'][@to=$sd_id]/@from"/>
<xsl:if test="//link[@type='L_MICROFLOW_WA_SD'][@to=$sd_id]/@from!=''">
<tr>
<td>Output:</td>
<td>
<xsl:value-of select="//object[@id=$sd_id]/property[@name='SDMSGNAM']"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="//object[@id=$doc_id]/property[@name='ACNAME']"/>
</td>
</tr>
</xsl:if>
</xsl:for-each>
<xsl:for-each
select="//node[@type='N_MICROFLOW_SD'][@display=$microflow_id]">
<xsl:variable name="sd_id" select="./@object"/>
<xsl:variable name="doc_id"
select="//link[@type='L_DC_SD'][@to=$sd_id]/@from"/>
<xsl:if test="//link[@type='L_WC_SD'][@to=$sd_id]/@from!=''">
<tr>
<td>Output:</td>
<td>
<xsl:value-of select="//object[@id=$sd_id]/property[@name='SDMSGNAM']"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="//object[@id=$doc_id]/property[@name='ACNAME']"/>
</td>
</tr>
</xsl:if>
</xsl:for-each>
The only difference between them is that the first one checks one type
of <link> element (row 7), and the other another type (row 26). Can I do
this with one loop and one if-condition? Basically, is there an or? I
sure can't seem to find a way, but then again it is late in the
afternoon and I'm tired...
<xsl:for-each
select="//node[@type='N_MICROFLOW_SD'][@display=$microflow_id]">
<xsl:variable name="sd_id" select="./@object"/>
<xsl:variable name="doc_id"
select="//link[@type='L_DC_SD'][@to=$sd_id]/@from"/>
<xsl:if test="//link[@type='L_MICROFLOW_WA_SD'][@to=$sd_id]/@from!=''">
<tr>
<td>Output:</td>
<td>
<xsl:value-of select="//object[@id=$sd_id]/property[@name='SDMSGNAM']"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="//object[@id=$doc_id]/property[@name='ACNAME']"/>
</td>
</tr>
</xsl:if>
</xsl:for-each>
<xsl:for-each
select="//node[@type='N_MICROFLOW_SD'][@display=$microflow_id]">
<xsl:variable name="sd_id" select="./@object"/>
<xsl:variable name="doc_id"
select="//link[@type='L_DC_SD'][@to=$sd_id]/@from"/>
<xsl:if test="//link[@type='L_WC_SD'][@to=$sd_id]/@from!=''">
<tr>
<td>Output:</td>
<td>
<xsl:value-of select="//object[@id=$sd_id]/property[@name='SDMSGNAM']"/>
<xsl:text> - </xsl:text>
<xsl:value-of select="//object[@id=$doc_id]/property[@name='ACNAME']"/>
</td>
</tr>
</xsl:if>
</xsl:for-each>
The only difference between them is that the first one checks one type
of <link> element (row 7), and the other another type (row 26). Can I do
this with one loop and one if-condition? Basically, is there an or? I
sure can't seem to find a way, but then again it is late in the
afternoon and I'm tired...