Project

General

Profile

« Previous | Next » 

Revision 5603

Bug 3835 - design and implement OAI-PMH compliant harvest subsystem

Improve handling of 'eml:eml/dataset/publisher' element to 'dc:publisher' element crosswalk.

View differences:

lib/oaipmh/eml201toDublinCore.xsl
59 59

  
60 60
    <xsl:if test="eml:eml/dataset/publisher">
61 61
      <xsl:element name="dc:publisher">
62
        <xsl:value-of select="eml:eml/dataset/publisher" />
62
        <xsl:call-template name="publisher"></xsl:call-template>
63 63
      </xsl:element>
64 64
    </xsl:if>
65 65

  
......
163 163
    </xsl:choose>
164 164
  </xsl:template>
165 165

  
166
  <xsl:template name="publisher">
167
    <xsl:choose>
168
      <xsl:when test="eml:eml/dataset/publisher/individualName/surName">
169
        <xsl:choose>
170
          <xsl:when test="eml:eml/dataset/publisher/individualName/givenName">
171
            <xsl:value-of select="eml:eml/dataset/publisher/individualName/givenName" />
172
            <xsl:text>&#x20;</xsl:text>
173
          </xsl:when>
174
        </xsl:choose>
175
        <xsl:value-of select="eml:eml/dataset/publisher/individualName/surName" />
176
      </xsl:when>
177
      <xsl:when test="eml:eml/dataset/publisher/organizationName">
178
        <xsl:value-of select="eml:eml/dataset/publisher/organizationName" />
179
      </xsl:when>
180
      <xsl:when test="eml:eml/dataset/publisher/positionName">
181
        <xsl:value-of select="eml:eml/dataset/publisher/positionName" />
182
      </xsl:when>
183
    </xsl:choose>
184
  </xsl:template>
185

  
166 186
  <xsl:template name="type">
167 187
    <xsl:element name="dc:type">
168 188
      <xsl:choose>
lib/oaipmh/eml210toDublinCore.xsl
59 59

  
60 60
    <xsl:if test="eml:eml/dataset/publisher">
61 61
      <xsl:element name="dc:publisher">
62
        <xsl:value-of select="eml:eml/dataset/publisher" />
62
        <xsl:call-template name="publisher"></xsl:call-template>
63 63
      </xsl:element>
64 64
    </xsl:if>
65 65

  
......
163 163
    </xsl:choose>
164 164
  </xsl:template>
165 165

  
166
  <xsl:template name="publisher">
167
    <xsl:choose>
168
      <xsl:when test="eml:eml/dataset/publisher/individualName/surName">
169
        <xsl:choose>
170
          <xsl:when test="eml:eml/dataset/publisher/individualName/givenName">
171
            <xsl:value-of select="eml:eml/dataset/publisher/individualName/givenName" />
172
            <xsl:text>&#x20;</xsl:text>
173
          </xsl:when>
174
        </xsl:choose>
175
        <xsl:value-of select="eml:eml/dataset/publisher/individualName/surName" />
176
      </xsl:when>
177
      <xsl:when test="eml:eml/dataset/publisher/organizationName">
178
        <xsl:value-of select="eml:eml/dataset/publisher/organizationName" />
179
      </xsl:when>
180
      <xsl:when test="eml:eml/dataset/publisher/positionName">
181
        <xsl:value-of select="eml:eml/dataset/publisher/positionName" />
182
      </xsl:when>
183
    </xsl:choose>
184
  </xsl:template>
185

  
166 186
  <xsl:template name="type">
167 187
    <xsl:element name="dc:type">
168 188
      <xsl:choose>
lib/oaipmh/eml200toDublinCore.xsl
59 59

  
60 60
    <xsl:if test="eml:eml/dataset/publisher">
61 61
      <xsl:element name="dc:publisher">
62
        <xsl:value-of select="eml:eml/dataset/publisher" />
62
        <xsl:call-template name="publisher"></xsl:call-template>
63 63
      </xsl:element>
64 64
    </xsl:if>
65 65

  
......
163 163
    </xsl:choose>
164 164
  </xsl:template>
165 165

  
166
  <xsl:template name="publisher">
167
    <xsl:choose>
168
      <xsl:when test="eml:eml/dataset/publisher/individualName/surName">
169
        <xsl:choose>
170
          <xsl:when test="eml:eml/dataset/publisher/individualName/givenName">
171
            <xsl:value-of select="eml:eml/dataset/publisher/individualName/givenName" />
172
            <xsl:text>&#x20;</xsl:text>
173
          </xsl:when>
174
        </xsl:choose>
175
        <xsl:value-of select="eml:eml/dataset/publisher/individualName/surName" />
176
      </xsl:when>
177
      <xsl:when test="eml:eml/dataset/publisher/organizationName">
178
        <xsl:value-of select="eml:eml/dataset/publisher/organizationName" />
179
      </xsl:when>
180
      <xsl:when test="eml:eml/dataset/publisher/positionName">
181
        <xsl:value-of select="eml:eml/dataset/publisher/positionName" />
182
      </xsl:when>
183
    </xsl:choose>
184
  </xsl:template>
185

  
166 186
  <xsl:template name="type">
167 187
    <xsl:element name="dc:type">
168 188
      <xsl:choose>

Also available in: Unified diff