Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Is it even possible in XSL/XSLT?

From: "infiniti" <jainamber@-----.--->
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



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent