MyCoRe-Org / pica2mods

GNU General Public License v3.0
0 stars 0 forks source link

XSLT error on subject #76

Closed rsteph-de closed 1 year ago

rsteph-de commented 1 year ago

Beim Einlesen der Lokalen Schlagworte gibt es für PPN 1750398451 folgende Fehlermeldung

Type error at char 10 in expression in xsl:for-each/@select on line 62 column 80 
  XPTY0004  A sequence of more than one item is not allowed as the first argument of
  fn:tokenize() ("Produktion", "production") 
at template modsSubject on line 28 
     invoked by xsl:for-each at #56
at template modsSubject on line 28 
     invoked by xsl:call-template at file:///C:/workspaces/ubtools/git/rosdok_migration/xsl/pica2mods_ubr.xsl#66
  In template rule with match="element(Q{info:srw/schema/5/picaXML-v1.0}record)" on line 49 of pica2mods_ubr.xsl
     invoked by built-in template rule (text-only)
  In template rule with match="element(Q{info:srw/schema/5/picaXML-v1.0}record)" on line 38 of pica2mods_ubr.xsl
     invoked by xsl:apply-templates at file:///C:/workspaces/ubtools/git/rosdok_migration/xsl/pica2mods_ubr.xsl#43
  In template rule with match="element(Q{info:srw/schema/5/picaXML-v1.0}record)" on line 38 of pica2mods_ubr.xsl
Could not create MODS from PicaXML

Das Problem tritt auf, weil wir ungefiltert lokale Schlagworte von der ILN 358 (Bremen) übernehmen, wo 2x das Subfield a in die Expansion generiert wurde:

<datafield tag="144Z" occurrence="01">
  <subfield code="9">586116923</subfield>
  <subfield code="V">Tdn</subfield>
  <subfield code="a">Produktion</subfield>
  <subfield code="a">production</subfield>
</datafield>