[Yazlist] Exslt string function help in Pazpar2 Marc 21

Kissman, Paul (BLC) Paul.Kissman at state.ma.us
Mon Feb 9 14:25:45 CET 2009


Adam,

Thanks very much. The patch worked perfectly. And you are right. I no
longer need to import str.xsl.

Pjk

Paul J. Kissman
Library Information Systems Specialist
Massachusetts Board of Library Commissioners
98 N. Washington St., Suite 401
Boston, MA  02114 
paul.kissman at state.ma.us
http://xri.net/=paul.kissman
mass.gov/mblc or mblc.state.ma.us
Phone: (617)725-1860 . (800)952-7403 (in-state)
Fax: 617-725-0140  
-----Original Message-----
From: yazlist-bounces at lists.indexdata.dk
[mailto:yazlist-bounces at lists.indexdata.dk] On Behalf Of Adam Dickmeiss
Sent: Friday, February 06, 2009 5:52 PM
To: Discussion on the YAZ Z39.50 toolkit
Subject: Re: [Yazlist] Exslt string function help in Pazpar2 Marc 21

Kissman, Paul (BLC) wrote:
> Has anyone used exslt functions in pazpar2?
>
> For certain z39.50 results, I need to urlencode the 856u field while 
> transforming the record output through the marc21.xsl stylesheet.
>
> I believe I have the exslt string function I need being imported, but 
> it is not registered, and I get the following complaint in my error
log:
> Not sure how to make pazpar2 register to use extensions (do I have to 
> stuff a registerAll() into the c code and recompile?.
>   
Think so. Attached is a patch for Pazpar2 1.0.13. Using that you should
not need import of str.xsl.

Guess it's also possible to download
http://www.exslt.org/str/str.zip
and import that. But have never tried that approach.

/ Adam
> 11:51:20-06/02 pazpar2 [warn] XML: xmlXPathCompOpEval: function 
> encode-uri not found
> 11:51:20-06/02 pazpar2 [warn] XML: Unregistered function
>
> The top of my marc32.xsl stylesheet looks like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- $Id: marc21.xsl,v 1.22 2007-10-04 12:01:15 adam Exp $ --> 
> <xsl:stylesheet
>     version="1.0"
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>     xmlns:str="http://exslt.org/strings"
> extension-element-prefixes="str"
>     xmlns:pz="http://www.indexdata.com/pazpar2/1.0"
>     xmlns:marc="http://www.loc.gov/MARC21/slim">
>
> <xsl:import href="str.xsl" />
> ...
> ...
>
> <xsl:value-of
> select="str:encode-uri(substring(marc:datafield[@tag='856']/marc:subfi
> el
> d[@code='u'],8),true())"/>
>
> Which should remove the "http://" from the uri and then encode the 
> rest of it.
>
> Am using libxslt-1.1.22
>
> Any help would be appreciated.
>
> pjk
>
>
> Paul J. Kissman
> Library Information Systems Specialist Massachusetts Board of Library 
> Commissioners
> 98 N. Washington St., Suite 401
> Boston, MA  02114
> paul.kissman at state.ma.us
> http://xri.net/=paul.kissman
> mass.gov/mblc or mblc.state.ma.us
> Phone: (617)725-1860 . (800)952-7403 (in-state)
> Fax: 617-725-0140
>
> _______________________________________________
> Yazlist mailing list
> Yazlist at lists.indexdata.dk
> http://lists.indexdata.dk/cgi-bin/mailman/listinfo/yazlist
>
>   




More information about the Yazlist mailing list