RE: [xsl] Using XML/XSLT for forms in .Net

Subject: RE: [xsl] Using XML/XSLT for forms in .Net
From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Thu, 10 Feb 2005 09:01:44 -0600
Hi Julian,

> Interesting - I have been looking at that, surely there is an issue with
the app picking up the changes in the 
> web config - do you need to restart it?

Sorry, I meant app.config. I do not restart the application, no. I use a
trick - I update app.config, but also the dynamically generated
<appName>.exe.config (which is just an exact copy) so it can be used
directly. Not recommended by MS though, but it is useful to me and it works.
Should work for web.config also, only permissions to write would be a small
issue because of the different security in web apps.

Basically I use a xml source that matches app.config, like this:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="BasePath" value="E:\MyWB5\" />
    <add key="lstTOC.MultiColumn" value="False" />
    <add key="strSubFolderImg" value="figs" />
    <add key="strServerIntranetAleph" value="http://edtimd041sl/libros/"; />
    <add key="strServerIntranetAlephUNC" value="\\edtimd041sl\home\libros"
/>
    <add key="strBookTitle" value="XSLT and XPATH A Guide to XML
Transformations" />
  </appSettings>
</configuration>

Then, the XSL could be like this:

<?xml version='1.0' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">

<xsl:output method="xml" indent="yes" encoding="utf-8" />
	
<xsl:param name="strBookTitle" />

<xsl:template match="/">
	<xsl:apply-templates select="configuration">
	</xsl:apply-templates>
</xsl:template>

<xsl:template match="configuration">
<configuration>
	<appSettings>
		<add key="BasePath" value="E:\MyWB5\" />
		<add key="lstTOC.MultiColumn" value="False" />
		<add key="strSubFolderImg" value="figs" />
    	<add key="strServerIntranetAleph" value="http://edtimd041sl/libros/";
/>
    	<add key="strServerIntranetAlephUNC"
value="\\edtimd041sl\home\libros" />
		<add key="strBookTitle">
			<xsl:attribute name="value">
		 		<xsl:value-of select="$strBookTitle" />
			</xsl:attribute>
		</add>
	</appSettings>
</configuration>
</xsl:template>

</xsl:stylesheet>

The only thing I change is the book title.

I plan to post the .NET code to perform the two XSLT's on my website today
or tomorrow, check back later on www.pietsieg.com.

Cheers,
<prs/>
http://www.pietsieg.com

-----Original Message-----
From: Julian Voelcker [mailto:asp@xxxxxxx] 
Sent: Thursday, February 10, 2005 5:35 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Using XML/XSLT for forms in .Net

Hi Pieter,

> Great info about XAML and MyXAML, thanx

I have used it for an app where we regularly needed to update the structure
of a form and the code behind it, used MyXAML file with form structure and
processing code in it and then provided updates across the web.

Would be great for web forms that could be just added as and when required
to a CMS.

> dynamically updating web.config for example

Interesting - I have been looking at that, surely there is an issue with the
app picking up the changes in the web config - do you need to restart it?
--
Cheers,

Julian Voelcker
United Kingdom

Current Thread