Considering the following XSLT, which I know is not correct.
I want to extract some data from the database into an XML file and using this XSLT to obtain a HTML table. I am doing the following.
- extract in a
IDataReader
- an ojbect[3] containing:"ALFKI"
"Obere str.57"
- a
byte[14205]
(id and picture)
- I load the
IDataReader
into aMemoryStream
- I apply the XSL to the
MemoryStream
, I obtain a string as the result
The problem is that I can't handle the picture situation - in my database I have the actual picture, not the path to it.
What are the modifications to be done?
<xsl:stylesheet
xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
version='1.0'
>
<xsl:template match='CustomersOrdersDataSet'>
<STYLE>
BODY {
font-family: verdana;
font-size: 9pt;
}
TD {
font-size: 8pt
}
</STYLE>
<TABLE WIDTH='100%' BORDER='0'>
<xsl:apply-templates select='CustomersOrders' />
</TABLE>
</xsl:template>
<xsl:template match='CustomersOrders'>
<TABLE WIDTH='100%' HEIGHT='100' BORDER='0'>
<TR>
<TD valign='top'>
<B>Customer ID:</B>
</TD>
<TD valign='top'>
<xsl:value-of select='CustID' />
</TD>
</TR>
<TR>
<TD valign='top'>
<B>Customer Address:</B>
</TD>
<TD valign='top'>
<xsl:value-of select='CustomerAddress' />
</TD>
</TR>
<TR>
<TD valign='top'>
<B>Picture:</B>
</TD>
<TD valign='top'>
<xsl:value-of select='Picture' />
</TD>
</TR>
</TABLE>
</xsl:template>
</xsl:stylesheet>