[Yazlist] XSL and PHP5

Lamon Jean-Pierre jpierre.lamon at mediatheque.ch
Mon Mar 26 16:07:31 CEST 2007


Hi,

I intend to maybe deploy a php/yaz framework with XML/XLST. In order to see how the result is looking, has someone an URL with this implementation where I could see this?

Thank you
JP

-----Message d'origine-----
De : yazlist-bounces at lists.indexdata.dk [mailto:yazlist-bounces at lists.indexdata.dk] De la part de Sebastian Hammer
Envoyé : lundi, 26. mars 2007 15:58
À : Discussion on the YAZ Z39.50 toolkit
Objet : Re: [Yazlist] XSL and PHP5

Hi Hans-Werner,

Thanks for sharing! The way I see it, someone who 'has' to use the PHP5 
libxslt-based XSLT processor is lucky. In my experience, it is faster 
and better than Sablotron in every way. And PHP5 has both a better DOM 
and the really pleasant SimpleXML API to work with XML records.. it's 
definitely a very comfortable environment in which to write XML-based 
Z39.50/SRU clients.

--Sebastian

Hans-Werner Hilse wrote:

>Hi,
>
>On Mon, 26 Mar 2007 13:03:49 +0200 "Carlos Escuriola"
><escuriola at gmail.com> wrote:
>
>  
>
>>Has anyone that function translated for PHP5 so I can use the same
>>example in my server, or know how can I solve that problem?
>>    
>>
>
>Without testing it at all:
>
>function display_record($rec, $xslfile) {
>	$processor=new XSLTProcessor();
>	$processor->importStylesheet(DOMDocument::load($xslfile));
>	print(preg_replace("'</?html[^>]*>'",'',
>		$processor->transformToXML(DOMDocument::loadXML($rec))));
>}
>
>For performance reasons, I'd even suggest:
>
>function display_record($rec, $xslfile) {
>	static $processor=false;
>	if(!$processor) {
>		$processor=new XSLTProcessor();
>		$processor->importStylesheet(DOMDocument::load($xslfile));
>	}
>	print(preg_replace("'</?html[^>]*>'",'',
>		$processor->transformToXML(DOMDocument::loadXML($rec))));
>}
>
>
>OTOH, the XSLT extension is still available as a PECL extension. And,
>well, you managed to install another PECL extension: yaz.
>
>
>Cheers,
>
>-hwh
>
>_______________________________________________
>Yazlist mailing list
>Yazlist at lists.indexdata.dk
>http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist
>
>
>  
>

-- 
Sebastian Hammer, Index Data
quinn at indexdata.com   www.indexdata.com
Ph: (603) 209-6853 Fax: (866) 383-4485


_______________________________________________
Yazlist mailing list
Yazlist at lists.indexdata.dk
http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist



More information about the Yazlist mailing list