...
- Add column titles with the following:
- Bibliographic ID
- The Bibliographic ID will be the Variations XML file name (i.e. "VAA5239" from the file VAA5239.xml).
- Variations XML tag: //RecordSet/MediaObject/Label
- Bibliographic ID Label
- The XSL will fill this column with the word "other".
- Title
- This information will be overwritten by the information that the Bibliographic ID pulls in, but it is required.
- Variations XML tag: //DisplayTitle
- Creator
- This information will be overwritten by the information that the Bibliographic ID pulls in, but it is required.
- Variations XML tag: //Publisher
- Date Issued
- This information will be overwritten by the information that the Bibliographic ID pulls in, but it is required.
- Variations XML tag: //PublicationDate
- Label
- The XSL will fill this column with the word "other".
- File
- The file name(s) will be in the format of: vaa1234a.192k.mov
- You'll need a File column for each file associated with a Variations item.
- Variations XML tag: //RecordSet/MediaObject (The XSL edits the content of this tag so that it matches the file name and adds ".192k.mov")
- Label
- Leave this column blank.
- Bibliographic ID
...
Import the data from the batchingest.txt file
The separator character is: ^
Using a comma as the separator character causes problems (since commas are used in some of the Variations titles).
- Edit the dates in the Date Issued column.
- The format of the dates vary and may need edited (i.e. "[1934]").
xmlingest_sort.xsl
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="text"/> <xsl:template match="/"> <!-- Bibliographic ID Bibliographic ID Label Title Creator Date Issued Label File --> <xsl:variable name="publisherTest"><xsl:value-of select="//Publisher"/></xsl:variable>^<xslvariable> <xsl:variable name="yearTest"><xsl:value-of select="//PublicationDate"/></xsl:variable>^<xslvariable> <xsl:variable name="variationsName"><xsl:value-of select="//RecordSet/MediaObject/Label"/></xsl:variable>^<xslvariable> <xsl:value-of select="substring($variationsName,1,7)"/>^other^<xsl:value-of select="//DisplayTitle"/>^<xsl:if test="$publisherTest != ''"><xsl:value-of select="//Publisher"/></xsl:if><xsl:if test="$publisherTest = ''">unknown</xsl:if>^<xsl:if test="$yearTest != ''">^<xsl:value-of select="//PublicationDate"/></xsl:if><xsl:if test="$yearTest = ''">uuuu</xsl:if>^<xsl:for-each select="//RecordSet/MediaObject"><xsl:sort select="Label" data-type="text" order="ascending"/><xsl:if test="string-length(Label) = 8">assets/<xsl:value-of select="translate(Label, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>.192k.mov^^</xsl:if></xsl:for-each><xsl:for-each select="//RecordSet/MediaObject"><xsl:sort select="Label" data-type="text" order="ascending"/><xsl:if test="string-length(Label) > 8">assets/<xsl:value-of select="translate(Label, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')"/>.192k.mov^^</xsl:if></xsl:for-each>^ </xsl:template> </xsl:stylesheet> |
...