20.01.2015 Views

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

Teach Yourself e.net - Syspro

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

XSLT Element<br />

xsl:stylesheet<br />

xsl:template<br />

xsl:text<br />

xsl:transform<br />

xsl:value-of<br />

xsl:variable<br />

xsl:when<br />

xsl:with-param<br />

Description<br />

This element must be the outermost element in an XSLT document<br />

and must contain a namespace associated with the XSLT<br />

specification and a version attribute.<br />

Defines a reusable template for producing output for nodes that<br />

match a particular pattern.<br />

Writes out the specified text to the result tree.<br />

This is used in the same manner as the xsl:stylesheet element.<br />

Writes out the value of the selected node to the result tree.<br />

This is used to declare and assign variable values that can be either<br />

local or global in scope.<br />

This is used as a child element of xsl:choose to perform multiple<br />

conditional testing. Similar to using case in a switch or Select<br />

statement.<br />

This is used in passing a parameter to a template that is called via<br />

xsl:call-template.<br />

By using these XSL attributes you will be able to transform and use the XmlOut data<br />

generated through the business objects used in your application. There is not enough space<br />

in this book to teach you all the in and outs of XSL transformations, so we would<br />

recommend that you use the basics that we have introduced in this chapter and supplement<br />

them with further reading. There are plenty of good articles and tutorials available on the<br />

inter<strong>net</strong>. For example, Chapter 17 of the XML Bible, Second Edition : XSL<br />

Transformations http://www.cafeconleche.org/books/bible2/chapters/ch17.html.<br />

6.2. Advanced ASP.NET Notes<br />

If you are already an expert in programming with ASP.NET please skip this section of the<br />

book.<br />

In this section of the chapter we deal with the use of codebehind. It may be useful for you<br />

to use an integrated development environment (IDE) like Microsoft Visual Studio .NET<br />

(or the free Express version, Visual Web Developer, which you can download from the<br />

Microsoft ASP.NET site [http://msdn.microsoft.com/vstudio/express/vwd/download/]).<br />

These programs present a drag-and-drop style interface to create the web form (.aspx)<br />

page and automatically set up codebehind (.aspx.vb or aspx.cs) controls and event<br />

handlers.<br />

6.2.1. Codebehind<br />

The use of ASP.NET allows a programmer to separate presentation (HTML) code from<br />

the application logic (in our case the C# or VB code) through the use of 'codebehind'. The<br />

6–12

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!