Ready to Learn?Ex Libris products all provide open APIs

OpenURL

General Purpose

This API enables the sending of an OpenURL 1.0 request to SFX in XML format in order to receive context-sensitive linking information.
The response sent by SFX to the application that initiated the request is a response in XML format that includes the following:
  • The metadata received by the SFX server and stored in the ContextObject
  • SFX services, if they exist
XML requests should be sent to the following address/program:
<SFX server>:<port>/<sfx_instance>
 

Input Parameters

1. Standard openURL 1.0 XML Input: XSD

 

<?xml version="1.0" encoding="UTF-8" ?>
- <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ctx="info:ofi/fmt:xml:xsd:ctx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="info:ofi/fmt:xml:xsd:ctx" elementFormDefault="qualified" attributeFormDefault="unqualified" xsi:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
- <annotation>
  <documentation>XML Schema defining XML ContextObject Format. Validated with XML Spy v.5.3 on September 27th 2003. This XML Schema is available at </documentation>
- <appinfo xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/">
  <dc:title>XML ContextObject Format</dc:title>
  <dc:creator>NISO Committee AX, OpenURL Standard Committee</dc:creator>
  <dc:creator>Herbert Van de Sompel</dc:creator>
  <dc:description>This XML Schema defines a format to express one or more ContextObjects as an XML document.</dc:description>
  <dc:identifier></dc:identifier>
  <dc:identifier>info:ofi/fmt:xml:xsd:ctx</dc:identifier>
  <dcterms:created>2004-01-01</dcterms:created>
  </appinfo>
  </annotation>
- <element name="context-objects">
- <annotation>
  <documentation>The 'context-objects' element is a wrapper holding one or more autonomous XML ContextObjects.</documentation>
  </annotation>
- <complexType>
- <complexContent>
  <extension base="ctx:context-objects-type" />
  </complexContent>
  </complexType>
  </element>
- <complexType name="context-objects-type">
- <annotation>
  <documentation>The 'context-objects' element is a wrapper holding one or more autonomous ContextObjects.</documentation>
  <documentation>The 'context-objects' element has an optional administrative child element to hold Community-specific administrative data. The name of that element is 'administration'.</documentation>
  </annotation>
- <sequence>
  <element name="administration" type="ctx:administration-type" minOccurs="0" />
  <element ref="ctx:context-object" maxOccurs="unbounded" />
  </sequence>
  </complexType>
- <element name="context-object">
- <annotation>
  <documentation>The ContextObject is an information construct to represent an Entity that is referenced in a networked environment (the Referent) along with Entities that constitute the context in which the Referent is referenced. In the ContextObject, the Entities that describe the context are: the ReferringEntity, the Requester, the Resolver, the ServiceType, the Referrer. The ContextObject is represented by the 'context-object' element in this XML ContextObject Format</documentation>
  </annotation>
- <complexType>
- <complexContent>
  <extension base="ctx:context-object-type" />
  </complexContent>
  </complexType>
  </element>
- <complexType name="context-object-type">
- <annotation>
  <documentation>The ContextObject represented using the XML ContextObject Format contains descriptions of the following Entities: (1) exactly one Referent, (2) zero or one ReferringEntity, (3) zero or one Requester, (4) zero or more ServiceTypes, (5) zero or more Resolvers, and (6) zero or one Referrer. In the XML ContextObject Format, these Entities are represented by the elements 'referent', 'referring-entity', 'requester', 'service-type', 'resolver', and 'referrer', respectively.</documentation>
  <documentation>Each ContextObject has the following optional administrative attributes: (1) 'version' attribute - version of the ContextObject - fixed value Z39.88-2004 (optional), (2) 'identifier' attribute - identifier of the ContextObject (optional), and (3) 'timestamp' attribute - date/time of creation of the ContextObject (optional).</documentation>
  <documentation>The 'context-object' element has an optional administrative child element to hold Community-specific administrative data. The name of that element is 'administration'.</documentation>
  </annotation>
- <sequence>
  <element name="administration" type="ctx:administration-type" minOccurs="0" />
  <element name="referent" type="ctx:descriptor-type" />
  <element name="referring-entity" type="ctx:descriptor-type" minOccurs="0" />
  <element name="requester" type="ctx:descriptor-type" minOccurs="0" />
  <element name="service-type" type="ctx:descriptor-type" minOccurs="0" maxOccurs="unbounded" />
  <element name="resolver" type="ctx:descriptor-type" minOccurs="0" maxOccurs="unbounded" />
  <element name="referrer" type="ctx:descriptor-type" minOccurs="0" />
  </sequence>
  <attribute name="version" use="optional" fixed="Z39.88-2004" />
  <attribute name="identifier" type="string" use="optional" />
  <attribute name="timestamp" type="ctx:utc-datetime-type" use="optional" />
  </complexType>
- <complexType name="descriptor-type">
- <annotation>
  <documentation>In the XML ContextObject Format, each Entity of the ContextObject can be described by means of the following Descriptors: (1) zero or more Identifier Descriptors, (2) zero or more By-Value Metadata Descriptors, (3) zero or more By-Reference Metadata Descriptors, and (4) zero or more Private Data Descriptors. In the XML ContextObject Format, these Descriptors are contained in the elements 'identifier', 'metadata-by-val', 'metadata-by-ref', and 'private-data', respectively.</documentation>
  </annotation>
