Click here to Skip to main content
15,886,756 members
Articles / Programming Languages / C#

Multiple Document Output from XSL Transformations using Parameters and C#

Rate me:
Please Sign up or sign in to vote.
3.90/5 (8 votes)
20 Apr 20049 min read 56.1K   1.2K   21  
A small C# application to demonstrate the use of parameters in producing a number of static web-pages from a single XML, XSL pair.
<?xml version="1.0" encoding="utf-8" ?>
<links>
	<link id="Ruth">
		<block>
			<![CDATA[
			<p style="margin-left: 26">
			<font face="Arial">
			<strong>
				Ruth obeys God and finds Love (Ruth)   
				<font color="#008000"><b>»</b></font>
			</strong>
			</font> 
			download as |

			<a href="http://www.examplesite.com/ruth-lbw.htm">HTML</a> | 
			<a href="http://www.examplesite.com/ruth-lbw.rtf">RTF</a> 
			|
			<br />
			A commentary on the book of Ruth. March 2002.
			</p>
			]]>
		</block>
		<block>
			<![CDATA[
			<p style="margin-left: 26">
			<font face="Arial">
			<strong>
			There is a Redeemer (Ruth)   
			<font color="#008000"><b>»</b></font></strong></font> 
			download as |

			<a href="http://www.examplesite.com/ruth-law.htm">HTML</a> |
			<a href="http://www.examplesite.com/ruth-law.rtf">RTF</a> 				|
			<p style="margin-left: 26; margin-top: 0">
			A commentary on the book of Ruth (1200 words). March 2002.
			</p>
			]]>
		</block>
		<block>
			<![CDATA[
				<p style="margin-left: 26">
				<strong><span style='font-family:Arial'>
				A Stranger Finds Love in Bethlehem (Ruth) 
				<span style='color:green'>»</span> </span>
				</strong>
				download as | 
				<a href="http://www.examplesite.com/ruth-taw.htm">HTML</a> | 
				<a href="http://www.examplesite.com/ruth-taw.rtf">RTF</a> |
				<br>
				A Translators Help on the book of Ruth. March 2003.
				</p>
			]]>
		</block>

	</link>
	<link id="Mark">
		<block>
			<![CDATA[
			<p style="margin-left: 26">
			<strong><span style='font-family:Arial'>
			The Good News about the Kingdom of
			God, as Mark told it (Mark)
			</span></strong> 
			<strong><span style='font-family:Arial;color:green'>»</span></strong> 
			download as |
			<a href="http://www.examplesite.com/mark-taw.htm">HTML</a> |
			<a href="http://www.examplesite.com/mark-taw.rtf">RTF</a> |
			<br>
			A Translators Help on Mark's Gospel. April 2002.
			</p>
			]]>
		</block>
		<block>
			<![CDATA[
			<p style="margin-left: 26">
			<font face="Arial">
			<strong>
			Mark's Good News (Mark) <font color="#008000"><b>»</b></font>
			</strong></font>
			download as | 
			<a href="http://www.examplesite.com/mark-lbw.htm">HTML</a> | 
			<a href="http://www.examplesite.com/mark-lbw.rtf">RTF</a> |
			<p style="margin-left: 26; margin-top: 0">
			A commentary on Mark's Gospel. November 2001.
			</p>
			]]>
		</block>
	</link>
	<link id="Luke">
		<block>
			<![CDATA[
			<p><font face="Arial">
			<strong><span style="font-family:Wingdings;color:blue">ü
			</span></strong></font>
			<strong><span style='font-family:Arial'>
			Hear this Good News for Everybody! (Luke) 
			<span style='color:green'>»</span></span>
			</strong> 
			download as | 
			<a href="http://www.examplesite.com/luke-taw.htm">HTML</a> |
			<a href="http://www.examplesite.com/luke-taw.rtf">RTF</a> |
			<p style="margin-left: 26; margin-top: 0">
			A Translators Help on Luke's Gospel. August 2002.
			</p>
			]]>
		</block>
		<block>
			<![CDATA[
			<p><font face="Arial"><strong>
			<span style="font-family:Wingdings;color:blue">ü
			</span>
			Luke's Good News (Luke)
			<font color="#008000"><b>»</b></font>
			</strong></font>
                        download as |
			<a href="http://www.examplesite.com/luke-lbw.htm">HTML</a> |
			<a href="http://www.examplesite.com/luke-lbw.rtf">RTF</a> |
			<p style="margin-left: 26; margin-top: 0">
			A commentary on Luke's Gospel. June 2002.
			</p>
			]]>
		</block>
		<block>
			<![CDATA[
			<p style="margin-left: 26">
			<font face="Arial"><strong>
			Who is this Man? (Luke)  
			<font color="#008000"><b>»</b></font></strong></font>
			<font size="3">download as |
			<a href="http://www.examplesite.com/luke-qbw.htm"> HTML</a> |
			<a href="http://www.examplesite.com/luke-qbw.rtf"> RTF</a> |
			<br></font>
			Questions on the Gospel of Luke (2800 words). December 2003.
			</p>
			]]>
		</block>
	</link>
</links>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United Kingdom United Kingdom
Teacher: Maths and Computing, Secondary School.

First learnt to program in BASIC on an Amstrad CPC464 and then continued messing around with programs at university and ever since. Doesn't know a huge deal about any of it really but enjoys the challenge and is always keen to learn a new trick!

Comments and Discussions