![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Is it even possible in XSL/XSLT? Is it even possible in XSL/XSLT?To: NULL Date: 11/6/2006 11:13:00 AM Hi, Is it possible to save the html output(s) of an xsl transformation to the hard drive? I am transforming this sample xml file with this xsl file and want to save each table in a separate html file on my machine (does not need to be done in the browser). XML file: <?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="people.xsl"?> <PEOPLE> <PERSON> <NAME>Mark Wilson</NAME> <ADDRESS>911 Somewhere Circle, Canberra, Australia</ADDRESS> <TEL>(++612) 12345</TEL> <FAX>(++612) 12345</FAX> <EMAIL>Mark.Wilson@s...</EMAIL> </PERSON> <PERSON> <NAME>Tracey Wilson</NAME> <ADDRESS>121 Zootle Road, Cape Town, South Africa</ADDRESS> <TEL>(++2721) 531 9090</TEL> <FAX>(++2721) 531 9090</FAX> <EMAIL>Tracey.Wilson@s...</EMAIL> </PERSON> <PERSON> <NAME>Jodie Foster</NAME> <ADDRESS>30 Animal Road, New York, USA</ADDRESS> <TEL>(++1) 3000 12345</TEL> <FAX>(++1) 3000 12345</FAX> <EMAIL>Jodie.Foster@s...</EMAIL> </PERSON> </PEOPLE> XSL File: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template match="/"> <xsl:for-each select="PEOPLE/PERSON"> <TABLE BORDER="2"> <TR> <TD>Name</TD> <TD>Address</TD> <TD>Tel</TD> <TD>Fax</TD> <TD>Email</TD> </TR> <TR> <TD><xsl:value-of select="NAME"/></TD> <TD><xsl:value-of select="ADDRESS"/></TD> <TD><xsl:value-of select="TEL"/></TD> <TD><xsl:value-of select="FAX"/></TD> <TD><xsl:value-of select="EMAIL"/></TD> </TR> </TABLE> </xsl:for-each> </xsl:template> </xsl:stylesheet> As you will notice, this will generate the following output. <?xml version="1.0" encoding="UTF-16"?> <TABLE BORDER="2"><TR><TD>Name</TD><TD>Address</TD><TD>Tel</TD><TD>Fax</TD><TD>Email</TD></TR><TR><TD>Mark Wilson</TD><TD>911 Somewhere Circle, Canberra, Australia</TD><TD>(++612) 12345</TD><TD>(++612) 12345</TD><TD>Mark.Wilson@s...</TD></TR></TABLE> <TABLE BORDER="2"><TR><TD>Name</TD><TD>Address</TD><TD>Tel</TD><TD>Fax</TD><TD>Email</TD></TR><TR><TD>Tracey Wilson</TD><TD>121 Zootle Road, Cape Town, South Africa</TD><TD>(++2721) 531 9090</TD><TD>(++2721) 531 9090</TD><TD>Tracey.Wilson@s...</TD></TR></TABLE> <TABLE BORDER="2"><TR><TD>Name</TD><TD>Address</TD><TD>Tel</TD><TD>Fax</TD><TD>Email</TD></TR><TR><TD>Jodie Foster</TD><TD>30 Animal Road, New York, USA</TD><TD>(++1) 3000 12345</TD><TD>(++1) 3000 12345</TD><TD>Jodie.Foster@s...</TD></TR></TABLE> What I am trying to achieve is to save the individual table html into it's own html file as [name].html. I am using vb.net for the transformation. Is it possible to do? Thanks, Amber | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
