Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Generic XML Tips : Copy All to Construct 3 Creators (AND in Exists Condition)

    Created By: Joan Kolarik
    Created on: 2/08/2020



    Please send suggestions and improvements to joan.kolarik@weizmann.ac.il

    (This is an experiment, not a recommendation)


    rule "creator1"
    when
    exist "//*[local-name()='mods']/*[local-name()='name' and @type='personal'][1]/child::*[local-name()='namePart']"
    then
    copy all "//*[local-name()='mods']/*[local-name()='name' and @type='personal'][1]/child::*[local-name()='namePart']/text()"(", ") to "dc"."creator"
    end

    rule "creator2"
    when
    exist "//*[local-name()='mods']/*[local-name()='name' and @type='personal'][2]/child::*[local-name()='namePart']"
    then
    copy all "//*[local-name()='mods']/*[local-name()='name' and @type='personal'][2]/child::*[local-name()='namePart']/text()"(", ") to "dc"."creator"
    end

    rule "creator3"
    when
    exist "//*[local-name()='mods']/*[local-name()='name' and @type='personal'][3]/child::*[local-name()='namePart']"
    then
    set "et al" in "dc"."creator"
    end


    Return to Contents Page for Generic XML Tips





    • Was this article helpful?
    //Feedback