- <sequence>
  <element name="identifier" type="ctx:identifier-type" minOccurs="0" maxOccurs="unbounded" />
  <element name="metadata-by-val" type="ctx:metadata-by-val-type" minOccurs="0" maxOccurs="unbounded" />
  <element name="metadata-by-ref" type="ctx:metadata-by-ref-type" minOccurs="0" maxOccurs="unbounded" />
  <element name="private-data" type="ctx:private-data-type" minOccurs="0" maxOccurs="unbounded" />
  </sequence>
  </complexType>
- <simpleType name="identifier-type">
- <annotation>
  <documentation>Identifiers in the OpenURL Framework are URIs</documentation>
  </annotation>
  <restriction base="anyURI" />
  </simpleType>
- <complexType name="metadata-by-val-type">
- <annotation>
  <documentation>By-Value Metadata is provided through an XML description embedded in the ContextObject.</documentation>
  <documentation>The By-Value Metadata is provided as the combination of (1) a 'format' element, which identifies the Metadata Format of the By-Value Metadata, and (2) a 'metadata' element in which the metadata corresponding to the identified Metadata Format is contained.</documentation>
  </annotation>
- <sequence>
  <element name="format" type="ctx:metadata-identifier-type" />
  <element name="metadata" type="ctx:metadata-type" />
  </sequence>
  </complexType>
- <complexType name="metadata-type">
- <sequence>
  <any namespace="##other" processContents="lax" />
  </sequence>
  </complexType>
- <complexType name="metadata-by-ref-type">
- <annotation>
  <documentation>By-Reference Metadata is provided by means of the network-location of a document that contains the metadata.</documentation>
  <documentation>By-Reference Metadata is provided as the combination of (1) a 'format' element, which identifies the Metadata Format of the By-Reference Metadata, and (2) a 'location' element that specifies the network-location of the By-Reference Metadata</documentation>
  </annotation>
- <sequence>
  <element name="format" type="ctx:metadata-identifier-type" />
  <element name="location" type="ctx:network-location-type" />
  </sequence>
  </complexType>
- <complexType name="private-data-type">
- <annotation>
  <documentation>Private Data is provided through an XML description that declares its XML Namespace URI and schemaLocation.</documentation>
  </annotation>
- <sequence>
  <any namespace="##other" processContents="lax" />
  </sequence>
  </complexType>
- <simpleType name="metadata-identifier-type">
- <annotation>
  <documentation>Metadata Formats in the OpenURL Framework are identified by means of URIs. Registered Metadata Formats have a URI in the info:ofi/fmt: namespace, whereas Unregistered Metadata Formats have a URI in another URI namespace. Both URIs are dereferencable to a document defining the Metadata Format</documentation>
  </annotation>
  <restriction base="anyURI" />
  </simpleType>
- <simpleType name="network-location-type">
- <annotation>
  <documentation>The content of the network-location element is a URL specifying the network location of the By-Reference Metadata Description</documentation>
  </annotation>
  <restriction base="anyURI" />
  </simpleType>
- <complexType name="administration-type">
- <annotation>
  <documentation>Administrative information can be attached to the 'context-objects' and/or the 'context-object' element. Its content can be defined by communities of implementers.</documentation>
  </annotation>
- <sequence>
  <any namespace="##other" processContents="lax" />
  </sequence>
  </complexType>
- <simpleType name="utc-datetime-type">
- <annotation>
  <documentation>Valid values follow the ISO 8601 YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ notation.</documentation>
  </annotation>
  <union memberTypes="date dateTime" />
  </simpleType>
  </schema>

 

Element

Description

Value

Structure

?xml version="1.0" encoding="UTF-8" ? 

 

no value 

Description of XML version used and character encoding used 

ctx:context-objects xmlns:ctx="info:ofi/fmt:xml:xsd:ctx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:ofi/fmt:xml:xsd:ctxhttp://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:ctx"

This element is a wrapper holding one or more autonomous XML ContextObjects 
 

no value 

root element with XSD location information 

ctx:context-object 

The ContextObject is an information construct to represent an Entity that is referenced in a networked environment (the Referent) along with Entities that constitute the context in which the Referent is referenced. In the ContextObject, the Entities that describe the context are: the ReferringEntity, the Requester, the Resolver, the ServiceType, the Referrer. The ContextObject is represented by the 'context-object' element in this XML ContextObject Format 

No value 

sub-element of ctx:context-objects 

timestamp 

date/time of creation of the ContextObject (optional) 

Valid values follow the ISO 8601 YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ notation 

attribute of ctx:context-objects 

version 

version of the ContextObject - fixed value Z39.88-2004 (optional) 

string 

attribute of ctx:context-objects 

identifier 

ContextObject identifier - ID number of ContextObject - important in case multiple CTXO are sent in one request. 

 

attribute of ctx:context-objects 

ctx:referent 

 

no value 

sub-element of ctx:context-object 

ctx: referring-entity 

 

no value 

sub-element of ctx:context-object 

ctx:requester Example Input

 

no value 

sub-element of ctx:context-object 

ctx:service-type Example Input

 

no value 

sub-element of ctx:context-object 

ctx:resolver 

 

no value 

sub-element of ctx:context-object 

ctx:referrer 

 

no value 

sub-element of ctx:context-object 

sfx 

SFX proprietry entity 

no value 

sub-element of ctx:context-object 

ctx:identifier 

