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

Newbie: easy one.

Subject: Newbie: easy one.
From: "Rudi Starcevic" <rudi@xxxxxxxxxxxx>
Date: Tue, 8 Jul 2003 23:58:39 +1000
ozdot
Hi,

Sorry for bringing such elementarty questions
but I've been trying to figure this out for about an
hour without joy so I thought I'd ask.

I'm sending this xml packet straight to the web browser
which the browser parses and formats:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="webapps.xsl"?>
<webapps xmlns:webapps="http://www.rudistarcevic.com">
	<website name="Wwnames">
		<address>http://www.wwnames.com</address>
		<address>http://www.ozdot.com</address>
	</website>
</webapps>

Here is my stylesheet, webapps.xsl, which is not outputing a nice table
of 3 rows:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:template match="/">
<html>
<head><title>Web applications list</title></head>
<body>
<xsl:for-each select="webapps/website">
 <table border="1" summary="Web Application Table">
 <tr>
  <td>Site Name:</td>
  <td><xsl:value-of select="@name"/></td>
 </tr>

 <xsl:apply-templates/>

 </table>
 
</xsl:for-each>

</body>
</html>
</xsl:template>

<xsl:template match="webapps/website">
 <xsl:for-each select="address">
 <tr>
  <td>URL:</td>
  <td><xsl:value-of select="address"/></td>
 </tr>
 </xsl:for-each>
</xsl:template>

</xsl:stylesheet>

Instead of seeing 3 rows like:
Site Name: Wwnames
URL: www.wwnames.com
URL: www.ozdot.com

I see in IE, something like:
Site Name: Wwnames
http://www.wwnames.comhttp://www.ozdot.com

I've tried several combinations in my second xsl:template to 
match the 2 url's for this site without success yet.
The xml is ment to represent a web site with more than on URL.

Any Advice appreciated.

Thanks
Kind regards
Rudi.








 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.