Proposal: New XHTML parser allows more granular decorating
"James Cook" <[email protected]>
| Newsgroups | gmane.comp.web.sitemesh.general |
|---|---|
| Message-ID | <[email protected]> |
I often find the all-or-nothing sitemesh decorator tags to be too restrictive. We can import the head or the body or the title, and that's about it (besides some meta properties). I end up having to stick page-specific script and styles in the body of my page which I find kind of kludgy. I was thinking that I would like to have a decorator tag that accepts XPATH statements that allow me to pull a specific section of my target HTML into the decorator. Something like: <decorator:xpath name="/html/body/div[@id='portlet']" /> Of course, this approach wouldn't be useful to developers not working with validatable XML, but many of us have made the transition. So in order for this to work well it will require: 1. A new parser that is nothing more than a standard XML parser. 2. A new tag that uses standard XPath syntax. It shouldn't take more than an evening or two to put together. The main issue will be performance. The XML parser should be extremely fast and a new one shouldn't be instantiated for each request. Perhaps an object pool of parsers is needed. Anyone see any obstacles to this approach? ------------------------------------------------------- This SF.Net email is sponsored by Sleepycat Software Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver higher performing products faster, at low TCO. http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3