I want to convert some xml to HTML, which has the following format:
<TR> <TD> col1 <TD> col2 <TD> col3 </TR>
Note: Output HTMLcomplete with optional closing tags omitted. This is problem and the reason this question exists.
The XSL snippet I'm using is:
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
doctype-system='http://www.w3.org/TR/html4/strict.dtd'
doctype-public='-//W3C//DTD HTML 4.01//EN'
indent='yes'
method='html'
/>
...
<xsl:for-each select="/">
<TR><TD><xsl:value-of select="col1"/><TD><xsl:value-of select="col2"/><TD><xsl:value-of select="col3"/></TR>
</xsl:for-each>
You can see that the guts of XSL match my desired HTML (wrapped for readability):
<TR> <TD><xsl:value-of select="Column1"/>
<TD><xsl:value-of select="Column2"/>
<TD><xsl:value-of select="Column3"/> </TR>
Note: Those of you who know the error I get from XSLT: hopefully already know the answer.
XSL (, , xml), :
"TR" "TD".
. :
<TD><xsl:value-of select="Column3"/> </TR>
i TD TR. , :
xml HTML, , HTML xml?
.
, , XSL (, ):
<TR> <TD><xsl:value-of select="col1"/></TD>
<TD><xsl:value-of select="col2"/></TD>
<TD><xsl:value-of select="col3"/></TD> </TR>
, xsl:output method='html', HTML </TD>, . , :
<TR><TD>col1</TD><TD>col2</TD><TD>col3</TD></TR>
, , , . , . , "" , , :
<BR/>
<BR></BR>
<BR> HTML, , HTML , <BR>.