Reputation: 8971
From the perspective of having worked with HTML/CSS, I understand conceptually that HTML is markup, and that CSS comprises rules for styling that markup - hence a 'stylesheet'.
Just out of interest I decided to look at what XSLT is, since I am starting to work with XML more and more. I understand that XLS namespace in an XML document is defined as a programming language for transforming other XML documents. i.e. that XSLT is a programming language written in the format of XML. (Please let me know if this is not the case!)
Why are these 'scripts' considered stylesheets? i.e. where does the name - XSLT - Extensible stylesheet language transformations come from?
From the perspective of someone who works with CSS stylesheets I find it confusing that XSLT documents, which as far as I can see have nothing to do with visual layout (styling), and everything to do with transforming information representations, are named in a similar way.
Upvotes: 1
Views: 71
Reputation: 163468
The XSL project started out aiming to produce a language for styling XML documents for rendition on screen or in print. As the design developed, it was found that it could usefully be split into two parts: first transformation (which became XSLT) and then formatting (which became XSL-FO). The transformation part evolved into a computationally complete programming language, though with a data model specialised to processing XML.
The abstract of the XSLT 1.0 specification states:
"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."
You can be fairly sure they wouldn't have bothered saying that if there weren't some controversy within the working group: my guess is that someone said "this is turning into a general purpose programming language, which isn't what we're chartered to produce", and someone else said "no, it's only doing those things that are needed for formatting use cases; if it's useful for other things, that's an unintended benefit". Dropping the "S" from the name would have indicated a departure from the group's charter.
Upvotes: 1
Reputation: 111686
Because XSLT styling is considered to be a transformation from the semantic content represented in an XML document to presentational elements represented in the targeted medium.
Consider CSS and HTML as one such targeted medium. PDF (via XSL-FO) would be another example of a medium to which XML might be transformed in support of styling.
Think of XSLT as a powerful transformational language originally motivated to style XML.
Thus, XSLT stylesheets.
Upvotes: 1
Reputation: 167696
See https://www.w3.org/TR/xsl11/, "Extensible Stylesheet Language" which differences between
This specification defines the features and syntax for the Extensible Stylesheet Language (XSL), a language for expressing stylesheets. It consists of two parts:
a language for transforming XML documents (XSLT), and
an XML vocabulary for specifying formatting semantics.
An XSL stylesheet specifies the presentation of a class of XML documents by describing how an instance of the class is transformed into an XML document that uses the formatting vocabulary.
So during the development of XSLT (1) the focus was on using both the transformation language (XSLT) and the "XML vocabulary for specifying formatting semantics" together.
But later on, as https://www.w3.org/Style/XSL/WhatIsXSL.html says: "XSLT. Originally intended to perform complex styling operations, like the generation of tables of contents and indexes, it is now used as a general purpose XML processing language. XSLT is thus widely used for purposes other than XSL, like generating HTML web pages from XML data.".
Upvotes: 1