Headline

XML processing with Language:XSLT

Motivation

XSLT is easily applied to the basic query/transformation features. Structurally recursive, type-preserving transformations are taken care of by XSLT transformations that leverage the "copy-recurse" idiom for all elements that do not require any "local" change; see below. Structurally recursive queries are handled similarly; output mode "text" is used, though. The data model for companies is provided as an XML schema. Validity is not checked or otherwise implied.

Illustration

The transformation relies on the "copy-recurse" idiom.

	<xsl:template match="@*|node()">
		<xsl:copy>
			<xsl:apply-templates select="@*|node()"/>
		</xsl:copy>
	</xsl:template>

Architecture

Each of the implemented query/transformation features is modeled by a designated XML transformation.

Usage

In principle, any XSLT implementation should do.

Two XSLT implementations are discussed below.

See the Makefile for running some tests.

An xsltproc implementation is readily available on OS X, Linux et al.

A version of Saxon is included in the code repository for this implementation.

Tested with this version of xsltproc:

$ xsltproc -V
Using libxml 20703, libxslt 10124 and libexslt 813
xsltproc was compiled against libxml 20703, libxslt 10124 and libexslt 813
libxslt 10124 was compiled against libxml 20703
libexslt 813 was compiled against libxml 20703

Also possible to work with Saxon from:
	http://saxon.sourceforge.net/ or http://www.saxonica.com/

Tested with this version of Saxon:

$ java -jar saxon/saxon9he.jar
No source file name
Saxon-HE 9.2.1.2J from Saxonica
Usage: see http://www.saxonica.com/documentation/using-xsl/commandline.html
Options: 
   ...

Tested on the following machines:

	Darwin ... 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE I386 i386
		(both test-xsltproc and test-saxon)
	Darwin ... 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE I386 i386
		(both test-xsltproc and test-saxon)
	Linux ... 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:09:38 UTC 2010 x86 64 GNU/Linux
		(both test-xsltproc and test-saxon with Java 6)
	Linux ... 2.6.16.60-0.69.1-ppc64 #1 SMP Fri Sep 17 17:07:54 UTC 2010 ppc64 ppc64 ppc64 GNU/Linux
		(only test-xsltproc due to the lack of Java 5+)
	Linux ... 2.6.13-15.18-bigsmp #1 SMP Tue Oct 2 17:36:20 UTC 2007 i686 i686 i386 GNU/Linux
		(only test-xsltproc due to the lack of any Java)
	Microsoft Windows XP [Version 5.1.2600]
		(only saxon due to the lack of xsltproc)

The project can be opened with Eclipse for convenience.


There are no revisions for this page.

User contributions

    This user never has never made submissions.

    User edits

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.

    Syntax for editing wiki

    For you are available next options:

    will make text bold.

    will make text italic.

    will make text underlined.

    will make text striked.

    will allow you to paste code headline into the page.

    will allow you to link into the page.

    will allow you to paste code with syntax highlight into the page. You will need to define used programming language.

    will allow you to paste image into the page.

    is list with bullets.

    is list with numbers.

    will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.

    will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.

    will allow your to insert code snippets from @worker.