[ You are here: XTF -> Programming -> dynaXML ]

dynaXML Programming


dynaXML Specific Programming:
Common to dynaXML and crossQuery:

Introduction

The dynaXML servlet is in charge of displaying a single XML document, often in small chunks or pages, one page at a time. It forms part of a complete search and display system: the user can search a collection of documents using crossQuery, and when they find a document of interest, they can explore the contents of that document using dynaXML. If we look more closely at the dynaXML portion of the XTF Overview Diagram, we see something like this:
dynaXMLDataFlow.gif
Data flow in this diagram is from left to right. First, the user specifies a document to view by sending a URL that looks like this (in its simplest form):
The dynaXML servlet breaks up the URL parameters and formats them in XML. This is passed to the Document Request Parser stylesheet, which figures out where to find the specified document and decides which stylesheet will be used for formatting the result page. Also, if a search query is included in the URL, the parser transforms the query into structured XML that the Text Engine can understand.

Optionally, the parser can also specify authentication to perform, allowing the system to secure access to sensitive or protected documents. XTF's user authentication engine checks the user's credentials using the specified authentication method.

Next, the servlet fetches the source XML document. If a search query was specified, it uses the Text Engine to search for occurrences of the specified text, and then inserts hit tags and snippets in their proper context within the original document.

Finally, the (possibly marked up) document is passed to the Document Formatter stylesheet, which creates the final HTML page to display in the user's browser.

Thus, XTF allows you to configure, again through the use of stylesheets, where documents will be stored, how they can be queried, and precisely how they will be displayed to the user. How are all these decisions made? This diagram should clarify the chain of logic:
dynaXMLDecisionTree.gif
The following sections cover the basics of programming stylesheets to drive dynaXML.