Re: Parsing HTML

Richard Kunze <[email protected]>
Newsgroups gmane.comp.java.enhydra.xmlc
Organization Tivano Software GmbH
Message-ID <[email protected]>
On Monday 24 March 2003 19:17, Ben Sinclair wrote:
> I have main pages that are XMLC compiled HTML files, which contain the UI
> and other things. For branding purposes, I need to wrap these in a custom
> header and footer at runtime. If I really have to, I could make it compile
> HTML files when people change them somehow, but I'd rather not.

You don't have to recompile, at least not with the new XMLC 2.2. Using the 
"deferred parsing" feature of XMLC 2.2, pages are automatically re-parsed on 
the fly whenever the source file changes. SSI includes are resolved by the 
reparsing code (if you switch on SSI support in XMLC, of course) so you can 
use SSI to include your headers and footers at parse time. The only thing you 
have to do manually is check for changes in the inclided files and force a 
reparse if they change because the standard XMLC reparsing factory only keeps 
track of the main HTML source file.

The added advantage of this approach is that you don't have to insert the 
header and footer every time a page is delivered, but only if a page is 
changed or gets swapped out of the template cache. This can be quite a big 
performance benefit on sites with heavy load.

Hope this helps,

Richard
-- 
Richard Kunze 

[ t]ivano Software, Bahnhofstr. 18, 63263 Neu-Isenburg
Tel.: +49 6102 80 99 07 - 0, Fax.: +49 6102 80 99 07 - 1
http://www.tivano.de, [email protected]
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+gBig86Aqb3OZfF4RAtNLAJ9jk1QCOrZEoHzuvg6UcPl6coWSKwCgsn35
XwzlO4pOrIe71rr9GxoDptE=
=e0qZ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.