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

Re: Attribute value (...when false)

Subject: Re: Attribute value (...when false)
From: Horace Burke <egrubs@xxxxxxxxx>
Date: Thu, 8 Dec 2005 10:32:47 -0800 (PST)
attribute xsl when
David,

Thanks for your response. I used // because tables can
appear in two other sections/parts of the documents.
Anyway those elements will not appear whenever
"SoftwareDocInfo" is used. And yes, I understand that
// searches the entire document.

I only want the "entry" elements that appear in
SoftwareDocInfo/table, so using the //entry was an
error, which I have now changed to /entry. The result
is almost the same.

The productID/productname appears in the document once
and I used // because it is not a child of the
template that it is used in the XSL.

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

The productID/productname appears in the document once
and I used // because it is not a child of the
template that it is used in in the XSL.

Thanks again,

H Burke

<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(@symbol='rec') and(@symbol='def')
or(@symbol='none') or(@symbol='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"]

--- David Carlisle <davidc@xxxxxxxxx> wrote:

> 
> // is an expensive operation.
> 
> <xsl:for-each select="//SoftwareDocInfo/table">
> that searches the entire document for
> SoftwareDocInfo elements, then
> selects table elements
> 
>             <xsl:when test="//entry and
> This tests if there is an entry anywhere in the
> docucument (not
> necessarily in this table)
> 
> 		   <xsl:value-of
> select="//productID/productname"/>
> This uses the first productID/productname in the
> document  (which may or
> may not be what you want, I can't tell)
> 
> David
> 
>
________________________________________________________________________
> This e-mail has been scanned for all viruses by
> Star. The
> service is powered by MessageLabs. For more
> information on a proactive
> anti-virus service working around the clock, around
> the globe, visit:
> http://www.star.net.uk
>
________________________________________________________________________
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.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.