Identifiers in the OpenURL Framework are URIs 

string 

sub-element of ctx:referent/referring-entity/requester/service-type/resolver/referrer 

ctx:metadata-by-val 

By-Value Metadata is provided through an XML description embedded in the ContextObject. 
The By-Value Metadata is provided as the combination of (1) a 'format' element, which identifies the Metadata Format of the By-Value Metadata, and (2) a 'metadata' element in which the metadata corresponding to the identified Metadata Format is contained. 

no value 

sub-element of ctx:referent/referring-entity/requester/service-type/resolver/referrer/sfx

ctx:metadata-by-ref 

By-Reference Metadata is provided by means of the network-location of a document that contains the metadata. 
By-Reference Metadata is provided as the combination of (1) a 'format' element, which identifies the Metadata Format of the By-Reference Metadata, and (2) a 'location' element that specifies the network-location of the By-Reference Metadata 

no value 

sub-element of ctx:referent/referring-entity/requester/service-type/resolver/referrer 

ctx:private-data-type 

Private Data is provided through an XML description that declares its XML Namespace URI and schemaLocation. 

No value 

sub-element of ctx:referent/referring-entity/requester/service-type/resolver/referrer 

ctx:format 

Metadata Formats in the OpenURL Framework are identified by means of URIs. 
Registered Metadata Formats have a URI in the info:ofi/fmt: namespace, whereas Unregistered Metadata Formats have a URI in another URI namespace. 
Both URIs are dereferencable to a document defining the Metadata Format 

Examples of string 
Values: 
info:ofi/fmt:xml:xsd:sch_svc
info:ofi/fmt:xml:xsd:journal 
info:ofi/fmt:xml:xsd:book 

sub-element of ctx:metadata-by-val or ctx:metadata-by-ref 

ctx:metadata 

 

string 

sub-element of ctx:metadata-by-val 

ctx:location 

Network location type - The content of the network-location element is a URL specifying the network location of the By-Reference Metadata Description. 

string 

sub-element of ctx:metadata-by-ref 

 

ctx:requester Example Input

<ctx:requester>
<ctx:metadata-by-val>
<ctx:metadata>
<req:ip xmlns:req="info:ofi/req">10.1.235.47</req:ip>
</ctx:metadata>
</ctx:metadata-by-val>
</ctx:requester>

 

ctx:service-type Example Input

<?xml version="1.0" encoding="UTF-8" ?>
<ctx:context-objects xmlns:ctx="info:ofi/fmt:xml:xsd:ctx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:ofi/fmt:xml:xsd:ctx http://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:ctx">
<ctx:context-object timestamp="2004-01-16T12:13:00Z" version="Z39.88-2004" identifier="123">
<ctx:referent>
<ctx:metadata-by-val>
<ctx:format>info:ofi/fmt:xml:xsd:journal</ctx:format>
<ctx:metadata>
<rft:journal xmlns:rft="info:ofi/fmt:xml:xsd:journal"
xsi:schemaLocation="info:ofi/fmt:xml:xsd:journal http://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:journal">
<rft:date>2004-12-31</rft:date>
<rft:issn>0003-0007</rft:issn>
<rft:volume>29</rft:volume>
<rft:issue>1</rft:issue>
<rft:spage>17</rft:spage>
<rft:epage>9</rft:epage>
</rft:journal>
</ctx:metadata>
</ctx:metadata-by-val>
</ctx:referent>
<ctx:service-type>
<ctx:metadata-by-val>
<ctx:format>info:ofi/fmt:xml:xsd:sch_svc</ctx:format>
<ctx:metadata>
<sv:fulltext xmlns:sv="info:ofi/fmt:xml:xsd:sch_svc">yes</sv:fulltext>
</ctx:metadata>
</ctx:metadata-by-val>
</ctx:service-type>
</ctx:context-object>
</ctx:context-objects>

 

2. SFX Proprietary Input Parameters

The following are accepted values in the service-type section:
  • sv:fulltext
  • sv:selectedfulltext
  • sv:holdings
  • sv:abstract
  • sv:ill
  • sv:citation
  • sv:any 

The following is an accepted value in the requester section:
  • IP - Contains the IP address of the end user on whose behalf the request is sent. Format consists of: xmlns:req="info:ofi/req - IP address
 

Output

1. simplexml response

SFX will respond in the OpenURL 1.0 XML response by presenting in XML format a list of targets with TargetURLs for all services appearing in the SFX menu. Simplexml format supports XML files that contain only one ContextObject. 

ElementDescriptionValueDefaultStructure
?xml version="1.0" encoding="UTF-8" ?Description of XML version used and character encoding usedno value  
sfx_menu

 
no value root element
ctx_obj_setXML representation of the ContextObject.  sub-element of sfx_menu
targetsContains list of SFX targets appropriate for this particular ContextObject  sub-element of sfx_menu
targetSFX target appropriate for this particular ContextObject  sub-element of targets
target_nameTarget name internal name - Target as displayed in KBManager list of targets.  sub-element of target
target_public_nameTarget public name - as displayed to end-user in SFX menu  sub-element of target
target_service_idTarget Service Internal ID  sub-element of target
service_typeServiceType - see below for a list of allowed values  sub-element of target
parserParser program name  sub-element of target
parse_paramParameters used by parser program  sub-element of target
proxyUse proxy for this target: yes/no  sub-element of target
crossrefUse CrossRef lookup to improve target linking for this target: yes/no  sub-element of target
notePublic note to be displayed in SFX menu  sub-element of target
authenticationAuthentication note to be displayed in SFX menu  sub-element of target
char_setCharacter set used for Target URL - default is UTF8  sub-element of target
displayerDisplayer program name  sub-element of target
target_urlTargetURL generated by parser program  sub-element of target

