[Filterproxy-devel] Re: e: FilterProxy XSLT
Brought to you by:
mcelrath
From: Bob M. <mce...@dr...> - 2002-01-09 07:12:50
|
Mario Lang [la...@zi...] wrote: > Comments: > 1. For an example, add a XSLT entry for http://(www\\.)slashdot.org/$ > Set the stylesheet name to xpath-filter.xsl > Add parameter locator with value > /html/body/table[2]/tr/td/table[2]/tr/td[2]/font > Add parameter base with value > 'http://slashdot.org/' > What does that do? > It extracts the articles table from slashdot, > and removes all the other tables around it. > Tip: If you want to create a locator option for another page, > use xmllint --html --shell filename.html and simply > use cd|ls|cat to change where you want to be and do pwd. =2E..how interesting... > 2. What is lacking: > The xsl stylesheet path is hardcoded currently to /usr/share/filterpro= xy/xsl/ > Stylesheet name has no select listbox. You have to know the names. > No README or anything like that... >=20 > Comments are welcome. > Especially about how to do the stylesheet path. Make it a global > XSLT option? Where should they go... I have modified FilterProxy.pl to export $FilterProxy::HOME, which is the variable you want. > Do you have a CVS for filterproxy? I've updated CVS with my latest code. (Turns out I hadn't committed some recent changes) I've also added your code. I've modified it to use $FilterProxy::HOME to get its files in $FilterProxy::HOME /xsl. And I've translated the html file you provided so that it works with HTML::Mason. For further work on this you should check out the latest cvs and install HTML::Mason. ;) The html file you provided doesn't seem to allow me to add or edit any conf= ig. I think it is dependent on the parameter $ENV{SITECONFIG}->{'stylesheet'}, which won't be there if you've just added a site. Also you should remove t= he stuff about dumping headers to a file. ;) I hope I haven't messed it up in translating your html file. :( Cheers, -- Bob Bob McElrath (rsm...@st...)=20 Univ. of Wisconsin at Madison, Department of Physics |