XSLT: Difference between revisions

The educational technology and digital learning wiki
Jump to navigation Jump to search
Line 3: Line 3:
== Definition ==
== Definition ==


{{quotation|XSLT is designed to transform XML documents into other XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one}} ([http://en.wikipedia.org/wiki/Xslt Wikipedia], retrieved 20:03, 30 May 2007 (MEST)).
{{quotation|XSLT is designed to transform XML documents into other XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one}} ([http://en.wikipedia.org/wiki/Xslt Wikipedia], retrieved 20:05, 30 May 2007 (MEST)).


{{quotation|A transformation expressed in XSLT is called a stylesheet. A stylesheet contains a set of template rules. A template rule has two parts: a pattern which is matched against nodes in the source tree and a template which can be instantiated to form part of the result tree. This allows a stylesheet to be applicable to a wide class of documents that have similar source tree structures.}}
{{quotation|A transformation expressed in XSLT is called a stylesheet. A stylesheet contains a set of template rules. A template rule has two parts: a pattern which is matched against nodes in the source tree and a template which can be instantiated to form part of the result tree. This allows a stylesheet to be applicable to a wide class of documents that have similar source tree structures.}}
([http://www.w3.org/TR/xslt XSL Transformations (XSLT)], retrieved 20:03, 30 May 2007 (MEST))
([http://www.w3.org/TR/xslt XSL Transformations (XSLT)], retrieved 20:05, 30 May 2007 (MEST))


{{quotation | A transformation expressed in XSLT describes rules for transforming a source tree into a result tree. The transformation is achieved by associating patterns with templates. A pattern is matched against elements in the source tree. A template is instantiated to create part of the result tree. The result tree is separate from the source tree. The structure of the result tree can be completely different from the structure of the source tree. In constructing the result tree, elements from the source tree can be filtered and reordered, and arbitrary structure can be added.}}([http://www.w3.org/TR/xslt XSL Transformations (XSLT)], retrieved 20:03, 30 May 2007 (MEST))
{{quotation | A transformation expressed in XSLT describes rules for transforming a source tree into a result tree. The transformation is achieved by associating patterns with templates. A pattern is matched against elements in the source tree. A template is instantiated to create part of the result tree. The result tree is separate from the source tree. The structure of the result tree can be completely different from the structure of the source tree. In constructing the result tree, elements from the source tree can be filtered and reordered, and arbitrary structure can be added.}}([http://www.w3.org/TR/xslt XSL Transformations (XSLT)], retrieved 20:05, 30 May 2007 (MEST))
 
This page just provides a few links ....


== Tutorial ==
== Tutorial ==
Line 47: Line 49:


== Tutorials  ==
== Tutorials  ==
=== Introductory Tutorials ===


* [http://www.nwalsh.com/docs/tutorials/xsl/xsl/slides.html XSL Concepts and Practical Use ] by Paul Grosso and Norman Walsh
* [http://www.nwalsh.com/docs/tutorials/xsl/xsl/slides.html XSL Concepts and Practical Use ] by Paul Grosso and Norman Walsh
Line 80: Line 84:
* [http://www.jenitennison.com/xslt/index.html Jeni's XSLT Pages] Various very useful hints (mostly from postings to the XSL-List)
* [http://www.jenitennison.com/xslt/index.html Jeni's XSLT Pages] Various very useful hints (mostly from postings to the XSL-List)
* http://en.wikipedia.org/wiki/XSLT_elements XSLT elements] List of XSLT elements at Wikipedia. This is a good page once you know your [[XSLT Tutorial - Basics|XSLT Basics]]
* http://en.wikipedia.org/wiki/XSLT_elements XSLT elements] List of XSLT elements at Wikipedia. This is a good page once you know your [[XSLT Tutorial - Basics|XSLT Basics]]


=== XSLFO Tutorials ===
=== XSLFO Tutorials ===

Revision as of 19:05, 30 May 2007

Draft

Definition

“XSLT is designed to transform XML documents into other XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one” (Wikipedia, retrieved 20:05, 30 May 2007 (MEST)).

“A transformation expressed in XSLT is called a stylesheet. A stylesheet contains a set of template rules. A template rule has two parts: a pattern which is matched against nodes in the source tree and a template which can be instantiated to form part of the result tree. This allows a stylesheet to be applicable to a wide class of documents that have similar source tree structures.” (XSL Transformations (XSLT), retrieved 20:05, 30 May 2007 (MEST))

“A transformation expressed in XSLT describes rules for transforming a source tree into a result tree. The transformation is achieved by associating patterns with templates. A pattern is matched against elements in the source tree. A template is instantiated to create part of the result tree. The result tree is separate from the source tree. The structure of the result tree can be completely different from the structure of the source tree. In constructing the result tree, elements from the source tree can be filtered and reordered, and arbitrary structure can be added.”(XSL Transformations (XSLT), retrieved 20:05, 30 May 2007 (MEST))

This page just provides a few links ....

Tutorial

See XSLT Tutorial - Basics

Links

Manuals

Specifications, standards and official propaganda

Official Frameworks

FAQ's

NewsGroups and Mailing Lists

Tutorials

Introductory Tutorials

  • XSLT by example at Objects by Design (They also have good XML->HTML tutorials)
  • Walsh XSL Tutorial Good tutorial, but slide style. Also useful as on-line XSL reference !

XSL Templates and tricks

XSLFO Tutorials

(should be moved)

  • XSL-FO (very good on-line BOOK)
  • FOP Slide Kit. Technical article from Paul Sandoz (SUN) about slides with FOP

3.1 PHP's XSLT processor

Software

XSLT/FO Processors

  • SAXON The SAXON package is a collection of tools for processing XML documents, e.g. an XSL (XSLT and XPath).
    INSTALLED at Tecfa: [password protected local documentation]. Saxon has extension features that others (Xalan) have not.
  • Gnome LibXML2 and it's associated XSLT C library. Used in PHP 5.0. There also command line tools for batch use, including xsltproc that also does XInclude. Installed @ Tecfa
  • tkxsltproc is a GUI frontend for the Gnome libxslt packages (see above). MacOSX, Win, Linux [9/2004]
  • Sablotron Sablotron is a fast, compact and portable XML toolkit implementing XSLT 1.0, DOM Level2 and XPath 1.0. Has some extensions, e.g. multiple output files. This is also the library used in PHP 4.x
  • Apache / Xalan-J is a Java-based XSLT 1.0 processor. Works with Xerces-Java (XML parser). Both are also distributed with other Apache products, like FOP. (installed @ Tecfa)
  • Apache / FOP is the world's first print formatter driven by XSL formatting objects. It is a Java application that reads a formatting object tree and then turns it into a PDF document. Installed @ Tecfa.
  • xmlroff. Sun sponsored xsl formatter for productin PDF and PS (2/2003). Early Beta, [not tested yet].

XSLT Libraries

Editors and Plugins