List of allowed service types: getAbstract, getAlikeRecord, getAuthor, getAuthorEmail, getBookReview, getCitedAuthor, getCitedBook, getCitedGenome, getCitedJournal, getCitedRecord, getCitedReference, getDocumentDelivery, getDOI, getFullTxt, getHolding, getMessageNoFullTxt, getPayPerView, getReference, getSelectedFullTxt, getSubject, getTOC, getWebSearch, getWebService 

 

2. multi_obj_xml response

The multi_obj_xml format is the same as the simplexml format, except that it supports XML files that contain one or more ContextObjects.

ElementDescriptionValueDefaultStructure
?xml version="1.0" encoding="UTF-8" ?Description of XML version used and character encoding usedno value  
ctx_obj_setThis element is a wrapper holding one or more autonomous XML ContextObjectsno value root element
ctx_objXML representation of one particular ContextObject and its target(s)  sub-element of ctx_obj_set
identifierNumber to identify the ContextObject - needed in case multiple ContexObjects are sent in the request  attribute of ctx_obj
ctx_obj_attributesXML representation of the ContextObject  sub-element of ctx_obj
ctx_obj_targetsContains list of SFX targets appropriate for this particular ContextObject  sub-element of ctx_obj
targetSFX target appropriate for this particular ContextObject  Sub-element of ctx_obj_targets
target_nameTarget name internal name - Target as displayed in KBManager list of targets.  sub-element of target
target_public_nameTarget public name - as displayed to end-user in SFX menu  sub-element of target
target_service_idTargetService Internal ID  sub-element of target
service_typeServiceType - see main page for a list of allowed service types  sub-element of target
parserParser program name  sub-element of target
parse_paramParameters used by parser program  sub-element of target
proxyUse proxy for this target: yes/no  sub-element of target
crossrefUse CrossRef lookup to improve target linking for this target: yes/no  sub-element of target
notePublic note to be displayed in SFX menu  sub-element of target
authenticationAuthentication note to be displayed in SFX menu  sub-element of target
char_setCharacter set used for Target URL - default is UTF8  sub-element of target
displayerDisplayer program name  sub-element of target
target_urlTargetURL generated by parser program  sub-element of target

List of allowed service types: getAbstract, getAlikeRecord, getAuthor, getAuthorEmail, getBookReview, getCitedAuthor, getCitedBook, getCitedGenome, getCitedJournal, getCitedRecord, getCitedReference, getDocumentDelivery, getDOI, getFullTxt, getHolding, getMessageNoFullTxt, getPayPerView, getReference, getSelectedFullTxt, getSubject, getTOC, getWebSearch, getWebService

 

3. multi_obj_detailed_xml

This response type is intended to provide advanced options for inclusion of additional details in the XML response. It is the most comprehensive response in XML format.
Details that can be added include:

  • Availability (coverage statement) in the API response, both in structured XML and in a user-readable text string.
  • SFX KnowledgeBase Target, Target Service, and Portfolio identifiers.
  • Journal relationship information in the API response, and an indication when a target is for a close or remote related object

To configure the 'Multi-Object Detailed XML,' go to the API section in SFX Admin > Administrator Tools > Menu Configuration. You can select number of additional XML tags to include in the 'Multi-Object Detailed XML' response.
Additionally, it is possible to configure the existing 'Multi-Object XML' response to behave identically to the new 'Multi-Object Detailed XML.' 

ElementDescriptionValueDefaultStructure
?xmlversion="1.0"encoding="UTF-8" ?Description of XML version used and character encoding usedno value  
ctx_obj_setThis element is a wrapper holding one or more autonomous XML ContextObjectsno value root element
ctx_objXML representation of one particular ContextObject and its target(s)  sub-element of ctx_obj_set
identifierNumber to identify the ContextObject - needed in case multiple ContexObjects are sent in the request  attribute of ctx_obj
ctx_obj_attributesXML representation of the ContextObject  sub-element of ctx_obj
ctx_obj_targetsContains list of SFX targets appropriate for this particular ContextObject  sub-element of ctx_obj
targetSFX target appropriate for this particular ContextObject  Sub-element of ctx_obj_targets
target_nameTarget name internal name - Target as displayed in KBManager list of targets.  sub-element of target
target_public_nameTarget public name - as displayed to end-user in SFX menu  sub-element of target
object_portfolio_idObject Portfolio Internal ID - only included if configured in SFXAdmin > Menu configuration > SFX API   
target_idTarget Internal ID - only included if configured in SFXAdmin > Menu configuration > SFX API   
target_service_idTarget Service Internal ID  sub-element of target
Service_typeServiceType - see main page for a list of allowed service types  sub-element of target
ParserParser program name  sub-element of target
Parse_paramParameters used by parser program  sub-element of target
ProxyUse proxy for this target: yes/no  sub-element of target
CrossrefUse CrossRef lookup to improve target linking for this target: yes/no  sub-element of target
NotePublic note to be displayed in SFX menu  sub-element of target
authenticationAuthentication note to be displayed in SFX menu  sub-element of target
Char_setCharacter set used for Target URL - default is UTF8  sub-element of target
DisplayerDisplayer program name  sub-element of target
Target_urlTargetURL generated by parser program  sub-element of target
is_relatedIndicates whether this is a target for a related object or not, and what type of relation it is (close or remote).
Values can be: no/close/remote
This element is only included if configured in SFXAdmin > Menu configuration > SFX API
  sub-element of target
