I have some xml data that I want to turn into an html report.
I wrote some xsl (my first xsl) and tested it in XMLSpy. It transformed my
xml to html pretty much how I wanted (I'm still trying to understand table
formatting, like table width in xsl, my tables aren't as wide as I'm
specifying).
I want to use this transform in my c#/winforms/.net application
I loaded some sample xml using XmlDocument
Created an XPathNavigaor
Loaded the xsl into XslTransform
and used a XmlTextWriter along with XslTranform to write the html
I have a handful of newbie questions
a. The resulting html won't render in a browser but it will render in
Dreamweaver
My guess is because of the inital "header" that's written which is
<html xmlns:xs="
http://www.w3.org/2001/XMLSchema" xmlns:fn="
http://www.w3.org/2005/02/xpath-functions" xmlns:xdt="
http://www.w3.org/2005/02/xpath-datatypes"> there isn't info written like
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
How is this intial html info being written and is there a way to control
that from xsl?
b. The html doesn't have any CR or LF how can I get the
XMLTextWriter/XslTransform to format the html better?
c. I'm just doing proof of concept right now, so I'm reading the sample xml
from a file but in reality I will be creating the xml at the time I'm going
to also be transforming it. Is there a way to use something like
XmlTextWriter (and get the XmlDocument??) with the xml in it since I'll be
using XmlTextWriter to build and write the xml
thanks
mike