Download presentation
Presentation is loading. Please wait.
1
Normalization with XSLT
Charles Draper Curtis Thacker Brigham Young University IGeLU 2014
2
What is XSLT? A language for transforming an XML document into another XML Document.
3
Simple XSLT Example ----Source XML Document----
<record id=" "> <title>A Very Simple Record</title></record> ----Output XML Document---- <record> <control> <sourcerecordid> </sourcerecordid> </control> <display> <title>A Very Simple Record</title> </display></record> ----XSLT---- <xsl:stylesheet version="2.0" xmlns:xsl=" <xsl:template match="record"> <record> <control> <sourcerecordid> <xsl:value-of /> </sourcerecordid> </control> <display> <xsl:copy-of select="title" /> </display> </record></xsl:template></xsl:stylesheet >
4
Why XSLT? 1. XSLT is a programming language and therefore gives added flexibility and power when creating the PNX. 2. Only one copy of the rules needed when working with multiple institutions. Use if-else statements for differences between institutions. 3. Some normalization rules can be extremely lengthy and very complex. The logic can be greatly simplified through the power of XSLT.
5
XSLT File Splitter An extension of the built-in XML File Splitter that performs XSLT transformations at harvest time.
6
Overcoming Obstacles Performance – Transformation performance is greatly enhanced by using Michael Kay’s XSLT processor, Saxon. Memory consumption – The transformation takes place on individual records after the file has been split; not on the collection. Complexity – XSLT is a programming language so there's no getting around that; however, XSLT rules can be easier to maintain than normalization rules. Flexibility – Using a more advanced XSLT processor like Saxon allows one to use XSLT 2.0 (free) or even XSLT 3.0 (paid). These technologies give an enormous amount of flexibility.
7
Getting Started 1. Download the jar file for the splitter from 2. Download Saxon-HE (saxon9he.jar) from 3. Copy both jars to your Primo server into /exlibris/primo/p#_#/ng/primo/home/profile/publish/publish/production/conf/fileSplitter/lib
8
Getting Started (continued)
4. Copy the sample marc folder of XSL from to somewhere on your Primo server 5. Customize the XSLT for your institution 6. Ready your XML like normal for harvest
9
Getting Started (continued)
7. Add file splitter to mapping tables
10
Getting Started (continued)
8. Configure the file splitter
11
Getting Started (continued)
9. Create 1:1_XML Normalization mapping set
12
Getting Started (continued)
10. Setup your data source and pipe to use the XSLT File Splitter
13
Thank You
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.