related_service_infoIncluded only for remote relation types. 
The type of relation and the related object information are included in its sub-elements.
This element and its sub-elements  are only included if configured in SFXAdmin > Menu configuration > SFX API
  sub-element of target
relation_typeType of relation  sub-element of related_service_info
related_object_issnISSN of related Object  sub-element of related_service_info
related_object_titleTitle of related Object  sub-element of related_service_info
related_object_idOBJECT_ID of related object  sub-element of related_service_info
coverageThis element and its sub-elements is  only included if configured in SFXAdmin > Menu configuration > SFX API  sub-element of target
coverage_text   sub-element of coverage
From   sub-element of coverage
To    
embargo   sub-element of coverage
threshold_text   sub-element of coverage_text
embargo_text   sub-element of coverage_text
coverage_statement   sub-element of threshold_text
Year   sub-element of from/to
volume   sub-element of from/to
issue   sub-element of from/to

List of allowed service types: getAbstract, getAlikeRecord, getAuthor, getAuthorEmail, getBookReview, getCitedAuthor, getCitedBook, getCitedGenome, getCitedJournal, getCitedRecord, getCitedReference, getDocumentDelivery, getDOI, getFullTxt, getHolding, getMessageNoFullTxt, getPayPerView, getReference, getSelectedFullTxt, getSubject, getTOC, getWebSearch, getWebService

 

4. service_exist

SFX will respond by indicating whether services exist for a particular ContextObject. This format supports XML files that contain one or more ContextObjects. No TargetURLs or details about services are provided, which makes this format lightweight and fast. It can be used in combination with the ServiceType restriction (for instance FullText) to include full text indicator buttons for records with full text in SFX. 

ElementDescriptionValueDefaultStructure
?xml version="1.0" encoding="UTF-8" ?Description of XML version used and character encoding usedno value  
ctx_obj_setThis element is a wrapper holding one or more autonomous XML ContextObjectsno value root element
ctx_objXML representation of one particular ContextObject and its target(s)  sub-element of ctx_obj_set
indexNumber to identify the ContextObject - needed in case multiple ContexObjects are sent in the requestnumber attribute of ctx_obj
idSFX OBJECT_ID if a match can be found for that object in the SFX Databasenumber attribute of ctx_obj
service_existElement which provides information about servicesNo value sub-element of ctx_obj
serviceslists whether SFX services exist for the current ContextObjectValues can be 'yes' or 'no' sub-element of service_exist

 

Example Input

Request with Single Object:

<?xml version="1.0"encoding="UTF-8"?><ctx:context-objectsxmlns:ctx="info:ofi/fmt:xml:xsd:ctx"xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance"xsi:schemaLocation="info:ofi/fmt:xml:xsd:ctx http://www.openurl.info/registry/docs/info:ofi/
fmt:xml:xsd:ctx"><ctx:context-object timestamp="2005-07-28T11:13:00Z"version="Z39.88-2004"identifier="01">
<ctx:referent><ctx:metadata-by-val><ctx:format>info:ofi/fmt:xml:xsd:journal</ctx:format><ctx:metadata>
<rft:journalxmlns:rft="info:ofi/fmt:xml:xsd:journal"xsi:schemaLocation="info:ofi/fmt:xml:xsd:journal
<rft:issn>0002-8282</rft:issn>
<rft:date>1990</rft:date><rft:volume>32</rft:volume><rft:issue>1</rft:issue></rft:journal></ctx:metadata>
</ctx:metadata-by-val></ctx:referent><ctx:requester><ctx:identifier>mailto:jane.doe@caltech.edu</ctx:identifier>
<ctx:metadata-by-val><ctx:metadata><req:ipxmlns:req="info:ofi/req">10.1.235.47</req:ip>
</ctx:metadata></ctx:metadata-by-val></ctx:requester><ctx:referring-entity><ctx:identifier>info:doi/10.1006/
mthe.2000.0239</ctx:identifier></ctx:referring-entity><ctx:service-type><ctx:metadata-by-val>
<ctx:format>info:ofi/fmt:xml:xsd:sch_svc</ctx:format><ctx:metadata><sv:fulltextxmlns:sv="info:ofi/
fmt:xml:xsd:sch_svc">yes</sv:fulltext></ctx:metadata></ctx:metadata-by-val></ctx:service-type><ctx:referrer>
<ctx:identifier>info:sid/elsevier.com:ScienceDirect</ctx:identifier></ctx:referrer><sfx><metadata-by-val>
<metadata><ignore_date_threshold>1</ignore_date_threshold></metadata></metadata-by-val></sfx>
</ctx:context-object><ctx:context-object timestamp="2005-07-28T12:13:00Z"version="Z39.88-2004"identifier="02">
<ctx:referent><ctx:metadata-by-val><ctx:format>info:ofi/fmt:xml:xsd:journal</ctx:format><ctx:metadata>
<rft:journalxmlns:rft="info:ofi/fmt:xml:xsd:journal"xsi:schemaLocation="info:ofi/fmt:xml:xsd:journal
<rft:issn>0001-4842</rft:issn>
<rft:date>1968</rft:date><rft:volume>1</rft:volume><rft:issue>2</rft:issue></rft:journal></ctx:metadata>
</ctx:metadata-by-val></ctx:referent><ctx:requester><ctx:metadata-by-val><ctx:metadata>
<req:ipxmlns:req="info:ofi/req">10.1.235.33</req:ip></ctx:metadata></ctx:metadata-by-val></ctx:requester>
</ctx:context-object></ctx:context-objects>

 

