You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Nick Kew <ni...@webthing.com> on 2004/10/23 16:03:16 UTC

Test suite for SSI

In the context of markup filtering, I've created a new SSI implementation
that decouples SSI handling from HTML parsing.  This is designed to be
re-usable in filters driven by general markup parsers such as expat and
libxml2.

I am planning to incorporate it in several applications, the first of
which is mod_xhtml, a namespace processor that runs under mod_xmlns.
In doing so, I've defined an equivalent namespace, so
  <ssi:if expr="foo < bar"/>  and  <!--#if expr="foo < bar"-->
or
  <ssi:set var="foo" value="bar"/>  and  <!--#set var="foo" value="bar"-->
are exact equivalents.

Before proceeding further, I'd like to validate it against any available
test suite for SSI/mod_include.  Does such a thing exist?


-- 
Nick Kew

Re: Test suite for SSI

Posted by Cliff Woolley <jw...@virginia.edu>.
On Sat, 23 Oct 2004, Nick Kew wrote:

> Before proceeding further, I'd like to validate it against any available
> test suite for SSI/mod_include.  Does such a thing exist?

Yes, there's a fairly extensive (though certainly not exhaustive) set of
mod_include tests in httpd-test/perl-framework/t/modules/include.t .

--Cliff

Re: Test suite for SSI

Posted by Nick Kew <ni...@webthing.com>.
On Sat, 23 Oct 2004, Nick Kew wrote:

> > check out the httpd-test module, there's quite complete mod_include test
> > there. test-dev@httpd is the mailing list for that stuff.
>
> Thanks nd and cliff for that tip.  I guess I must've looked in the
> wrong place.

Hmm, none of that is actually usable.  It's SSI directives in isolation
without reference to markup I could parse with mod_xmlns.  By the time
I've made it usable, it's become effectively the same as the ad-hoc
tests I've already run (passing the same page through mod_xhtml
with SSI enabled and mod_include).

The processing of SSI directives should be the same between the two
modules, but the context in which they can be used is not at all
the same.  My implementation is designed for use when SSI is combined
with other markup processing, when it enables SSI without the overhead
of parsing the whole document a second time.

For anyone interested, it will shortly be at
http://apache.webthing.com/mod_xhtml/


-- 
Nick Kew

Re: Test suite for SSI

Posted by Nick Kew <ni...@webthing.com>.
On Sat, 23 Oct 2004, [ISO-8859-15] André Malo wrote:

> * Nick Kew <ni...@webthing.com> wrote:
>
> >
> > In the context of markup filtering, I've created a new SSI implementation
> > that decouples SSI handling from HTML parsing.
>
> Ehm, is it coupled in any way?

Yes, it's all in one large and complex module.  mod_xhtml is 2000 lines
smaller than mod_include.

> > This is designed to be
> > re-usable in filters driven by general markup parsers such as expat and
> > libxml2.
> >
> > I am planning to incorporate it in several applications, the first of
> > which is mod_xhtml, a namespace processor that runs under mod_xmlns.
>
> Dunno either ;)

Fair enough: I've made no attempt (yet) to publicise them.  I'm planning
an article on mod_xmlns in the not-too-distant future.  I'm running
one live application ( see http://www.apachetutor.org/apps/annot ),
and I recently published a second: mod_proxy_xml implements the
functionality of mod_proxy_html for XML and offers extensibility to
other namespaces such as WML.  Apart from that, I'm using it as a
testbed for things like this SSI parser or my ESI parser last year.

> check out the httpd-test module, there's quite complete mod_include test
> there. test-dev@httpd is the mailing list for that stuff.

Thanks nd and cliff for that tip.  I guess I must've looked in the
wrong place.

-- 
Nick Kew

Re: Test suite for SSI

Posted by André Malo <nd...@perlig.de>.
* Nick Kew <ni...@webthing.com> wrote:

> 
> In the context of markup filtering, I've created a new SSI implementation
> that decouples SSI handling from HTML parsing.

Ehm, is it coupled in any way?

> This is designed to be
> re-usable in filters driven by general markup parsers such as expat and
> libxml2.
> 
> I am planning to incorporate it in several applications, the first of
> which is mod_xhtml, a namespace processor that runs under mod_xmlns.

Dunno either ;)

> In doing so, I've defined an equivalent namespace, so
>   <ssi:if expr="foo < bar"/>  and  <!--#if expr="foo < bar"-->
> or
>   <ssi:set var="foo" value="bar"/>  and  <!--#set var="foo" value="bar"-->
> are exact equivalents.

In 2.x this is already possible anyway ...

> Before proceeding further, I'd like to validate it against any available
> test suite for SSI/mod_include.  Does such a thing exist?

check out the httpd-test module, there's quite complete mod_include test
there. test-dev@httpd is the mailing list for that stuff.

nd
-- 
"Das Verhalten von Gates hatte mir bewiesen, dass ich auf ihn und seine
beiden Gefährten nicht zu zählen brauchte" -- Karl May, "Winnetou III"

Im Westen was neues: <http://pub.perlig.de/books.html#apache2>