RE:Is there a real XSl guru out there who know how to do this?

Subject: RE:Is there a real XSl guru out there who know how to do this?
From: Igor.Pechersky@xxxxxxxx
Date: Mon, 2 Nov 1998 18:29:01 +0200
Not pretending to be guru...
Kenneth Li wrote:
 >>how should I do this:
>>
>>if(value(STOCKQUOTERS.TICKER) == value(NEWSSEARCHRS.TICKER) &&
>>   value(STOCKQUOTERS.EXCHANGE) == value(NEWSSEARCHRS.EXCHANGE)
>>   {<COL><IMG SRC="NEWS.ICO"/></COL>}
>>else
>>   {<COL></COL>}

It seems to reference pattern-text-content issue...
Anyway, I supposed that at lest in case of
<STOCKQUOTERS>
     <EXCHANGE ATT-EXCHANGE="NASDAQ">NASDAQ</EXCHANGE>
     <TICKER ATT-TICKER="MSFT">MSFT</TICKER>
     <UNITPRICE>122.22</UNITPRICE>
     <NETCHANGE>99.99</NETCHANGE>
</STOCKQUOTERS>
 XML-input (ATT-EXCHANGE and ATT-TICKER attributes added!)
the following
<TABLE>
     <xsl:for-each select="LMP/STOCKQUOTERS">
     <ROW>
          <COL>
          <xsl:if test="../NEWSSEARCHRS/TICKER='{./TICKER
[attribute(ATT-TICKER)}}'">
               <IMG SRC="NEWS.ICO"/>
          </xsl:if>
          </COL>
          <xsl:process select="TICKER"/>
          </COL>
          <COL>
          <xsl:process select="UNITPRICE"/>
          </COL>
          <COL>
          <xsl:process select="NETCHANGE"/>
          </COL>
     </COL>
     </xsl:for-each>
</TABLE>

**has** to work with xt&xp. Really, it doesn't.
It also doesn't work, when attribute is added to NEWSSEARCHRS/TICKER as
well, i.e.
<NEWSSEARCHRS>
     <EXCHANGE>NASDAQ</EXCHANGE>
     <TICKER  ATT-TICKER="MSFT">MSFT</TICKER>
     <NEWSHEADER>
          <DATE>25-10-1998</DATE>
          <HEADLINE>M'soft Asks Court To Keep Pre-Trial Testimony
Closed</HEADLINE>
     </NEWSHEADER>
</NEWSSEARCHRS>
 and, respectively
test="../NEWSSEARCHRS/TICKER/[attribute(ATT-TICKER)='{./TICKER
[attribute(ATT-TICKER)}}']"

BTW, it concerns only xt&xp. Koala XSL-engine (0.7b4) doesn't process
<xsl:if> at all (?).



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread