473,651 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

simple xsl for creating aspx page

Hello

I know nothing of XSL but was wondering if it was possible to do the
following:

Given an XML template:

<template>
<register TagPrefix="what ever" TagName="Templa te"
src="Common/Template.ascx" />
<page language="c#" />
<usercontrol tag="whatever:T emplate" ID="header" Runat="server"
Type="header" />
<form id="form1" method="post" runat="server">
<h1>some text here</h1>
testing
</form>
<usercontrol tag="whatever:T emplate" ID="footer" Runat="server"
Type="footer" />
</template>

I want to write a simple XSL file that:

(1) Changes the register and page elements from elements to directives

(2) Copy the rest as it is

so the output is:

<%@ Register TagPrefix="what ever" TagName="Templa te"
src="Common/Template.ascx" %>
<%@ Page language="c#" %>
<page language="c#" />
<usercontrol tag="whatever:T emplate" ID="header" Runat="server"
Type="header" />
<form id="form1" method="post" runat="server">
<h1>some text here</h1>
testing
</form>
<usercontrol tag="whatever:T emplate" ID="footer" Runat="server"
Type="footer" />

Any help would be fantastic

Thanks
Nov 12 '05 #1
0 999

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1093
by: Bonj | last post by:
I'm mainly experienced in VB6, haven't really got to grips with .NET very much. I'd like to create, more as a practice project than anything, a simple ASP.NET web application that will just do some fairly simple tasks, such as displaying a crystal report as a chart, changing its dataset based on a button clicked, etc. I want to make it work in C# as it seems to me to be the best .NET language. However I don't really have any idea where to...
0
1110
by: Flemming Jensen | last post by:
The idea behind this code is to standardize all my webpages in an application to look the same by inheriting the pages from a userdefined class. But it gives me problems regarding sessionstate... Try creating a new asp.net web application in Visual Studio .NET 2003 on Framework 1.1 using VB language Call the project testform add a new webform called "atest.aspx"
4
1738
by: mslyh | last post by:
Is there a way to instantiate a page object in code and redirect the response to it? I know that this is how the actual ASP.NET engine ultimately does it under the covers. However, is this available to the developer? I want to be able to use page inheritance to create a centralized page controler without the need to build .aspx files for every page (since they would be pretty much empty shells anyway). Here is a sample of what I "want" to do....
1
1049
by: Wernfried Schwenkner | last post by:
I've run an site with beta 1.0 without any problems. Today I've installed Beta 2.0 and can't even run a simple empty page. Creating an empty site, adding a Default.aspx form. This runs on the temporary IIS started from within the studion. But copying the site to the real IIS site, I get the error Der Typ 'Default_aspx' konnte nicht geladen werden. (Translation: The type '_Default' could not be loaded) within the line
7
2280
by: abcd | last post by:
I am trying to set up client machine and investigatging which .net components are missing to run aspx page. I have a simple aspx page which just has "hello world" printed.... When I request that page like http://machinename/dir1/hellp.aspx instead of running that page it starts downloding ...whats missing here ....why the aspx engine not running the page....
0
1227
by: Alan Silver | last post by:
Hello, I am having a problem setting and resetting cookies. I'm sure I just doing something really stupid as this is such a basic issue, but I can find any answer. Please can someone help me? The following code is a complete page that demonstrates my problem. If you save this as an .aspx and load it in a browser, it tells you it is creating the cookie. If you reload the page, it tells you it is changing the value. If you reload it...
7
2300
by: Nathan Sokalski | last post by:
I am having a problem saving an image with the same name it originally had. I have two similar versions of my code, one in which I close the FileStream used to open the original image before saving, the other in which I close the FileStream afterwards, although both return the same error. Here are the two versions of the code and the errors they each return (NOTE: I rebooted immediately before running each of these versions so that I knew they...
2
4229
by: Sasquatch | last post by:
I'm having trouble creating a simple login page using the asp:login control. I followed some instructions in a WROX book, "Beginning ASP.NET 2.0," and the instructions are very straight forward, but it won't work for me. Here's what I did. 1. Created a new folder named "testlogin" 2. Turned that folder into an application using the IIS properties 3. Created two new web form pages, /testlogin/default.aspx and /testlogin/login.aspx...
9
5987
by: Joe Penora | last post by:
Hi All, How to add the HTML script when creating new ASPX page. After it is done I may need to add some Meta tags etc... but the html script is not there. Is there an option in the ASP.NET that WHEN creating a new aspx page, then it will generate that basic HTML scrip as well. Regards,
4
3309
by: RN1 | last post by:
An ASPX page, named LinkButton.aspx, has a single LinkButton & nothing else. The code is very simple: <form runat="server"> <asp:LinkButton ID="lnk" PostBackUrl="Page1.aspx" Text="CLICK" runat="server"/> </form> When I run the above code in my local; (Intranet) IIS server, then when the LinkButton is clicked, the user is taken to Page1.aspx but
0
8795
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8695
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8460
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8576
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7296
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6157
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5609
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2696
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1906
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.