[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Attribute value (...when false)

Subject: Attribute value (...when false)
From: Horace Burke <egrubs@xxxxxxxxx>
Date: Wed, 7 Dec 2005 14:10:06 -0800 (PST)
horace burke
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 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.