Project

General

Profile

« Previous | Next » 

Revision 49016

getting rid of person entities

View differences:

odf2hbase.xml
56 56
            <xsl:if test="string-length($resultId) &gt; 0">
57 57
                <xsl:variable name="originalids"
58 58
                              select="//*[local-name() = 'resource']/*[local-name()='identifier'] | //*[local-name() = 'resource']//*[local-name()='alternateIdentifier']"/>
59
                <xsl:variable name="creators" select="//*[local-name() = 'creator']"/>
60 59
                <xsl:variable name="titles" select="//*[local-name() = 'title']"/>
61 60
                <xsl:variable name="subjects" select="//*[local-name() = 'subject']"/>
62 61
                <xsl:variable name="publisher" select="//*[local-name() = 'publisher']"/>
......
111 110
			                <xsl:value-of select="$result"/>
112 111
		                </QUALIFIER>
113 112
	                </ROW>
114
	                <xsl:for-each select="//*[local-name() = 'creator']">
115 113

  
116
		                <xsl:variable name="personIdTemp">
117
			                <xsl:choose>
118
				                <xsl:when test="string-length(./*[local-name() = 'nameIdentifier']) &gt; 0">
119
					                <xsl:value-of
120
							                select="translate(normalize-space(./*[local-name() = 'nameIdentifier']),' .,','___')"/>
121
				                </xsl:when>
122
				                <xsl:otherwise>
123
					                <xsl:value-of select="translate(normalize-space(./*[local-name() = 'creatorName']),' .,','___')"/>
124
				                </xsl:otherwise>
125
			                </xsl:choose>
126
		                </xsl:variable>
127

  
128
		                <xsl:variable name="personId" select="dnet:oafId('person', $namespaceprefix, normalize-space($personIdTemp))"/>
129

  
130
		                <xsl:variable name="originalPersonId" select="./*[local-name() = 'nameIdentifier']"/>
131

  
132
		                <xsl:if test="string-length($personId) &gt; 0">
133
			                <xsl:variable name="position" select="position()"/>
134
			                <xsl:variable name="person"
135
			                              select="dnet:person($personId, $about, $provenance, $trust, $collectedfromid, $collectedfromname,
136
			                              $originalPersonId, $dateOfCollection, $dateoftransformation, normalize-space(./*[local-name() = 'creatorName']),
137
			                              ./*[local-name() = 'nameIdentifier'], ./*[local-name() = 'nameIdentifier']/@nameIdentifierScheme)"/>
138
			                <xsl:variable name="personresult"
139
			                              select="dnet:personResult_Authorship($personId, $resultId, $position, 'isAuthorOf',
140
			                              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
141
			                <xsl:variable name="resultperson"
142
			                              select="dnet:personResult_Authorship($resultId, $personId, $position, 'hasAuthor',
143
			                              $collectedfromid, $collectedfromname, $provenance, $trust, $about)"/>
144

  
145
			                <ROW key="{$personId}" columnFamily="person">
146
				                <QUALIFIER name="body" type="base64">
147
					                <xsl:value-of select="$person"/>
148
				                </QUALIFIER>
149
			                </ROW>
150
			                <ROW key="{$personId}" columnFamily="personResult_authorship_isAuthorOf">
151
				                <QUALIFIER name="{$resultId}" type="base64">
152
					                <xsl:value-of select="$personresult"/>
153
				                </QUALIFIER>
154
			                </ROW>
155
			                <ROW key="{$resultId}" columnFamily="personResult_authorship_hasAuthor">
156
				                <QUALIFIER name="{$personId}" type="base64">
157
					                <xsl:value-of select="$resultperson"/>
158
				                </QUALIFIER>
159
			                </ROW>
160
		                </xsl:if>
161
	                </xsl:for-each>
162

  
163 114
	                <xsl:for-each select="//*[local-name()='projectid']">
164 115

  
165 116
		                <xsl:variable name="projectId"

Also available in: Unified diff