15.5 XDQL Example in XSL Stylesheet
Let us take a simple example to understand how XDQL is used to fetch Docbase data dynamically within Presentation files (XSL stylesheets).
The following sample template file will be transformed via an XSL stylesheet:
<?xml version="1.0" encoding="UTF-8"?> <ROOTTAG> <TITLEOFPAGE/> <SHORTDESC/> </ROOTTAG>
The XSL stylesheet in this example will be used to create an HTML transformation of the above template XML file. The transformed file (HTML web rendition) will display the name of the content file (object_name attribute)
that is created using the above template.
Create an XSL file (as shown in figures 15.16 and 15.17) and import it within the Docbase at the following location: /Site Manager/Presentations/Editor/Custom_Presentations
.
We will now discuss the anatomy of the above XSL stylesheet:
Namespaces: Add the following Java and Xalan namespaces...