Skip to Content
XSLT and XPATH: A Guide to XML Transformations
book

XSLT and XPATH: A Guide to XML Transformations

by John Robert Gardner, Zarella L. Rendon
July 2001
Intermediate to advanced
592 pages
11h 16m
English
Pearson
Content preview from XSLT and XPATH: A Guide to XML Transformations

C.2. The Stylesheet

C.2.1. Headers

The stylesheet starts with standard “boilerplate” headers.

Declare it as an XML document:

<?xml version="1.0" encoding="ISO-8859-1"?>

A copyright notice:

<!--
Copyright (C) 2000 Oren Ben-Kiki
This stylesheet is public domain. However, if you
modify it or decide to use it as part of an XSLT
benchmark/testing suite, I'd appreciate it if you
let me know at oren@ben-kiki.org
-->

A descriptive comment:

<!--
This XSL stylesheet will convert an XML document of
the form:
<BoardSize>8</BoardSize>
Into an HTML document listing all 8x8 chess boards
containing 8 queens such that no one threatens
another.
It uses XSLT version 1.0, as per
http://www.w3.org/TR/1999/REC-xslt-19991116
-->

Now we get to the stylesheet itself. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning XSLT and XPath: Transforming XML Documents and Data

Beginning XSLT and XPath: Transforming XML Documents and Data

Ian Williams
Java and XSLT

Java and XSLT

Eric M. Burke
Learning XSLT

Learning XSLT

Michael Fitzgerald

Publisher Resources

ISBN: 0130404462Purchase book