There are various types of mash-ups in the GDFR user interface. There are record-view mash-ups, inline-add mash-ups and cross-Collection searches.
Record UI Mash-Ups
The basis of the record UI mashups is a table with each
td element having an
Forward References. The XML sent to the XSLT translation should be the content of the current record, which is obtained using the content webservice,
/webservices/registry/content/COLLECTION/RECORD_ID. A special XSL needs to be created to parse the referenced recrord's identifier out and then retreive the adminData using the adminData service,
/webservices/registry/adminData/COLLECTION/RECORD_ID. The result of this XSLT translation should go inside the respective division.
Backward References. The XML sent to the XSLT translation should be an SRU response, which is obtained by creating a query and sending it to the search URL,
/registry/xsl/getBriefInfoFromSearch.xsl (that is the URL, not the location on disk). The result of this XSLT translation should go inside the respective division.
Note. If the collection has never been used in a mashUp before, you will need to move the XSL template found in ui.xsl and create a special stylesheet called nameView.xsl where name is the Collection name. This file needs to go in the
/webapps/webservices/xsl/mashUps directory under Tomcat. Then simply import this stylesheet in the ui and make the template call as normal.
Inline Record Adds
This explains how to have records from a Collection added on another record's add/edit page. First, take the XSL template that is used to display the HTML form used for editing in a separate file called nameEdit.xsl, where name is the Collection name. This file needs to go in the
/webapps/webservices/xsl/mashUps directory under Tomcat. In addition to this XSL template, some other things need to be in that XSL file. The actual HTML form element needs to be created and it must have a specific
id attribute. See FormatsEdit.xsl for an example. You also need to update the
edit.xsl stylesheet for the Collection. See
Formats/edit.xsl for an example.
edit.xsl for the other collection needs to be updated. This is hard to explain, so look in gdfrbase/edit.xsl, in the template called
gdfrBaseEdit and find where the Verified By section is.
Cross-Collection searches need to be implemented in a file called
displayCollection.xsl. This file must go under
/webapps/webservices/xsl/Collections/COLLECTION_NAME under Tomcat.
Adding to an Existing Search. Open
displayCollection.xsl for editing. Near the bottom you will see a
div inside a template called listCollections. Each cross-collection search is created by making a call to the XSL template called
createCollectionLink. The two parameters are
collectionName, which is the name of the Collection to search against and
Depending on how the Collections are related, the code might be different. Basically the idea is that you search against the selected collection with the provided query, and then, depending on the relationship, find the current Collection's records that are related to the search results using an XSL stylesheet. Then use this set of identifiers and mash them all together in a
dc.identifier exact search separated by ors.