December 28, 2009

XSLT and XPath

Filed under: — admin @ 6:24 am

Altova Education partner This XSL course is the last two days of the five-day XML training course, but it can be taken independently of the five-day package.

You are currently working with XML - maybe you’ve defined a language with a DTD, maybe you’re editing XML documents regularly, or maybe you’re prototyping a project - but you need to expand your knowledge of the W3C XML languages. The Intermediate client-side XML class examines XPath and XSLT. XSLT is used to transform your XML documents into a format appropriate for particular applications (e.g., browsers) such as HTML or text. XPath allows you to specify a location in the referenced XML document to indicate which content or information you would like to use or extract. XPath provides a number of functions that may be applied to calculate, limit, or filter the query results.

XSL - The Extensible Style Language

XSL or Extensible Style Language is really a collection of several different languages including XSLFO and XSLT incorporating XPath. Because of the complexity of XSLFO, we focus on XSLT and XPath. During your introduction to XSL, you will learn about:

  • the XSL family - its history, goals, state of development and common uses
  • the notion of ‘transformation’ - specifically transforming XML into HTML
  • modelling the XML document : nodes, paths and trees (ancestors, siblings, descendents)
    * types of XSL processors

XSLT Templates

The transformation process relies upon templates that you define in your XSL. The XSL processor then matches portions of the XML that you dictate and replaces these portions with the code you described in your template, resulting in a brand new file. We examine the XSL templates and how the transformation process proceeds. In this course you will learn:

* establishing XSLT templates
* basic XPath for designating matches
* how to extract data from XML elements to be placed in the templates
* how to extract data from XML element attributes
* how to use a simple XSL processor
* how to define the output type for your new document
* to transform XML to text
* to transform XML to HTML
* about applying all applicable templates
* about selecting specific templates for application

XSLT Elements

XSLT’s power becomes more evident when we introduce several useful XSL elements. The folks at the W3 clearly sought a robust language when crafting XSL and provided tools for conditionals, loops, sorting, selection by REGEX and more. In this course you will learn about:

* testing and filtering results using XPath and XSLT conditionals
* XSLT conditionals including XSL:IF and XSL:CHOOSE
* XSLT simple for-each loops
* how to sort the output of a for each loop
* how to create a secondary (sub) sort of the data
* how to add text to the resulting document

XPath in Use

XPath’s power truly emerges when specifying complex node paths and utilizing XPath functions. In this course you will learn:

* how to specify a context, parent, child and attribute node
* some valuable XPath functions
* how to count the number of items in a node-set
* how to perform basic math functions on numerical data
* how to generate id’s for each node in a node-set
* about using XPath to determine the element node’s name and whether it has content
* when and where an XPath function may be called

XSLT in Action

Our final segment illustrates some useful implementations of XSLT. Specifically, we will create a table of contents for our HTML output. In this course you will learn:

* how to create and apply multiple templates for the same content
* when to call a template and when to apply a template
* how to add an attribute to an element in the resulting document
* how to create a table of contents

Prerequisites:

* Intermediate HTML or equivalent experience
* Intro to JavaScript or equivalent experience
* Intro to XML or equivalent experience

source : http://www.academyx.com/training/san_francisco/xml/intermediate/

XSL Transformations (XSLT)

Filed under: — admin @ 6:24 am

This specification defines the syntax and semantics of XSLT, which is a language for transforming XML documents into other XML documents.XSLT is designed for use as part of XSL, which is a stylesheet language for XML. In addition to XSLT, XSL includes an XML vocabulary for specifying formatting. XSL specifies the styling of an XML document by using XSLT to describe how the document is transformed into another XML document that uses the formatting vocabulary.

XSLT is also designed to be used independently of XSL. However, XSLT is not intended as a completely general-purpose XML transformation language. Rather it is designed primarily for the kinds of transformations that are needed when XSLT is used as part of XSL.
Status of this document

This document has been reviewed by W3C Members and other interested parties and has been endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited as a normative reference from other documents. W3C’s role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.

The list of known errors in this specification is available at http://www.w3.org/1999/11/REC-xslt-19991116-errata.

Comments on this specification may be sent to xsl-editors@w3.org; archives of the comments are available. Public discussion of XSL, including XSL Transformations, takes place on the XSL-List mailing list.

The English version of this specification is the only normative version. However, for translations of this document, see http://www.w3.org/Style/XSL/translations.html.

A list of current W3C Recommendations and other technical documents can be found at http://www.w3.org/TR.

This specification has been produced as part of the W3C Style activity.

source : http://www.w3.org/TR/xslt


 
Indelv.com is for sale!
 
ERP systemen
Alle ERP-systemen op een rij, compleet met ERP-nieuws en ERP-software informatie.
www.ERPcentraal.nl
ERP systemen
Alle ERP-systemen op een rij.
www.erpmatrix.nl

Indelv.com is for sale!

Quick Links
Our Friends
Cool Places
Visit also
About Us