Articles   Dev Forums   Personalize   Favorites   Member Login        Active Users:  646
DevASP - ASP and XML Articles, Samples, Toturials, Sample Chapters and resources for Developers Friday, July 18, 2008
Home
Articles & Samples
Dev Search
Dev Forum
Add a Listing
Sample Chapters
Directory Feed
Link to US
Contact

Search Directory
Applications
Articles & Samples
Components
Community
Database
Developer Sites
Downloads
Hosting Services
Introduction
Knowledge Base
Sample Chapters
WebCasts

Trusted by over 7 million customers!
ASP Directory
Applications
Articles & Samples
Components
Developer Sites
Knowledge Base
Sample Chapters
WebCasts
XML Directory
Applications
Articles & Samples
Developer Sites
Error, Bugs & Fixes
Downloads
Introduction
Knowledge Base
Sample Chapters
WebCasts

Sample Chapter from
Professional XSL


Book Title: Professional XSL
Published by: Wrox Publication
Chapter Number: 3
Chapter Title: XSLT Basics
Author: Wrox Author Team
Price $: 41.99
ISBN: 1861005563
Buy It Now: Click here
Additional Info: Wrox Publication
Sample Chapter From
Book
Table of Contents

XSLT Basics

In this chapter, we will build on Chapters 1 and 2 to provide you with enough information to start building useful XSLT stylesheets. I will introduce a number of the elements that make up the language, providing examples of their use. We will also look at a few of the functions built into the language and see how XSLT manages namespaces, whitespace and some other important issues.

 

To illustrate the concepts I introduce, we will work mainly with two documents, one that is textual in content, and one that is more data oriented. The former is a Shakespeare play (Hamlet), and the latter is a book catalog that could, for example, have been extracted from a relational database. Both documents are given in the code download for the chapter.

 

By the end of the chapter, you will:

 

q        have a clearer picture of the processing model of XSLT

q        know the difference between push and pull model stylesheets, and when to use each

q        understand the use of the most important XSLT elements

q        understand the use of a few of the built-in functions

q        understand the basic rules of how XSLT copes when there are conflicts in the stylesheet

q        know more about the built-in template rules and how to over ride them

XSLT Processing

Before delving into the detail of XSLT elements and functions, let's start by looking in detail at how an XSLT processor, such as XT, Saxon or MSXML3, processes a document. We will look at the model from an abstract view – becoming an XSLT processor ourselves and working our way through a document and stylesheet. We'll then look at the two fundamental ways in which this model can be used.

 

More information on these processors can be found in Appendix E. Later in this chapter I will be mainly using XT to process XSLT stylesheets, but any of these processors can be used. XT is similar in use to Instant Saxon, which was introduced in Chapter 2.



DevASP - Privacy - Disclaimer
Copyright © 2008 DevASP.com