This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes Layout framework design Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "Layout framework design" Watch "Layout framework design" New topic
Author

Layout framework design

Peter van Rensburg
Greenhorn

Joined: Jan 11, 2003
Posts: 2
Hi all,
I'm new to XML/XSLT and as practice I've fiddling around today with the idea to create a basic rendering and layout 'framework'.
The goal is modularity and maintainability, not so much performance right now.
Basically the thought I had was to have three components here:
1. Source XML, lets say created in a servlet with JDOM from a database.
2. A layout transformation, either done in the same servlet or in a filter.
3. A formatting transformation, either as a filter or part of a filter chain with 2.
Perhaps I can illustrate with an example:
Source XML
Layout Transformation -> View the source
HTML substituting/formatting -> View the source
So basically, the source XML will contain no layout or formatting data, as the target audience might vary. The layout transformation will create the basic layout of the document, it will use a mixture of html tags and xml tags, for instance <box>. This will keep things a lot cleaner, instead of pages and pages of repeating HTML. This transformation should probably output XHTML.
The second transformation will take the output from the first transformation and substitute our custom XML tags with the relevant HTML code.
If you got this far in my post, thank you
I have a few questions:
1. Is this a good idea, are these the right technologies to use for the job?
2. Should I just put the full HTML code in the first style sheet instead of using custom XML tags?
3. Should I rather use taglibs or something and avoid the second transformation?
4. Does my stylesheets, especially the second one, look ok? It seems to work using my container's (Resin) builtin XSL classes but not using some commandline xslt processor (libxslt's xsltproc).
Any comments/advice/criticism/ideas very welcome.
Thank you,
Peter
Peter van Rensburg
Greenhorn

Joined: Jan 11, 2003
Posts: 2
*bump*. Any thoughts anyone ?
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Layout framework design
 
Similar Threads
xml to pdf
XSL and XSLT
Translating XML from http request
Struts and XML
how to merge two documents in memory