Xsl

From Gramps
Revision as of 07:44, 2 July 2007 by Romjerome (talk | contribs) (New page: =Definition= XSL is a family of transformation languages which allows us to describe how files encoded in the XML standard are to be formatted or transformed. There are three languages i...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

XSL is a family of transformation languages which allows us to describe how files encoded in the XML standard are to be formatted or transformed.

There are three languages in the family:

  • XSLT (eXtensible Stylesheet Language Transformation)
  • XPath (an expression language for addressing portions)
  • XSL-FO (eXtensible Stylesheet Language - Formatting Objects)

How using XSL ?

We may transform, format every XML with a XML/XSL parser. There is many parsers. The most accessible could be: xsltproc.

With simple command-line like:

xsltproc xx.xsl xx.xml > new.xml

you may generate a new file without loosing data.

How this work ?

There is many tutorials on the Web. XSL allows loop-like, test, variable, param, function and uses template.

You can work with DOM or not. That also depending on the memory available

We don't really iterate through the file. We retrieve data with XPath.