httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Kew <n...@webthing.com>
Subject Re: [users@httpd] Server Side Includes - include only a certain "xpath"
Date Fri, 28 Aug 2009 13:32:32 GMT
Thorsten Scherler wrote:
> Hi all,
> 
> I have a page that includes various parts via ssi.
> e.g. <!--#include virtual="/head.shtml"-->
> 
> On our current version we "hack" the included pages to an invalid html
> doc. Basically we strip it down to e.g. "<div> ...blah...</div>" However
> this leaves documents that are not valid against xhtml dtd.
> 
> Is there a way to include a certain part of a page like e.g.
> <!--#include virtual="/head.shtml" part="/html/head"-->
> 
> TIA for any information and suggestions.

mod_publisher, as a markup-aware parser, can help with that
kind of thing, if you can map your requirements to SAX events.

Alternatively, if everything is XML and you want to use xpath,
you might try mod_transform.

In either case, you'll have some work to figure it out.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message