• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Layout framework design

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
*bump*. Any thoughts anyone ?
 
If you're gonna buy things, buy this thing and I get a fat kickback:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic