harmmeijer
Programmer
Could anybody provide me with a full code:
I have an xml document:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Catalog.xsl"?>
<Root >
<Products ProductName="Aniseed Syrup" UnitPrice="10" UnitsInStock="13"/>
</Root>
I have an xsl document:
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet xmlns:xsl=" version="1.0">
<xsl:template match = '*'>
<xsl:apply-templates />
</xsl:template>
<xsl:template match = "Products">
<TR>
<TD><xsl:value-of select = '@ProductName' /></TD>
<TD align="right" width="75"><B><xsl:value-of select = "format-number(@UnitPrice, '#.00')" /></B></TD>
<td align="right" width="75"><xsl:value-of select='@UnitsInStock' /></td>
</TR>
</xsl:template>
<xsl:template match = '/'>
<HTML>
<HEAD>
<TITLE>Northwind Traders Online Catalog</TITLE>
<STYLE>th { background-color: #CCCCCC }</STYLE>
</HEAD>
<BODY>
<TABLE border='0' width="*">
<TR><TH colspan='3'>Products</TH></TR>
<TR><TH>Product Name</TH><th>Price</th><th>Quantity On Hand</th></TR>
<xsl:apply-templates select = 'Root' />
</TABLE>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
I gues the part
xmlns:xsl="inports a namespace, I think it defignes things like "template match = "...""
Does anybody know how to make a namespace file like this (is is java code?)?
What is the extention of a file like this?
Where can I get good sample code so I can make my own namespace file?
I do not know anything about xml, xsl so DO I MAKE SENCE and if not please explain to me.
I have an xml document:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Catalog.xsl"?>
<Root >
<Products ProductName="Aniseed Syrup" UnitPrice="10" UnitsInStock="13"/>
</Root>
I have an xsl document:
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet xmlns:xsl=" version="1.0">
<xsl:template match = '*'>
<xsl:apply-templates />
</xsl:template>
<xsl:template match = "Products">
<TR>
<TD><xsl:value-of select = '@ProductName' /></TD>
<TD align="right" width="75"><B><xsl:value-of select = "format-number(@UnitPrice, '#.00')" /></B></TD>
<td align="right" width="75"><xsl:value-of select='@UnitsInStock' /></td>
</TR>
</xsl:template>
<xsl:template match = '/'>
<HTML>
<HEAD>
<TITLE>Northwind Traders Online Catalog</TITLE>
<STYLE>th { background-color: #CCCCCC }</STYLE>
</HEAD>
<BODY>
<TABLE border='0' width="*">
<TR><TH colspan='3'>Products</TH></TR>
<TR><TH>Product Name</TH><th>Price</th><th>Quantity On Hand</th></TR>
<xsl:apply-templates select = 'Root' />
</TABLE>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
I gues the part
xmlns:xsl="inports a namespace, I think it defignes things like "template match = "...""
Does anybody know how to make a namespace file like this (is is java code?)?
What is the extention of a file like this?
Where can I get good sample code so I can make my own namespace file?
I do not know anything about xml, xsl so DO I MAKE SENCE and if not please explain to me.