Creating Field Selectors for OpenURL Elements
This procedure describes creating a field selector for the data in an OpenURL.
If the data from an OpenURL meta tag requires manipulation before you use it in a data test, you can apply a regular expression to the data and use the result as the field selector. For example, the ISSN field in records can contain a hyphen. You can remove the hyphen by applying the regular expression /-// to the ISSN data. If a regular expression is specified, WebBridge LR uses the result of the regular expression as the value of the field selector.
WebBridge LR field selectors accept regular expressions such as POSIX Basic Regular Expressions (BREs) and Extended Regular Expressions (EREs) as implemented in the UNIX grep utility.
If a regular expression is specified, WebBridge LR uses the result of the regular expression as the value of the field selector.
To create a field selector, you can enter the:
- OpenURL meta tag from which to obtain the data
- regular expression for modifying the data (optional)
- coverage database fields to match the data against in a match data test (optional)
Innovative provides a wiki for field selectors that have been successfully tested with WebBridge LR.
Specifying the OpenURL Meta Tag
- Choose Field Selectors from the menu on the left-hand side of the WebBridge LR home page.
The Field Selectors tab displays: - Choose the Create New button.
The Field Selectors tab displays. - Enter a Name.
The name can be a maximum of 64 characters. - To distinguish field selectors with the same or similar names, enter a description in the Description text box. Descriptions are optional.
The description is used to distinguish field selectors with the same or similar names. For example, field selectors can be named VOLUME and VOLUME-3DIGIT, where VOLUME-3DIGIT has the description "Converts volume to 3 digits for Project Muse." - Expand the OpenURL menu.
- In the Definiton text box, enter an OpenURL meta tag (up to a maximum of 255 characters).
The Definiton text box for OpenURL accepts a pipe-delimited list of meta tags. For example, to specify either the rft.atitle or atitle OpenURL meta tag, you can enter:
rft.atitle|atitle
Specifying Regular Expressions
If the data from an OpenURL meta tag requires manipulation before you use it in a data test, you can apply a regular expression to the data and use the result as the field selector.
To manipulate the data in the OpenURL into a form other than the form it takes in the meta tag:
- Choose Field Selectors from the menu on the left-hand side of the WebBridge LR home page.
The Field Selectors tab displays: - Choose the Edit button associated with the field selector.
The Field Selector (<field selector_name>) tab displays. For example: - Expand the OpenURL menu.
- Enter a regular expression in the Regular Expression text box.
Use the format:
<delimiter><match><delimiter><replace><delimiter>
For example, the following expression removes the hyphen from the ISSN field:
/-//
You can enter multiple regular expressions in one text box. Place an underscore ( _ ) between regular expressions to apply multiple regular expressions to the same data.NOTE
Innovative does not provide support or training for the construction of regular expressions.
Examples of Field Selectors
Field Selector Name | Type | Definition | Regular Expression | Description |
ISSN | OpenURL | rft.issn|issn | /-// | ISSN with hyphen removed |
ISSN-HYPHEN | OpenURL | rft.issn|issn | /(^.{4})(.{4}$)/\1-\2/ | ISSN with hyphen |
TITLE | OpenURL | rft.title|title | Title |
Testing Regular Expressions for Field Selectors
To test the regular expression:
- Enter a value from an OpenURL meta tag in the Test regular expression with value text box.
- Choose Apply.
The value as modified by the regular expression displays.
Using Field Selectors in Match Data Tests
To use the field selector in a match data test:
- Choose Field Selectors from the menu on the left-hand side of the WebBridge LR home page.
The Field Selectors tab displays: - Choose the Edit button associated with the field selector.
The Field Selector (<field selector_name>) tab displays. For example: - Expand the Additional Settings menu.
The additional settings display: - To normalize the data from the OpenURL meta tag before comparing it to the coverage database field, choose "Yes" for Normalize?
Data is normalized according the the title-normalization rules set up on your system. This might include removing leading articles or making letters lower-case, etc. - Choose one or more Coverage Fields by moving them from the Available to Selected column.
During a match data test, the OpenURL meta tag data is matched against the chosen coverage field(s).