[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?

Subject: Is there a real XSl guru out there who know how to do this?
From: Kenneth Li <kli@xxxxxxxxxxxxxxxx>
Date: Tue, 27 Oct 1998 20:28:08 -0500
xsl guru
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


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.