X hits on this document

385 views

0 shares

1 downloads

0 comments

48 / 142

Transforming XML with XSLT

Admittedly, the example above looks rather complicated and truthfully functions exactly like our CSS files. At the same time, displaying the letter.xml file with CSS requires a modern browser. If the let- ter2html.xsl file were incorporated into a Web server, then Web browser's would not need to understand CSS. Given the example above, there is not a compelling reason to use XSLT, yet.

Yet another example

Here is yet another example of transforming an XML document into an HTML document. The XSLT file below is intended to convert a CIMI Schema document (an XML vocabulary used to describe ob- jects in museum collections) into an HTML file. Once processed, this XSLT file will:

  • 1.

    output an HTML declaration

  • 2.

    find the root of the CIMI Schema document

  • 3.

    output the beginnings of an HTML document

  • 4.

    loop through all the object elements of the CIMI Schema document outputing an unordered list of

hypertext links pointing to a set of images

5.

output the end of an HTML document

<?xml version="1.0"?>

40

Document info
Document views385
Page views391
Page last viewedSun Dec 04 04:26:57 UTC 2016
Pages142
Paragraphs3126
Words34660

Comments