|
Subject: Matching nodes in the default namespace From: "John E. Simpson" <simpson@xxxxxxxxxxx> Date: Thu, 28 Sep 2000 14:33:51 -0400 |
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <!--catalog last updated 2000-11-01--> <catalog xmlns="http://www.example.com/catalog/"> <book id="bk101"> <author>Some author</author> <title>Some Title</title> <genre>Some genre</genre> <price>Some price</price> <publish_date>Some date</publish_date> <description>Some description</description> </book> </catalog>
And here's test.xsl: <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/REC-html40" >
<xsl:template match="/">
<html>
<title>Book catalog</title>
<body>
<table border="1">
<tr>
<th>Author</th>
<th>Title</th>
<th>Genre</th>
<th>Price</th>
<th>Pub Date</th>
<th>Description</th>
</tr>
<xsl:apply-templates select="*"/>
</table>
</body>
</html>
</xsl:template> <xsl:template match="catalog">
<xsl:apply-templates/>
</xsl:template> <xsl:template match="book">
<tr>
<td><xsl:value-of select="author"/></td>
<td><cite><xsl:value-of select="title"/></cite></td>
<td><xsl:value-of select="genre"/></td>
<td><xsl:value-of select="price"/></td>
<td><xsl:value-of select="publish_date"/></td>
<td><xsl:value-of select="description"/></td>
</tr>
</xsl:template>| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: IE5.5 happy with xsl:import but, Joshua Allen | Thread | Re: Matching nodes in the default n, David Carlisle |
| Re: testing for several different c, Nick Browne | Date | RE: How to search for <, >, etc. in, Brian Young |
| Month |