Guest User

Untitled

a guest
Jan 22nd, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.12 KB | None | 0 0
  1. <!-- ##################### oa-policy-exceptions ##################### -->
  2. <!--
  3. <pubs:oa-policy-exception>
  4. <pubs:type>Access1</pubs:type>
  5. <pubs:type-description>The output depends on the reproduction of
  6. third party content for which open access rights could not be
  7. granted (either within the specified timescales, or at all).</pubs:type-description>
  8. <pubs:comment>This is a test exception</pubs:comment>
  9. </pubs:oa-policy-exception>
  10.  
  11. <hoa_ex_acc>a</hoa_ex_acc>
  12. <hoa_ex_acc_txt>...</
  13.  
  14. Access[1-3] -> hoa_ex_acc a-c
  15. Deposit[1-7] -> hoa_ex_dep a-g
  16. Other -> hoa_ex_oth T/F
  17. Tech1 doesn't map to a hefce technical exception.
  18. Tech[2-4] -> hoa_ex_tec a-c?
  19. Unavailable -> ???
  20. Waiver -> ???
  21. The exception text needs to be mapped into hoa_ex_acc_txt / hoa_ex_dep_txt / hoa_ex_tech_txt / hoa_ex_oth_txt accordingly.
  22. -->
  23.  
  24. <!-- Access exceptions -->
  25. <xsl:template match="atom:feed/pubs:oa-policy-exception[starts-with(pubs:type, 'Access')]" mode="feed">
  26. <xsl:element name="hoa_ex_acc">
  27. <xsl:value-of select="translate(substring-after(pubs:type, 'Access'), '123', 'abc')"/>
  28. </xsl:element>
  29.  
  30. <xsl:element name="hoa_ex_acc_txt">
  31. <xsl:value-of select="pubs:comment"/>
  32. </xsl:element>
  33. </xsl:template>
  34.  
  35. <!-- Deposit exceptions -->
  36. <xsl:template match="atom:feed/pubs:oa-policy-exception[starts-with(pubs:type, 'Deposit')]" mode="feed">
  37. <xsl:element name="hoa_ex_dep">
  38. <xsl:value-of select="translate(substring-after(pubs:type, 'Deposit'), '1234567', 'abcdefg')"/>
  39. </xsl:element>
  40.  
  41. <xsl:element name="hoa_ex_dep_txt">
  42. <xsl:value-of select="pubs:comment"/>
  43. </xsl:element>
  44. </xsl:template>
  45.  
  46. <!-- Technical exceptions 2,3,4 (map directly onto HEFCE descriptions) -->
  47. <xsl:template match="atom:feed/pubs:oa-policy-exception[starts-with(pubs:type, 'Tech') and not(starts-with(pubs:type, 'Tech1'))]" mode="feed">
  48. <xsl:element name="hoa_ex_dep">
  49. <xsl:value-of select="translate(substring-after(pubs:type, 'Tech'), '234', 'abc')"/>
  50. </xsl:element>
  51.  
  52. <xsl:element name="hoa_ex_tech_txt">
  53. <xsl:value-of select="pubs:comment"/>
  54. </xsl:element>
  55. </xsl:template>
  56.  
  57. <!-- Other exceptions - if exception is actually 'other' set hoa_ex_oth = TRUE, otherwise just add details to hoa_ex_oth_txt noting Elements exception -->
  58. <xsl:template match="atom:feed/pubs:oa-policy-exception" mode="feed" priority="0.4">
  59. <xsl:if test="pubs:type = 'Other'">
  60. <xsl:element name="hoa_ex_oth">TRUE</xsl:element>
  61. </xsl:if>
  62.  
  63. <xsl:element name="hoa_ex_oth_txt">
  64. <xsl:if test="pubs:type != 'Other'">
  65. <xsl:text>Elements OA-Exception: </xsl:text>
  66. <xsl:value-of select="pubs:type" />
  67. <xsl:text>&#10;</xsl:text>
  68. </xsl:if>
  69. <xsl:value-of select="pubs:comment"/>
  70. </xsl:element>
  71. </xsl:template>
  72.  
  73. <!-- ##################### oa-policy-exceptions ##################### -->
Add Comment
Please, Sign In to add comment