Request with Multiple Complex Object:

<?xml version="1.0" encoding="UTF-8" ?>
<ctx:context-objects xmlns:ctx="info:ofi/fmt:xml:xsd:ctx" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:ofi/fmt:xml:xsd:ctx http://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:ctx">
<ctx:context-object timestamp="2005-07-28T11:13:00Z" version="Z39.88-2004" identifier="01">
<ctx:referent>
<ctx:metadata-by-val>
<ctx:format>info:ofi/fmt:xml:xsd:journal</ctx:format>
<ctx:metadata>
<rft:journal xmlns:rft="info:ofi/fmt:xml:xsd:journal" xsi:schemaLocation="info:ofi/fmt:xml:xsd:journal http://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:journal">
<rft:issn>0002-8282</rft:issn>
<rft:date>1990</rft:date>
<rft:volume>32</rft:volume>
<rft:issue>1</rft:issue>
</rft:journal>
</ctx:metadata>
</ctx:metadata-by-val>
</ctx:referent>
<ctx:requester>
<ctx:metadata-by-val>
<ctx:metadata>
<req:ip xmlns:req="info:ofi/req">10.1.235.47</req:ip>
</ctx:metadata>
</ctx:metadata-by-val>
</ctx:requester>
<ctx:service-type>
<ctx:metadata-by-val>
<ctx:format>info:ofi/fmt:xml:xsd:sch_svc</ctx:format>
<ctx:metadata>
<sv:fulltext xmlns:sv="info:ofi/fmt:xml:xsd:sch_svc">yes</sv:fulltext>
</ctx:metadata>
</ctx:metadata-by-val>
</ctx:service-type>
</ctx:context-object>
<ctx:context-object timestamp="2005-07-28T12:13:00Z" version="Z39.88-2004" identifier="02">
<ctx:referent>
<ctx:metadata-by-val>
<ctx:format>info:ofi/fmt:xml:xsd:journal</ctx:format>
<ctx:metadata>
<rft:journal xmlns:rft="info:ofi/fmt:xml:xsd:journal" xsi:schemaLocation="info:ofi/fmt:xml:xsd:journal http://www.openurl.info/registry/docs/info:ofi/fmt:xml:xsd:journal">
<rft:issn>0001-4842</rft:issn>
<rft:date>1968</rft:date>
<rft:volume>1</rft:volume>
<rft:issue>2</rft:issue>
</rft:journal>
</ctx:metadata>
</ctx:metadata-by-val>
</ctx:referent>
<ctx:requester>
<ctx:metadata-by-val>
<ctx:metadata>
<req:ip xmlns:req="info:ofi/req">10.1.235.33</req:ip>
</ctx:metadata>
</ctx:metadata-by-val>
</ctx:requester>
</ctx:context-object>
</ctx:context-objects>

 

Example Output

simplexml:

<?xml version="1.0" encoding="UTF-8" ?>
  <sfx_menu>
  <ctx_obj_set><ctx_object_1><perldata> <hash> <item key="rft.issn">0363-2415</item> <item key="_stash"> <hash> <item key="@rfr_id"> <array> <item key="0">info:sid/metalib.com:PUBMED</item> </array> </item> </hash> </item> <item key="ctx_ver">Z39.88-2004</item> <item key="rft.year">2004</item> <item key="rft.eissn">1548-8446</item> <item key="@rfr_id"> <array> <item key="0">info:sid/metalib.com:PUBMED</item> </array> </item> <item key="rft.place">Bethesda, MD</item> <item key="@sfx.subcategory"> <array> <item key="0">Fisheries and Aquaculture</item> </array> </item> <item key="@rft_id"> <array> </array> </item> <item key="sfx.response_type">simplexml</item> <item key="sfx.ignore_char_set">1</item> <item key="req.session_id">sF9EA141E-14F0-11DD-931E-85C8F42DA125</item> <item key="char_set">utf8</item> <item key="ctx_id">123</item> <item key="rft.object_type">JOURNAL</item> <item key="rft.issue_start">2</item> <item key="sfx.has_full_text">yes</item> <item key="rft.object_id">954925522723</item> <item key="rft.volume_start">2</item> <item key="rft.volume">2</item> <item key="sfx.request_id">601157</item> <item key="rft.genre">journal</item> <item key="req.user_group"></item> <item key="rft.pub">American Fisheries Society</item> <item key="rfr.rfr">metalib.com:PUBMED</item> <item key="rft.issue">2</item> <item key="req.faculty"></item> <item key="sfx.openurl"></item> <item key="req.language">English</item> <item key="rft.title">Fisheries</item> <item key="@rfe_id"> <array> </array> </item> <item key="rft.coden">FISHDN</item> <item key="rft.jtitle">Fisheries</item> <item key="sfx.sourcename">METALIB</item> <item key="rft_val_fmt">journal</item> <item key="sfx.sid">metalib.com:PUBMED</item> <item key="rft.date">2004</item> <item key="@sfx.category"> <array> <item key="0">Agriculture Sciences</item> </array> </item> </hash> </perldata> </ctx_object_1></ctx_obj_set>
  <targets>
  <target>
  <target_name>ALLEN_PRESS_AMERICAN_FISHERIES_SOCIETY</target_name>
  <target_public_name>American Fisheries Society test</target_public_name>
  <target_service_id>111068679117002</target_service_id>
  <service_type>getFullTxt</service_type>
  <parser>ALLEN::ALLEN</parser>
  <parse_param>url=afs.allenpress.com/afsonline & exception1=1</parse_param>
  <proxy>no</proxy>
  <crossref>no</crossref>
  <note />
  <authentication />
  <char_set />
  <displayer />
  <target_url></target_url>
  </target>
  </targets>
  </sfx_menu>

 

