1 / 83

XML/XSL-Based Printing Mechanism for v.16

XML/XSL-Based Printing Mechanism for v.16. V.16 eSeminar Eitan Schuler. PC SERVER Batch Jobs. SERVER. PrintFile (Printouts) XML. Translation. XML. CLIENT GUI, Job manager, Print Daemon. E-mail. XML. Preview. HTML. Print. XSL. Save As. XML/XSL - Advantages.

fsnyder
Download Presentation

XML/XSL-Based Printing Mechanism for v.16

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. XML/XSL-Based Printing Mechanism for v.16 V.16 eSeminar Eitan Schuler

  2. PC SERVER Batch Jobs SERVER PrintFile (Printouts) XML Translation XML CLIENT GUI, Job manager, Print Daemon E-mail XML Preview HTML Print XSL Save As XML/XSL Printing in v.16

  3. XML/XSL - Advantages • Multi Tier architecture: • Data retrieval (XML) • Data translation (TRN) • Data formatting (XSL) • XML contains all potential data from any relevant Z table. Adding data to the display is easy. • Makes data translation simple • Option to execute external programs • Built-in support of UTF-8 XML/XSL Printing in v.16

  4. XML/XSL - Advantages • Fast-growing standard – help and support readily available. • XSL supports include files – common blocks can be encapsulated in common functions • Print History XML/XSL Printing in v.16

  5. XML in ALEPH • Printfile is a file which includes one or more printouts • Printout is a print entity, which begins with: ## - XML_XSL ## - PLAIN ## - EXECUTE ## - HTML • XML_XSL is the default for all printouts but the GUI clients can also print Plain/HTML printouts. XML/XSL Printing in v.16

  6. XML in ALEPH • ## - XML_XSL • <?xml version="1.0"?> • <printout> • <form-name>acq-s-order-slip</form-name> • <form-language>ENG</form-language> • <form-format>01</form-format> • further options: • <display>Y</display> • <saveas>Y</saveas> • <email-address>y@mail.com</email-address> XML/XSL Printing in v.16

  7. XML in ALEPH <section-1> • General information of the form. • Usually appears only once in a printout. <section-2…. and further> • These sections can be repeated. XML/XSL Printing in v.16

  8. XML in ALEPH - Example <printout> <form-name>catalog-records-columnar</form-name> <form-language>ENG</form-language> <form-format>06</form-format> <section-01> <form-date>27/02/2002</form-date> <sub-library-address-1-occ1>Acquisition Unit 1</…. <sub-library-address-1-occ2>Manag. Building</…. <sub-library-address-1-occ3>Ex Libris University</…. ........................ <z68-doc-number>899</z68-doc-number> <z68-sequence>1</z68-sequence> <z68-order-type>Monograph</z68-order-type> <z68-order-number>1190</z68-order-number> <z68-order-number-1>1190-1</z68-order-number-1> <z68-order-number-2></z68-order-number-2> ........................ </section-01> XML/XSL Printing in v.16

  9. XML in ALEPH - Example <section-02> <z601-budget-number>AAA-2002</z601-budget-number> <z601-sequence>400402583056500</z601-sequence> <z601-vendor-code>A.M.S.</z601-vendor-code> <z601-invoice-number>888</z601-invoice-number> ........................ </section-02> <section-02> <z601-budget-number>AAA-2002</z601-budget-number> <z601-sequence>400402583081202</z601-sequence> <z601-vendor-code>A.M.S.</z601-vendor-code> <z601-invoice-number>889</z601-invoice-number> ........................ </section-02> </printout> XML/XSL Printing in v.16

  10. XML in ALEPH - Example XML/XSL Printing in v.16

  11. XML in ALEPH - Example XML/XSL Printing in v.16

  12. Database Data 15042001 Y 000430 Printform Data 15/04/2001 Yes 430 Translate Mechanism XML/XSL Printing in v.16

  13. Translate Mechanism In usm01/form_<lng> there are two types of files: xxxx[-nn].xsl The printout xsl stylesheet xxxx[-nn].trn A flat file including the translate rules for the specific printout In addition, there is global.trn for global translation rules XML/XSL Printing in v.16

  14. Translate Mechanism The naming convention depends on the standard header of any XML output: <form-name>acq-s-order-slip</form-name> <form-language>GER</form-language> <form-format>01</form-format> The translation file is searched in the following order: /usm01/form_ger/acq-s-order-slip-01.trn /usm01/form_ger/acq-s-order-slip. trn /usm01/form_ger/global.trn If the translation file is not found, the system will search again based on $control_lng. XML/XSL Printing in v.16

  15. Translate Mechanism • Translation rules can be multiple, for example, you could choose to translate a decimal number in two steps: • Delete leading zeros • Delete the ‘+’ sign for positive numbers • A translation rule found in one of the files is not searched anymore in the more general files. • Special translation keyword “NONE” for no translation whatsoever. XML/XSL Printing in v.16

  16. Translate Mechanism field name data type single / multiple parameters XML/XSL Printing in v.16

  17. XML Before Translation <?xml version="1.0"?> <printout> <form-name>acq-m-order-info</form-name> <form-language>ENG</form-language> <form-format>00</form-format> <section-01> <form-date>20020219</form-date> <z68-doc-number>000000230</z68-doc-number> <z68-sequence>00007</z68-sequence> <z68-order-type>M</z68-order-type> <z68-open-date>20011021</z68-open-date> <z68-order-status>SV</z68-order-status> <z68-arrival-status>C</z68-arrival-status> <z68-sub-library>URLEC</z68-sub-library> XML/XSL Printing in v.16

  18. XML After Translation <?xml version="1.0"?> <printout> <form-name>acq-m-order-info</form-name> <form-language>ENG</form-language> <form-format>00</form-format> <section-01> <form-date>19/02/2002</form-date> <z68-doc-number>230</z68-doc-number> <z68-sequence>7</z68-sequence> <z68-order-type>Monograph</z68-order-type> <z68-open-date>21/10/2001</z68-open-date> <z68-order-status>Sent to vendor</z68-order-status> <z68-arrival-status>Complete</z68-arrival-status> <z68-sub-library>UELEC Reading Room</z68-sub-….> XML/XSL Printing in v.16

  19. What Can Be Translated ? • PC-TAB-EXP – Any value from pc_tab_exp_field.eng • DATE/TIME – Date and Time • TEXT – Free text translation • CASH-STATU/CASH-DESC – Cash status and description (cash_status_heading/tab18) • SIGN1/SIGN2/DEL-SIGN/ADD-SIGN – Various sign formatting • CREDIT-TXT/DEBIT-TXT – Replace sign with text • INTEGER – Format numbers • DECIMAL – Format decimal numbers • Z30-MATER – Item material type (tab25) XML/XSL Printing in v.16

  20. What can be Translated ? • SUB-LIB – Sublibrary as defined in tab_sub_library • OBJ-CODE – Invoice object code • LOCATION/LOCATION_B – Formatting call numbers • COLLECTION – Item collection (tab40) • CURRENCY – Currency name (Z83) • ITEM-STA – Item status (tab15) • LOAN-STA – Loan Status including due-date, transit, lost, recall, and so on • FORM-PRINT-METHOD – Determines whether or not e-mail is sent • FORM-PRINT-FORMAT – Defines conditions for form formats XML/XSL Printing in v.16

  21. Translate Mechanism M505>> translate_off switches the translate mechanism off M505>> translate_on switches the translate mechanism on Useful when analyzing problems or checking real data. Restart servers/batch queue is needed. XML/XSL Printing in v.16

  22. PrintUtil Mechanism PrintUtil is the GUI component for all printouts including the types: • Print • E-mail • Preview/Save As • Execute external program The printing types are dependent on: • printout file (XML) • print.ini • print configuration XML/XSL Printing in v.16

  23. PrintUtil Mechanism • In the event that the print configuration is “Normal Printing”, the printout is defined by the default print method unless the XML file specifies a different method such as E-mail. • E-mail is also dependent on the print.ini definition. For example, e-mail messages may not be allowed, or normal printing is specified in addition to e-mail messages. • If the XML specifies Execute/Preview/Save as, the printout is neither sent by e-mail nor printed. XML/XSL Printing in v.16

  24. Print Configuration There are four types of configurations: Normal Printing Preview View Raw XML Browse XML PrintUtil Mechanism XML/XSL Printing in v.16

  25. Print Configuration: Preview XML/XSL Printing in v.16

  26. Print Configuration: View Raw XML XML/XSL Printing in v.16

  27. Print Configuration: Browse XML XML/XSL Printing in v.16

  28. Print Methods The PrintUtil entity gets a printfile, and proceeds with the printouts. There are four types of print methods depending on the printout types: • ## - XML_XSL • ## - PLAIN • ## - HTML • ## - EXECUTE XML/XSL Printing in v.16

  29. Print Method PLAIN PrintUtil applies HTML formatting to the plain printout. The font types are defined in alephcom.ini ## - PLAIN, U01 XML/XSL Printing in v.16

  30. Print Method PLAIN ## - PLAIN,U01 This row determines the HTML in terms of: • Character set • Font size • Font type In any case, when a printout does not define a print method, the default is: ## - PLAIN,L01 XML/XSL Printing in v.16

  31. Print Method PLAIN In a PLAIN printout we can have more “##”s as long as they follow the “## - PLAIN” line. ## - PREVIEW ## - SAVE_AS ## - EDIT ## - EMAIL_ADDRESS My@email.com The above are also included in the HTML print method. XML/XSL Printing in v.16

  32. Print Method HTML ## - HTML If the print method of the printout is HTML, it stays as is, and will be printed as HTML. XML/XSL Printing in v.16

  33. Print Method EXECUTE ## -EXECUTE <program> Where <program> is defined in alephcom.ini : [PrintExecute] EDIT=notepad.exe $1 LABEL_PRINTER=c:\label\print_label.exe This means, that printouts containing the EXECUTE method will be passed on to the respective program. The EXECUTE method can be applied to any ALEPH printout. XML/XSL Printing in v.16

  34. Print Method EXECUTE In /usm01/tab form_print_method: • format-name • format number • default print method XML/XSL Printing in v.16

  35. Print Method SERVER-EXECUTE In /usm01/tab form_print_method: ! 1 2 3 4 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!-! delete-unlinked-headings XML_XSL opac-print SERVER-EXECUTE ttt Y • SERVER-EXECUTE ttt – the name of a directory in $data_printUseful when you want to execute a third-party application specifically for this form • Notification will be sent to the GUI XML/XSL Printing in v.16

  36. Print Method Translate Field • In /usm01/tab form_print_method: ! 1 2 3 4 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-!-! delete-unlinked-headings XML_XSL opac-print SERVER-EXECUTE ttt N Y • Translate – here you can cancel XML translation for a specific printout XML/XSL Printing in v.16

  37. Print Method XML_XSL • ## - XML_XSL • The report data in ALEPH is contained in XML files. • For each XML an XSL file is defined (XSL template). This template determines: • what fields of the XML are part of the report • how they should be displayed XML/XSL Printing in v.16

  38. Print Method XML_XSL • The XSL files are located in /usm01/form_<lng> in the server. • When connecting from the client to the server, the XSL files are being downloaded to the client depending on a date check. XML/XSL Printing in v.16

  39. The PrintUtil searches the XSL according to the form-name, form-format and form-language tags as found in the XML. The result is an HTML file that will be printed or sent by e-mail. Print Method XML_XSL XML/XSL Printing in v.16

  40. All e-mail messages carry an attachment with an HTML version of the printout. In addition the body is a plain text taken from \alephcom\tab\<lng>\mail_header.dat The e-mail’s subject is determined in form_description.eng as follows: E-mails and HTML XML/XSL Printing in v.16

  41. In the “## - PLAIN” print method the original plain text is sent as the body. You can also create XSL templates that produce plain text. In this case this plain text will replace the standard body. E-mails and HTML XML/XSL Printing in v.16

  42. attachment plain text XSL Plain Text Version XML/XSL Printing in v.16

  43. Print History Special feature for saving and recovering printouts. Analysis and Recovery XML/XSL Printing in v.16

  44. Print History Analysis and Recovery date files hour XML/XSL Printing in v.16

  45. The configurations are the same, as in direct printing. Here we have all options that resemble the options in the printout, print.ini and the print configuration. This way we can force e-mail or preview the history, etc. Analysis and Recovery XML/XSL Printing in v.16

  46. Print History Analysis and Recovery XML config. e-mail XML/XSL Printing in v.16

  47. Print History Normal Printing configuration gives us three options as in print.ini: Print Mail Both Analysis and Recovery XML/XSL Printing in v.16

  48. Writing Templates in XSL for Letters and Reports V.16 e-Seminar Eitan Schuler eitan.schuler@exlibris.co.il

  49. XSL in ALEPH Reports and letters in ALEPH (starting 15.2) are contained in XML files. For each report an XSL file (template) is defined. This template determines: • What fields of the XML are part of the report/letter • How they should be displayed. XML/XSL Printing in v.16

  50. XSL in ALEPH In addition, there are several XSL files which are common to all reports, and they are referred to by all the specific XSL templates. They contain definitions for the rendering of common report blocks such as the standard salutations, signatures, sublibrary address, patron address etc. XML/XSL Printing in v.16

More Related