[Yazlist] Pazpar2: undefined subject and location fields in jsdemo hits

Sebastian Hammer quinn at indexdata.com
Wed Sep 24 22:57:08 CEST 2008

Hi Chris -- it's nice to hear from you again,

Generally, records displayed in a pazpar2-based app such as jsdemo 
passes through a series of conversions:

First, the retrieved record is normalized into XML. For MARC, this means 
MARCXML. Then, the XSLT stylesheet specified for the search target is 
used to normalize the record into an internal representation. This 
representation should generally be the same for all targets in a given 
search, so sometimes it is necessary to use different stylesheets for 
different targets -- this is what makes it possible to cross-search 
XML/DublinCore and MARC targets, say, and still present results in a 
uniform way.

The normalization stylesheets (these are found in the pazpar2/etc 
directory) generally work directly on input records in their XML form... 
that is useful to know, because it means that it is possible to test the 
normalization stylessheets using a command-line XSLT processor before 
deploying them with pazpar2.

The records actually returned by pazpar2 to the JS client (like jsdemo) 
essentially contains the same information, but it is represented 
differently to make it easier to work with in JS. One way to get a sneak 
view of what comes back is to use the Firefox browser and install 
Firebug... this allows you to look at the data coming back from pazpar2, 
and it can be a very useful tool in debugging your client application.

Finally, You will need to present the records to the user. All the data 
should generally be available (if the pazpar2 normalization stylesheet 
works correctly) to display multiple subject headings, etc., but it's up 
to the JS code in drawCurDetails (in the case of jsdemo) to display the 
data correctly.

I hope this gives you some idea, both of how to debug a pazpar2 setup, 
but also of how to add more display logic to make the record display 
more interesting.



Christopher Morgan wrote:
> Hi,
> The pazpar2 jsdemo routine is working fine and returning hits, but when I
> click on the hits to view the tables generated by the drawCurDetails()
> function in example_client.js, the subject and location fields are all
> undefined. Also, how can I modify drawCurDetails() to display all the
> subject headings for a given book record, instead of just one? 
> Thanks!
> - Chris Morgan
> _______________________________________________
> 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

More information about the Yazlist mailing list