[jdom-interest] First pass at Namespace revision[eg]
strunk at signal7.de
Fri Mar 30 12:45:33 PST 2001
OK, here's what we do.
Our homegrown web-application framework processes a request as follows.
A number of independent modules process the web request one after the
other, putting their XML response data into an invocation dictionary,
together with the necessary XSLT templates for rendering html to the browser.
Here's an example:
A request is processed sequentially by MenuModule, NewsModule and
First MenuModule processes the request and puts its response (e.g. the
state of the current environment with menus etc.) into the invocation
dictionary as a JDOM-Element and specifies an XSLT stylesheet that contains
templates to render all XML content in HTML.
After that NewsModule processes the request and put its response (e.g. a
news article displayed to the user) into the invocation dictionary and
specifies a stylesheet etc.
Same for PersonalizationModule.
When the request has been processed by all modules one XML document is
assembled having the response subtrees as first level children of the
document element. In addition to that all XSLT template definitions are
assembled into an enclosing stylesheet that at the end of the request there
is one XML document and one XSLT stylesheet that is processed. To avoid
naming conflicts without compromising modularity, all XML subtrees
corresponding to a module response get their own namespace. All
"apply-template" rules use a namespace to match the XML elements in the
This is done in a very elegant way by applying a default namespace to each
module response XML subtree, which doesn't require significant additional
processing. That's not possible with the current version of JDOM (we're
currently using our own hacked version for that). works like a charm and we
will go into production with a huge application a week from now, so this is
Hope this is enough detail to qualify as a valid use case ;-). If you like
I can send you example documents (XML and XSLT) that are created during the
request, if that makes things clearer.
(-) Jochen Strunk
(-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
(-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
(-) Tel: 06151 665402, Fax: 06151 665373
(-) strunk at signal7.de, www.signal7.de
More information about the jdom-interest