|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Is there a real XSl guru out there who know how to do this?
Can any XSL expert, for example, James Clark, teach a beginner how to do
this?
I have this XML file:
****************************************************
<?xml version="1.0"?>
<LMP>
<STOCKQUOTERS>
<EXCHANGE>NASDAQ</EXCHANGE>
<TICKER>MSFT</TICKER>
<UNITPRICE>122.22</UNITPRICE>
<NETCHANGE>99.99</NETCHANGE>
</STOCKQUOTERS>
<STOCKQUOTERS>
<EXCHANGE>NASDAQ</EXCHANGE>
<TICKER>SUN</TICKER>
<UNITPRICE>31.50</UNITPRICE>
<NETCHANGE>32.99</NETCHANGE>
</STOCKQUOTERS>
<NEWSSEARCHRS>
<EXCHANGE>NASDAQ</EXCHANGE>
<TICKER>MSFT</TICKER>
<NEWSHEADER>
<DATE>25-10-1998</DATE>
<HEADLINE>M'soft Asks Court To Keep Pre-Trial Testimony
Closed</HEADLINE>
</NEWSHEADER>
</NEWSSEARCHRS>
</LMP>
*********************************************************
I want to write a XSL file that will produce following HTML file:
<TABLE>
<ROW>
<COL><IMG SRC="NEWS.ICO"/></COL> <!--How do I know there is a piece
of news-->
<COL>MSFT</COL>
<COL>122.22</COL>
<COL>99.99</COL>
</ROW>
<ROW>
<COL></COL>
<COL>SUN</COL>
<COL>31.50</COL>
<COL>32.99</COL>
</ROW>
</TABLE>
How could I write a condition to test if there is a piece of news for a
certain ticker symbol:
that is, 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>}
I am using James Clark's XT&Xp.
Any tips and hints will be greatly appreciated!!!
ken
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








