Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XSLT
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 3rd, 2003, 01:32 PM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default XLST vs Sever Controls

Is anyone else out there as frustrated as I am regarding the conflict between XLST and Server Controls.

What I mean is you can mix xslt output side by side with server controls but you cannot wrap xslt around the server controls. E.g. you would get an error if you put <asp:TextBox id="TextBox1" runat="server"></asp:TextBox> within an xslt file.

For me one of the biggest advantages of xslt is controlling how each page is laid out in one .xsl file, allowing me to standardize the look and feel across an entire web site. If I want to put server controls in the middle of this its just not possible. Therefore I have found myself using html controls inside the xslt but then I lose the benefits of rapid development with server controls.

If only the server controls could be rendered on the server after the xsl is transformed the problem would be solved.

If anyone else has an opinion in this area, or has figured out a work around I would be very interested to know.

Regards

Andy
__________________
Skin
Reply With Quote
  #2 (permalink)  
Old July 4th, 2003, 04:31 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

I don't know what server controls are, but why should you get an error placing <asp:TextBox id="TextBox1" runat="server"></asp:TextBox> inside xslt? Unless you haven't declared the asp namespace of course...
Reply With Quote
  #3 (permalink)  
Old July 4th, 2003, 12:27 PM
Authorized User
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by pgtips
 I don't know what server controls are, but why should you get an error placing <asp:TextBox id="TextBox1" runat="server"></asp:TextBox> inside xslt? Unless you haven't declared the asp namespace of course...
A server control is a control which asp.net renders into html. It provides an easy interface on the server end to interact with the control.

As you rightly said you get an error because asp is not a recognized namespace. But that's just it, I don't want to declare the namespace as it will then be output in the html as the following, which means nothing:
<asp:TextBox id="TextBox1" runat="server"></asp:TextBox>

Instead I want asp.net to recognize it as a server control and render it as html, but unfortunately it doesn't work like that.

Skin
Reply With Quote
  #4 (permalink)  
Old July 11th, 2003, 01:29 PM
Registered User
 
Join Date: Jun 2003
Location: , , Canada.
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

To get the rendering of server controls, you have to have your page compiled. That means your XSL is going to generate a file that you'll save on your server, and then execute as if you had hand coded it.

So basically, your XSL will just allow to write those files out faster. Server controls need to be run on the server.

The flow will look something like this:
XML + XSL -> page.aspx -> save to disk -> visit page.aspx

You might have to add the processing directive atop the page in your output to get your page compiled properly.

Good luck,
Mike
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Sever pushpa All Other Wrox Books 0 February 22nd, 2007 07:01 AM
how to use pagination in xsl or xlst vijayanmsc XSLT 1 June 6th, 2006 06:07 AM
XLST Multiple Foreach deepsweech XSLT 3 June 20th, 2005 09:46 AM
XLST transformNode problem beyondtron Classic ASP XML 0 February 4th, 2004 04:52 PM
Sever has not yet been opened ravee789 Crystal Reports 2 October 20th, 2003 06:56 AM



All times are GMT -4. The time now is 06:08 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.