Skip to content

Commit

Permalink
fix 533 s problem and update output - #207
Browse files Browse the repository at this point in the history
  • Loading branch information
cspayne committed Oct 30, 2024
1 parent db771b1 commit 7dc767b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions Working Documents/transformationCode/m2r-5xx.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -613,17 +613,17 @@
<xsl:call-template name="getmarc"/>
<xsl:for-each select="marc:subfield[@code = 'a']">
<rdamd:P30335>
<xsl:value-of select="translate(., '\.$', '') => normalize-space()"/>
<xsl:value-of select="replace(., '\.$', '') => normalize-space()"/>
</rdamd:P30335>
</xsl:for-each>
<xsl:for-each select="marc:subfield[@code = 'b']">
<rdamd:P30279>
<xsl:value-of select="translate(., '[:;]\s*$', '') => normalize-space() => uwf:removeBrackets()"/>
<xsl:value-of select="replace(., '[:;]\s*$', '') => normalize-space() => uwf:removeBrackets()"/>
</rdamd:P30279>
</xsl:for-each>
<xsl:for-each select="marc:subfield[@code = 'c']">
<rdamd:P30297>
<xsl:value-of select="translate(., ',', '') => normalize-space() => uwf:removeBrackets()"/>
<xsl:value-of select="replace(., ',', '') => normalize-space() => uwf:removeBrackets()"/>
</rdamd:P30297>
</xsl:for-each>
<xsl:for-each select="marc:subfield[@code = 'd']">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4980,7 +4980,7 @@
<rdam:carrierType.en rdf:resource="http://id.loc.gov/vocabulary/carriers/nc"/>
<fake:marcfield>F533 ## $a Preservation photocopy. $b Charlestown, MA : $c Acme Bookbinding, $d 2008. $e 20 cm.</fake:marcfield>
<rdamd:categoryOfManifestation.en>Preservation photocopy</rdamd:categoryOfManifestation.en>
<rdamd:placeOfManifestation.en>Charletown, MA</rdamd:placeOfManifestation.en>
<rdamd:placeOfManifestation.en>Charlestown, MA</rdamd:placeOfManifestation.en>
<rdamd:nameOfAgentOfManifestation.en>Acme Bookbinding</rdamd:nameOfAgentOfManifestation.en>
<rdamd:dateOfManifestation.en>2008</rdamd:dateOfManifestation.en>
<rdamd:noteOnManifestation.en>20 cm.</rdamd:noteOnManifestation.en>
Expand Down Expand Up @@ -5080,7 +5080,7 @@
<rdamd:noteOnManifestation.en>[On planting trees in remembrance of war dead].</rdamd:noteOnManifestation.en>
<fake:marcfield>F533 ## $a Microfiche. $b [Bethesda, Md.]: $c LexisNexis Academic &amp; Library Solutions, $d 1997. $e 11 x 15 cm. $f (CIS US Executive Branch Documents, 1910-1932 : no. A1.2-83).</fake:marcfield>
<rdamd:categoryOfManifestation.en>Microfiche</rdamd:categoryOfManifestation.en>
<rdamd:placeOfManifestation.en>Betheda, Md.</rdamd:placeOfManifestation.en>
<rdamd:placeOfManifestation.en>Bethesda, Md.</rdamd:placeOfManifestation.en>
<rdamd:nameOfAgentOfManifestation.en>LexisNexis Academic &amp; Library Solutions</rdamd:nameOfAgentOfManifestation.en>
<rdamd:dateOfManifestation.en>1997</rdamd:dateOfManifestation.en>
<rdamd:noteOnManifestation.en>11 x 15 cm.</rdamd:noteOnManifestation.en>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
rdamd:noteOnManifestation.en "11 x 15 cm.",
"[On planting trees in remembrance of war dead]." ;
rdamd:otherTitleInformation.en "In commemoration of our soldiers and sailors whose lives have been given for their country and for humanity in the Great War" ;
rdamd:placeOfManifestation.en "Betheda, Md." ;
rdamd:placeOfManifestation.en "Bethesda, Md." ;
rdamd:seriesStatement.en "CIS US Executive Branch Documents, 1910-1932 : no. A1.2-83." ;
rdamd:titleProper.en "Arbor day" ;
rdam:mediaType.en <http://id.loc.gov/vocabulary/mediaTypes/h> ;
Expand Down Expand Up @@ -408,7 +408,7 @@
rdamd:nameOfAgentOfManifestation.en "Acme Bookbinding" ;
rdamd:noteOnManifestation.en "20 cm.",
"Contents: The spelling medal (Mark Twain) -- Ben arrives in Philadelphia (Ben Franklin) -- The young hunter (Davy Crockett) -- A gardener's son (John Paul Jones) -- Bill's first Indian (Bill Cody) -- The teacher (Henry David Thoreau) -- Scalping party (Ethan Allen) -- The buck's horn (Abraham Lincoln) -- The star gazer (Amerigo Vespucci) -- Prisoner of Powhatan (John Smith) -- The snowball fight (Francis Drake) -- The garden trees (George Washington) -- Hard luck Tom (Thomas Edison) -- The judge (Daniel Boone) -- The sewing machine (Orville and Wilbur Wright) -- Christopher's first trip (Christopher Columbus) -- A youth rebels (William Penn) -- The runaway (Robert LaSalle) -- War-painted Indians (James Cooper) -- The wolf cave (Israel Putnam) -- The wreck (Samuel de Champlain)." ;
rdamd:placeOfManifestation.en "Charletown, MA" ;
rdamd:placeOfManifestation.en "Charlestown, MA" ;
rdamd:statementOfResponsibilityRelatingToTitleProper.en "by Claribel Spamer" ;
rdamd:titleProper.en "Easy sketches of famous men" ;
rdam:illustrativeContent.en <http://rdaregistry.info/termList/IllusContent/1014> ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5012,7 +5012,7 @@
<rdam:P30001 rdf:resource="http://id.loc.gov/vocabulary/carriers/nc"/>
<fake:marcfield>F533 ## $a Preservation photocopy. $b Charlestown, MA : $c Acme Bookbinding, $d 2008. $e 20 cm.</fake:marcfield>
<rdamd:P30335>Preservation photocopy</rdamd:P30335>
<rdamd:P30279>Charletown, MA</rdamd:P30279>
<rdamd:P30279>Charlestown, MA</rdamd:P30279>
<rdamd:P30297>Acme Bookbinding</rdamd:P30297>
<rdamd:P30278>2008</rdamd:P30278>
<rdamd:P30137>20 cm.</rdamd:P30137>
Expand Down Expand Up @@ -5112,7 +5112,7 @@
<rdamd:P30137>[On planting trees in remembrance of war dead].</rdamd:P30137>
<fake:marcfield>F533 ## $a Microfiche. $b [Bethesda, Md.]: $c LexisNexis Academic &amp; Library Solutions, $d 1997. $e 11 x 15 cm. $f (CIS US Executive Branch Documents, 1910-1932 : no. A1.2-83).</fake:marcfield>
<rdamd:P30335>Microfiche</rdamd:P30335>
<rdamd:P30279>Betheda, Md.</rdamd:P30279>
<rdamd:P30279>Bethesda, Md.</rdamd:P30279>
<rdamd:P30297>LexisNexis Academic &amp; Library Solutions</rdamd:P30297>
<rdamd:P30278>1997</rdamd:P30278>
<rdamd:P30137>11 x 15 cm.</rdamd:P30137>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
rdamd:P30142 "In commemoration of our soldiers and sailors whose lives have been given for their country and for humanity in the Great War" ;
rdamd:P30156 "Arbor day" ;
rdamd:P30278 "1997" ;
rdamd:P30279 "Betheda, Md." ;
rdamd:P30279 "Bethesda, Md." ;
rdamd:P30297 "LexisNexis Academic & Library Solutions" ;
rdamd:P30335 "Microfiche" ;
rdamo:P30043 <http://marc2rda.edu/fake/99106611740001452origMan> ;
Expand Down Expand Up @@ -410,7 +410,7 @@
"Contents: The spelling medal (Mark Twain) -- Ben arrives in Philadelphia (Ben Franklin) -- The young hunter (Davy Crockett) -- A gardener's son (John Paul Jones) -- Bill's first Indian (Bill Cody) -- The teacher (Henry David Thoreau) -- Scalping party (Ethan Allen) -- The buck's horn (Abraham Lincoln) -- The star gazer (Amerigo Vespucci) -- Prisoner of Powhatan (John Smith) -- The snowball fight (Francis Drake) -- The garden trees (George Washington) -- Hard luck Tom (Thomas Edison) -- The judge (Daniel Boone) -- The sewing machine (Orville and Wilbur Wright) -- Christopher's first trip (Christopher Columbus) -- A youth rebels (William Penn) -- The runaway (Robert LaSalle) -- War-painted Indians (James Cooper) -- The wolf cave (Israel Putnam) -- The wreck (Samuel de Champlain)." ;
rdamd:P30156 "Easy sketches of famous men" ;
rdamd:P30278 "2008" ;
rdamd:P30279 "Charletown, MA" ;
rdamd:P30279 "Charlestown, MA" ;
rdamd:P30297 "Acme Bookbinding" ;
rdamd:P30335 "Preservation photocopy" ;
rdamo:P30043 <http://marc2rda.edu/fake/99123793010001452origMan> ;
Expand Down

2 comments on commit 7dc767b

@cspayne
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CECSpecialistI @GordonDunsire
If you were curious about the missing s, it was the difference between the translate() function, which takes characters and replaces them directly and the replace() function which takes a regular expression and replaces the matching string. I was using the wrong one. It has been fixed :)

@GordonDunsire
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cspayne: Great! This the coding equivalent of the cataloguing discussion on brackets ;-)

Please sign in to comment.