multi_obj_xml:

<?xml version="1.0" encoding="UTF-8" ?>
  <ctx_obj_set>
  <ctx_obj identifier="123">
  <ctx_obj_attributes><perldata> <hash> <item key="rft.issn">0363-2415</item> <item key="_stash"> <hash> <item key="@rfr_id"> <array> <item key="0">info:sid/metalib.com:PUBMED</item> </array> </item> </hash> </item> <item key="ctx_ver">Z39.88-2004</item> <item key="rft.year">2004</item> <item key="rft.eissn">1548-8446</item> <item key="@rfr_id"> <array> <item key="0">info:sid/metalib.com:PUBMED</item> </array> </item> <item key="rft.place">Bethesda, MD</item> <item key="@sfx.subcategory"> <array> <item key="0">Fisheries and Aquaculture</item> </array> </item> <item key="@rft_id"> <array> </array> </item> <item key="sfx.response_type">multi_obj_xml</item> <item key="sfx.ignore_char_set">1</item> <item key="req.session_id">s3AEDD874-14F1-11DD-931E-85C8F42DA125</item> <item key="char_set">utf8</item> <item key="ctx_id">123</item> <item key="rft.object_type">JOURNAL</item> <item key="rft.issue_start">2</item> <item key="sfx.has_full_text">yes</item> <item key="rft.object_id">954925522723</item> <item key="rft.volume_start">2</item> <item key="rft.volume">2</item> <item key="sfx.request_id">601158</item> <item key="rft.genre">journal</item> <item key="req.user_group"></item> <item key="rft.pub">American Fisheries Society</item> <item key="rfr.rfr">metalib.com:PUBMED</item> <item key="rft.issue">2</item> <item key="req.faculty"></item> <item key="sfx.openurl"></item> <item key="req.language">English</item> <item key="rft.title">Fisheries</item> <item key="@rfe_id"> <array> </array> </item> <item key="rft.coden">FISHDN</item> <item key="rft.jtitle">Fisheries</item> <item key="sfx.sourcename">METALIB</item> <item key="rft_val_fmt">journal</item> <item key="sfx.sid">metalib.com:PUBMED</item> <item key="rft.date">2004</item> <item key="@sfx.category"> <array> <item key="0">Agriculture Sciences</item> </array> </item> </hash> </perldata></ctx_obj_attributes>
  <ctx_obj_targets>
  <target>
  <target_name>ALLEN_PRESS_AMERICAN_FISHERIES_SOCIETY</target_name>
  <target_public_name>American Fisheries Society test</target_public_name>
  <target_service_id>111068679117002</target_service_id>
  <service_type>getFullTxt</service_type>
  <parser>ALLEN::ALLEN</parser>
  <parse_param>url=afs.allenpress.com/afsonline & exception1=1</parse_param>
  <proxy>no</proxy>
  <crossref>no</crossref>
  <note />
  <authentication />
  <char_set />
  <displayer />
  <target_url></target_url>
  </target>
  </ctx_obj_targets>
  </ctx_obj>
  </ctx_obj_set>

 

multi_obj_detailed_xml:

