xsl-list
[Top] [All Lists]

Attribute value (...when false)

2005-12-07 15:10:06
Hello!

I want to get an output of a single statement "I do
not have..." when the value of attribute "status" in
element entry is not 'rec'-- so I have the following
XSL:

<xsl:for-each select="//SoftwareDocInfo/table">
   <xsl:for-each select="tgroup/tbody/row/entry">
      <fo:block font-size="17pt">
         <xsl:choose>
            <xsl:when test="//entry and
not(@status='rec') and(@status='def')
or(@status='none') or(@status='exp')">
                <fo:block space-before="3mm">
                   <fo:external-graphic content-width=".2in"
src="img/squ-bx.png"/>
                   <xsl:text>&#160; I do not have</xsl:text>
                   <xsl:value-of select="//productID/productname"/>
                </fo:block>
            </xsl:when>
            <xsl:otherwise>TEST</xsl:otherwise>
         </xsl:choose>
      </fo:block>
   </xsl:for-each><!--table/tgroup/tbody/row/entry-->
</xsl:for-each><!--SoftwareDocInfo/table-->
       
The desire output when the value of symbol is not
'rec' is:

* I do not have [value of "productname" goes here]

This is the current output from the above snippet:

* I do not have ["productname"]
* I do not have ["productname"]
* I do not have ["productname"]
* I do not have ["productname"]

How can I get the statement to display once when the
value of attribute 'status' is not 'rec' 
((and not(attribute::status='rec')))? In other words
when it is false. I know that the <xsl:choose>
<xsl:when...> test for a true value and the
<xsl:other> is process if <xsl:when> is not true. The
<xsl:if...> works similar to the <xsl:when>. Even when
I used <xsl:other> the result is still multiple
outputs (* I do not have...).

This is a snippet of the XML:

<SoftwareDocInfo>
  <table>...
    <tbody>
        <row>
          <entry status="def">
            <para>X81258</para>
          </entry>
          <entry morerows="2" status="none">
            <para>DX<superscript>&#174;</superscript> 20
Upgrade Kits</para>
          </entry>
          <entry morerows="2" status="none">
            <para>3.5</para>
          </entry>
        </row>
        <row>
          <entry status="def">
            <para>X73194</para>
          </entry>
        </row>
   </tbody>
    </tgroup>
  </table>
</SoftwareDocInfo>

Grouping problem?

Thank you,

Horace Burke


                
__________________________________________ 
Yahoo! DSL ? Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>