IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

using when and - keep getting the syntax wrong Options · View
jloyzaga
Posted: Sunday, January 15, 2017 11:17:14 PM
Rank: Member

Joined: 11/27/2016
Posts: 14
Location: Australia
I want to create the table when "NodeArgs/@status" = Passed or Failed but I keep getting the syntax wrong - can anyone help me?
Its the when "and" conditions that normally get me..
Thanks
Joe

the code is below


Code:
    <xsl:template match="Step">
            <table width="100%" valign="top">
                <tr>
                    <td height="1" class="bg_midblue"/>
                </tr>
                <tr>
                    <td height="30">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td>
                                    <span class="hl1name">
                                        <xsl:copy-of select="$IDS_STEP_NAME_COLON"/>
                                    </span>
                                    <b>
                                        <span class="hl1">
                                            <xsl:value-of select="NodeArgs/Disp"/>
                                        </span>
                                    </b>
                                </td>
                                <td align="right">
                                    <span valign="center">
                                        <xsl:element name="span">
                                            <xsl:attribute name="class"><xsl:value-of select="NodeArgs/@status"/>High</xsl:attribute>
                                            <xsl:copy-of select="$IDS_STEP"/>
                                            <xsl:value-of select="NodeArgs/@status"/>
                                        </xsl:element>
                                    </span>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <br/>
                    </td>
                </tr>
                <tr>
                    <td>
                        <table border="0" cellpadding="2" cellspacing="1" width="100%" bgcolor="#666699">
                            <tr>
                                <td bgcolor="white">
                                    <table border="0" cellpadding="3" cellspacing="0" width="100%">
                                        <tr align="center" border="0">
                                            <td width="25%" valign="middle" align="center" class="tablehl">
                                                <span width="100%" class="tablehl">
                                                    <xsl:copy-of select="$IDS_OBJECT"/>
                                                </span>
                                            </td>
                                            <td width="25%" valign="middle" align="center" class="tablehl">
                                                <span width="100%" class="tablehl">
                                                    <xsl:copy-of select="$IDS_DETAILS"/>
                                                </span>
                                            </td>
                                            <td width="25%" valign="middle" align="center" class="tablehl">
                                                <span width="100%" class="tablehl">
                                                    <xsl:copy-of select="$IDS_RESULT"/>
                                                </span>
                                            </td>
                                            <td width="25%" valign="middle" align="center" class="tablehl">
                                                <span width="100%" class="tablehl">
                                                    <xsl:copy-of select="$IDS_TIME"/>
                                                </span>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="4" width="100%" height="1" class="bg_darkblue"/>
                                        </tr>
                                        <tr border="0">
                                            <td valign="middle" align="center" height="20">
                                                <div align="center" width="100%" class="text">
                                                    <xsl:apply-templates select="Obj"/>
                                                </div>
                                            </td>
                                            <td valign="middle" align="center" height="20">
                                                <div align="center" width="100%" class="text">
                                                    <xsl:apply-templates select="Details"/>
                                                </div>
                                            </td>
                                            <td valign="middle" align="center" height="20">
                                                <div align="center" width="100%" class="text">
                                                    <xsl:element name="span">
                                                        <xsl:attribute name="class"><xsl:value-of select="NodeArgs/@status"/></xsl:attribute>
                                                        <xsl:value-of select="NodeArgs/@status"/>
                                                    </xsl:element>
                                                </div>
                                            </td>
                                            <td valign="middle" align="center" height="20">
                                                <div align="center" width="100%" class="text">
                                                    <xsl:value-of select="Time"/>
                                                </div>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
            <xsl:if test="$IncludeImages=1">
                <xsl:apply-templates select="NodeArgs"/>
            </xsl:if>
            <xsl:call-template name="GreenLine"/>
            <xsl:apply-templates select="*[@rID]"/>
        </xsl:template>
island
Posted: Monday, January 16, 2017 11:26:09 AM
Rank: Newbie

Joined: 10/28/2002
Posts: 1,283
Location: AT
Code:


        <xsl:if test="(NodeArgs/@status = 'Passed') or (NodeArgs/@status ='Failed')">
        <table width="100%" valign="top">
...
...
                </table>
    </xsl:if>

Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.