[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Using XML/XSLT for forms in .Net

Subject: RE: Using XML/XSLT for forms in .Net
From: Pieter Reint Siegers Kort <pieter.siegers@xxxxxxxxxxx>
Date: Thu, 10 Feb 2005 09:01:44 -0600
xml add key
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:  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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.