<?xml version="1.0" encoding="UTF-8" ?>
  <ctx_obj_set>
  <ctx_obj identifier="123">
  <ctx_obj_attributes><perldata> <hash> <item key="rft.issn">1068-0241</item> <item key="_stash"> <hash> </hash> </item> <item key="ctx_ver">Z39.88-2004</item> <item key="rft.year">2004</item> <item key="rft.place">[Indiana, Pa.</item> <item key="@rft_id"> <array> </array> </item> <item key="sfx.response_type">multi_obj_detailed_xml</item> <item key="sfx.ignore_char_set">1</item> <item key="req.session_id">s139900F4-14F2-11DD-931E-85C8F42DA125</item> <item key="ctx_id">123</item> <item key="rft.object_type">JOURNAL</item> <item key="rft.issue_start">2</item> <item key="@sfx.related_object_ids"> <array> <item key="0">110978984565299</item> </array> </item> <item key="sfx.has_full_text">yes</item> <item key="rft.object_id">991042749796234</item> <item key="rft.volume_start">2</item> <item key="rft.volume">2</item> <item key="rft.genre">journal</item> <item key="sfx.request_id">601163</item> <item key="rft.pub">American Society for Competitiveness</item> <item key="req.user_group"></item> <item key="rft.issue">2</item> <item key="req.faculty"></item> <item key="rft.title">Advances in competitiveness research</item> <item key="req.language">English</item> <item key="@rfe_id"> <array> </array> </item> <item key="@sfx.related_objects"> <array> <item key="0"> <hash> <item key="rft.volume_start">2</item> <item key="rft.volume">2</item> <item key="rft.issn">1071-0736</item><item key="rft.pub">Emerald Group Publishing, Ltd.</item> <item key="ctx_ver">Z39.88-2004</item> <item key="rft.issue">2</item> <item key="rft.year">2004</item><item key="rft.place">Indiana, PA</item> <item key="req.language">English</item> <item key="rft.title">Global competitiveness</item><itemkey="@sfx.subcategory"> <array> <item key="0">Business Management</item> <item key="1">Economics</item> <item key="2">International Business &amp; Transnational Corporations</item> <item key="3">Trade and Commerce</item> <item key="4">Mining Engineering</item> </array> </item> <item key="@rft.stitle"> <array> <item key="0">GLOBAL COMPETITIVENESS JGC</item> </array> </item> <item key="sfx.response_type">multi_obj_detailed_xml</item> <item key="sfx.sourcename">DEFAULT</item> <item key="rft_val_fmt">journal</item> <item key="sfx.ignore_char_set">1</item> <item key="rft.date">2004</item> <item key="sfx.sid">DEFAULT</item> <item key="req.session_id">s139900F4-14F2-11DD-931E-85C8F42DA125</item> <item key="ctx_id">123</item> <item key="@sfx.category"> <array> <item key="0">Business, Economy and Management</item> <item key="1">Business, Economy and Management</item> <item key="2">Business, Economy and Management</item> <item key="3">Business, Economy and Management</item> <item key="4">Engineering</item> </array> </item> <item key="rft.object_type">JOURNAL</item> <item key="rft.issue_start">2</item> <item key="@sfx.related_object_ids"> <array> <item key="0">991042749796234</item> </array> </item> <item key="rft.object_id">110978984565299</item> </hash> </item> </array> </item> <item key="sfx.sourcename">DEFAULT</item> <item key="rft.jtitle">Advances in competitiveness research</item> <item key="rft_val_fmt">journal</item> <itemkey="rft.date">2004</item> <item key="sfx.sid">DEFAULT</item> </hash> </perldata></ctx_obj_attributes>
  <ctx_obj_targets>
 <target>
 <target_name>GALEGROUP_IT_INFOTRAC_ONEFILE_JOURNALS</target_name>
  <target_public_name>GaleGroup General OneFile</target_public_name>
 <object_portfolio_id>1000000000710897</object_portfolio_id>
  <target_id>111021039760000</target_id>
  <target_service_id>111021039760001</target_service_id>
  <service_type>getFullTxt</service_type>
  <parser>Gale::InfoTrac</parser>
  <parse_param>url=http://infotrac.galegroup.com/& database=ITOF & loc_id=sfx_loc1 & art=yes & ltitle=Global+Competitiveness</parse_param>
  <proxy>no</proxy>
  <crossref>no</crossref>
  <note />
  <authentication />
  <char_set />
  <displayer />
<target_url></target_url>
  <is_related>remote</is_related>
  <related_service_info>
  <relation_type>CONTINUED_BY</relation_type>
  <related_object_issn>1071-0736</related_object_issn>
  <related_object_title>Global competitiveness</related_object_title>
  <related_object_id>110978984565299</related_object_id>
  </related_service_info>
  <coverage>
  <coverage_text>
  <threshold_text>
  <coverage_statement>Available from 1999</coverage_statement>
  </threshold_text>
  <embargo_text />
  </coverage_text>
  <from>
  <year>1999</year>
  </from>
  <embargo />
  </coverage>
  </target>
  </ctx_obj_targets>
  </ctx_obj>
  </ctx_obj_set>

 

service_exist:

<?xmlversion="1.0"encoding="UTF-8" ?>
  <ctx_obj_set>
     <ctx_obj index="002" id="954921332001">
     <service_exist>
         <services>yes</services>
         </service_exist>
     </ctx_obj>
     <ctx_obj index="001" id="954921332001">
         <service_exist>
         <services>no</services>
         </service_exist>
     </ctx_obj>
  </ctx_obj_set>

 

Notes

Matthew Phillips

It appears that the XML context objects need to be POSTed to the server as the value of the url_ctx_val parameter. I also set the url_ctx_fmt parameter to info:ofi/fmt:xml:xsd:ctx as that is what MetaLib does.

 

Peter van Boheemen

Why is the response poor compared to the 'normal' SFX response. One major difference is that for a target there is no info about the holdings in SFX. In the html page the years that are available are displayed for each target.

 

Erez Shabo

In the SFX menu response, the display of availability info is controlled per source

Go to SFXAdmin > KBManager > sources section ('edit' window for each source contains checkbox option 'Show Availability')

In the SFX API response, the availability info is only included in the in the multi_obj_detailed_xml format if you have the 'include availability' option turned on.

Go to SFXAdmin > Menu configuration > SFX API and check following option:

(v) Include availability info in text format

The 'Show availability' option has no impact on performance of the SFX API. What makes the SFX API slower than the SFX menu response is that fact that in the SFX API, all target URLS need to be calculated - this is not the case for the SFX menu (where SFX resolver and target parser only 'kick into action' when the enduser clicks the 'go' button for a target).