Adlib API home page > News

Non-preferred term substitution and XSLT stylesheets

From wwwopac.ashx version 3.6.1173.0, non-preferred terms in validated (linked) fields will automatically be subsituted by their preferred term when writing a record, and only the preferred term will be present in the returned XML.
Also, you can now set your own XSLT stylesheet in a database configuration in the adlibweb.xml file, to transform the standard Adlib XML to another format which is more suited to your Adlib API application. In the following example you can see how library records are delivered in MARC XML instead of Adlib XML by applying a server side XSLT stylesheet:

http://test2.adlibsoft.com/api/wwwopac.ashx?database=library-marc&search=title=house*

The XSLT stylesheet for this example can be found at http://test2.adlibsoft.com/api/Marc21.xslt. The relevant settings in the adlibweb.xml file are as follows:

<databaseConfiguration database="library-marc"> <databasePath>d:\test2.adlibsoft.com\Adlib-API\backend\data</databasePath>   <xmlType>grouped</xmlType>   <database>document</database>   <styleSheet>Marc21.xslt</styleSheet>   <brieffields>     <field>*</field>   </brieffields>   <detailFields>     <field>*</field>   </detailFields> </databaseConfiguration>

Further, the XML type of returned XML can now be set in the adlibweb.xml configuration file as well, so you don't need to include it in the wwwopac.ashx query anymore.

Part of the new functionality in this version of the API is also a so-called directory watcher in the folder which holds the adlibweb.xml file. Whenever you change something to a file in this folder, the directory watcher will restart the application pool for your API application automatically, so you won't need to do that manually anymore. The directory watcher is part of an API update when you apply it.