First attempt to code xml and use xsl for html output.
I took the W3 examples and modified them for my needs but I've missed something as looking at the xml in a browser does work correctly. None of the html code shows in the browser but the items info from the xml shows as long list.
What shows in browser:
SCALARADD Image1inSCALARADD Add one value to an image. A B A same as B allowed redLevel, greenLevel, blueLevel TRIMFILL Image1inTRIMFILL Trim an image and fill the trim area. A B A same as B allowed trimTopIndex, trimBottomIndex, trimLeftIndex, trimRightIndex fillRedLevel, fillGreenLevel, fillBlueLevel
Here is the xml file:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="routines.xsl"?>
<family>
<Image1in>
<routine>SCALARADD</routine>
<symbolic> Image1inSCALARADD </symbolic>
<operation> Add one value to an image. </operation>
<inputLayer1> A </inputLayer1>
<inputLayer2></inputLayer2>
<outputLayer1> B </outputLayer1>
<commentLayer> A same as B allowed </commentLayer>
<inputLong></inputLong>
<inputDouble> redLevel, greenLevel, blueLevel </inputDouble>
<outputLong></outputLong>
<outputDouble></outputDouble>
<comment> </comment>
</Image1in>
<Image1in>
<routine>TRIMFILL</routine>
<symbolic> Image1inTRIMFILL </symbolic>
<operation> Trim an image and fill the trim area. </operation>
<inputLayer1> A </inputLayer1>
<inputLayer2></inputLayer2>
<outputLayer1> B </outputLayer1>
<commentLayer> A same as B allowed </commentLayer>
<inputLong> trimTopIndex, trimBottomIndex, trimLeftIndex, trimRightIndex </inputLong>
<inputDouble> fillRedLevel, fillGreenLevel, fillBlueLevel </inputDouble>
<outputLong></outputLong>
<outputDouble></outputDouble>
<comment> </comment>
</Image1in>
</family>
Here is the xsl file:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body>
<h2>Routines</h2>
<table border="2">
<tr bgcolor="#7f7f7f">
<td style="text-align:left">Title</td>
<td style="text-align:left">Symbol</td>
<td style="text-align:left">Operation</td>
<td style="text-align:left">Input Layer 1</td>
</tr>
<xsl:for-each select="family/Image1In">
<xsl:sort select="routine"/>
<tr>
<td><xsl:value-of select="routine"/></td>
<td><xsl:value-of select="symbolic"/></td>
<td><xsl:value-of select="operation"/></td>
<td><xsl:value-of select="inputLayer1"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I appreciate any help someone can share. Spent whole weekend try to fix. Regards, RONC