01 August 2007

XSL

The extensible stylesheet language (XSL) is used to create stylesheets for XML documents. XML tags are not defined; when a programmer creates a page in XML, that programmer is in effect creating a new language peculiar to the domain; the term for this is "domain-specific language," and XML has spawned many examples [*][listing]. Each implementation of XML has to have a stylesheet, and XSL is the official language for programming them.

This is a rather arcane topic, and so this post is going to remain a stub until/unless I really think it's necessary to write about what XSL is. However: it actually is a set of three languages, each of which are responsible for a specific part of transforming XML-compliant applications into the desired graphical user interface (GUI).
  • XSL Transformations (XSLT): language for converting XML source documents into (a) other XML-compliant formats, (b) HTML or plain text. The source document is the original code; XSLT creates a new document, called a result document, which is supposed to be useful. Usually the result document is an actual, literal, document (like a readable page on the screen); but it can also be a stream of data that is computer-readable.
  • XSL Formatting Objects (XSL-FO): unified language (i.e., no divide between "markup" and "definition") for converting XSLT result documents into something printable. Mostly used to generate PDF documents.
  • XML Path Language (XPath): used by XML language parsers to navigate an XML document. Recall that XML documents consist of elements organized in a nested hierarchy (like a tree). XPath is a language that helps the parser travel "up the tree" to the root element (i.e., the body of the document), and back "down another branch" as the process of generating an XML transformation.

NOTES:
domain: the term "domain" is somewhat ambiguous; a domain could be a generic term that covers a section of a database, perhaps stored in multiple locations; a website, with a root directory on a host; or an IP address range. In fact, the term here refers explicitly to a peculiar task, function, purpose, or specialty. A domain specific language is therefore a programming language that is used to address a very specific function, sometimes so specific that it has a unique actual application. Please see "Domain-Specific Languages: An Annotated Bibliography," by Arie van Deursen, Paul Klint, & Joost Visser (1999/2000)


SOURCES & ADDITIONAL READING: Wikipedia, Extensible Stylesheet Language (XSL); W3C Tutorials, "The Extensible Stylesheet Language Family (XSL)";

BOOK: Eliot Rusty Harold, XML 1.1 Bible, Wiley Publishing (2004); see §15" "XSL Transformations" and §16: "XSL Formatting Objects"

Labels: , , , ,

0 Comments:

Post a Comment

<< Home