|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Newbie: easy one.
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
|
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








