This is an example of how parts of the ODM can be published in a dynamic
way on an intranet website.
Typically, the user uses a servlet or JSP to select an ODM-XML file (e.g.
based on a number of qualifications) from a database. The database can either
be an object database (to be preferred) or a classic relational database. The
XML is then retrieved by the servlet and through a very simple Java-program
converted to a web page.
The style for the presentation is determined by the XSL-stylesheet, which
itself is written in XML.
The current example shows how the "User" element from an ODM-XML file (*) that is transformed into a web page.
The applied XSL-stylesheet can be found here.
Full Name | Shirley Williams | |
First Name | Shirley | |
Last Name | Williams | |
Organization | CDISC | |
Location | CDISC Headquarters | |
Full Name | John Smith, M.D. | |
First Name | John | |
Last Name | Smith | |
Organization | Roswell Park | |
Location | Roswell Park | |
Full Name | Jane Doe, M.D. | |
First Name | Jane | |
Last Name | Doe | |
Organization | Fred Hutchinson | |
Location | Fred Hutchinson |
The stylesheet contains a number of interesting elements:
Remarks
This stylesheet can also be used to show ODM XML files
directly in MS Internet Explorer. MS IE5 and higher also render XML
files if a reference is given within the XML file to the stylesheet. One
should take care that the correct namespace for XSL is used, as the
default namespace for direct viewing in MS IE5
(http://www.w3.org/TR/WD-xsl) does not support all the necessary features
of this stylesheet. For example: <xsl-variable> is not
supported.
Therefore we used the W3C default namespace
(http://www.w3.org/1999/XSL/Transform ). This has the additional
advantage that the XML file can also be transformed at the server side
(e.g. servlets) with software like Xalan.
Netscape users cannot view XML-files directly in the browser, even if the XML file contains a link to the XSL styleheet. Also XSL-files cannot be viewed directly with Netscape (what a shame !).