how to sort the “order information report” from the service “print acquisitions records...

Post on 08-Jan-2018

228 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

3 The form The service “Print Acquisitions Records acq-03” prints the form order-info-report. By default there is no option to select the format in the service No field to choose format of report

TRANSCRIPT

How to sort the “Order Information report” from the service “Print Acquisitions Records acq-03”

Yoel Kortick

2

Introduction• The sorting method employed here are not Ex

Libris inventions nor are they unique to Aleph.• We use here standard xsl sort parameters and

show examples of where this information may be found on the internet.

• We do two different types of sorts here, while the user may build several more local examples.

3

The form• The service “Print Acquisitions Records acq-03” prints

the form order-info-report.• By default there is no option to select the format in the

service

No field to choose format of report

4

The report• The output file by default is not sorted by any of the fields

chosen to print (Not by Sublibrary, Vendor or title)

5

The raw xml• If we look at the raw xml we see that each of the three fields

we printed are called “data-1”, “data-2” and “data-3”.

If we would want to sort the xsl by, for example, vendor code then we would sort it by “data-2”

6

Sorting the xsl• Here is the xsl standard for sorting a report• This is from http://www.w3schools.com/xsl/el_sort.asp

7

The edited xsl form• We add one line to the xsl form with the desired sort field.• In this case we edit the form order-info-report-01.xsl

This is the only line we need to add to the xsl

8

Choosing the new format via the service

• One option is just to have one format number and have every user use it.

• Another more “attractive” option is to make a pull down box in the service to choose the new format which sorts by the second value

• We will now add this option to the service interface

9

The form• The format number option already exists in the service

but by default it is “hidden”

10

The form• Now we have added the option to choose a format.• We removed the “hidden” tags and made a dropdown box..• This is file $aleph_root/pc_b_eng/p-acq-03.xml

11

Running the service• Here we run the service “Print Acquisition Records (acq-03)”

and print fields sub library, vendor code and Title.

Now we can choose format 01

12

The report is sorted

Format 01

Sorted by vendor code

13

Another format• Now we will add format 02 to p-acq-03.xml.• It is for descending order sort for the third parameter (in this

case title)

14

The xsl form• Here is $data_root/form_eng/order-info-report-02.xsl

This format is sorted descending by the third value

15

The xsl form• Now we run the service choosing format 02

16

The descending order report• The output is sorted by the third value (title) descending

Title descending order

Thank You!Yoel Kortick

top related