Click here to Skip to main content
15,881,248 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 56K   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.
<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <SCRIPT LANGUAGE="JavaScript"><!--
		function openURL()
		{
			selInd = document.theForm.selectBook.selectedIndex;
			goURL = document.theForm.selectBook.options[selInd].value;
			top.location.href = goURL;
		}

		//--></SCRIPT>
  </head>
  <body background="images/background.jpg">
    <p>
      <img src="images/logo.gif" align="right" hspace="0" width="93" height="71" style="border-style: solid; border-color: #FFFFFF;">
    </p>
    <p>
      <font color="#008000" size="7" face="Arial">
        <b>Bible Reference Links<br></b>
      </font>
      <font color="#008000" size="3" face="Arial">
        <b>www.examplesite.com</b>
      </font>
    </p>
    <p>
      <img src="images/greenbar.gif" width="100%" height="7">
    </p>
    <form name="theForm">
      <p style="text-align:center;font-family: verdana;">
				Choose a book...
			</p>
      <p style="text-align:center;">
        <select name="selectBook" onChange="openURL();" size="1" style="width:150px;">
          <option value="index.html">Please Choose...</option>
          <option value="Ruth.html">Ruth</option>
          <option value="Mark.html">Mark</option>
          <option value="Luke.html">Luke</option>
        </select>
      </p>
    </form>
    <div style="text-align:left;">
      <p>
        <font color="#008000" size="7" face="Arial">
          <b>Ruth</b>
          <br>
        </font>
      </p>
      <p style="font-family: verdana;">Results:</p>
			<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>
			
			<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>
			
				<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>
			</div>
  </body>
</html>

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