<xsl:template match="rdf:Description">
<xsl:variable name="identifier" select="dct:identifier"/>
<xsl:variable name="sourcerecordid" select="concat(rdf:type,'/',$identifier)"/>
<xsl:variable name="recordid" select="concat($sourceid,'/',$sourcerecordid)"/>
<record>
<header>
<!--?? kanskje bruke nytt felt ubbont:uuid her? noen dubletter av dct:identifier.-->
<identifier>
<xsl:value-of select="$recordid"/>
</identifier>
</header>
<metadata>
<recordContainer xmlns="">
<!-- create control section-->
<xsl:call-template name="control">
<xsl:with-param name="recordid" select="$recordid"/>
<xsl:with-param name="sourceformat" select="'PNX'"/>
<xsl:with-param name="sourceid" select="$sourceid"/>
<xsl:with-param name="sourcerecordid" select="$sourcerecordid"/>
<xsl:with-param name="sourcesystem" select="$source-repository"/>
</xsl:call-template>
<!-- variables for display section-->
<xsl:variable name="display_maker" select="string-join(foaf:maker,'; ')"/>
<xsl:variable name="creation_date" select="tokenize(dct:created[1],'-')[1]"/>
<!-- tar med distinct values siden man har labels for steder også i subject, slik at en ikke får dubletter på feks bergen.-->
<xsl:variable name="subjects" select="distinct-values(dct:subject,dct:spatial)"/>
<xsl:variable name="display_subject" select="string-join($subjects,'; ')"/>
<xsl:variable name="main_title" select="(rdfs:label[string(.)][1],'[Uten tittel]')[1]"/>
<xsl:if test="$debug and not(dct:isPartOf) and not(ubbont:collectionTitle)">
<xsl:message>
<xsl:value-of select="$recordid"/> uten ispartof</xsl:message>
</xsl:if>
<xsl:if test="$debug and (count(dct:created) > 1)">
<xsl:message>
<xsl:value-of select="$recordid"/>
<xsl:value-of select="dct:created"/> er mer enn en verdi</xsl:message>
</xsl:if>
<!-- create display section-->
<xsl:call-template name="display">
<!-- ?? http://knowledge.exlibrisgroup.com/Primo/Product_Documentation/Technical_Guide/Mapping_to_the_Normalized_Record/Adding_%24%249ONLINE_to_Library_Level_Availability#ww1157297-->
<xsl:with-param name="availlibrary" select="'$$9ONLINE'"/>
<xsl:with-param name="creationdate" select="$creation_date"/>
<xsl:with-param name="creator" select="$display_maker"/>
<xsl:with-param name="description" select="dct:description,dct:alternative"/>
<!--@todo ta inn physdesc, dct:extent i spørring? og ta concat?
<xsl:with-param name="format"/>-->
<xsl:with-param name="identifier" select="$identifier"/>
<!--?? Flere top collections? bruke top collection her? se winterton http://search.library.northwestern.edu/primo_library/libweb/action/display.do?tabs=detailsTab&showPnx=true&ct=display&fn=search&doc=01NWU_WTON37&indx=4&recIds=01NWU_WTON37&recIdxs=3&elementId=&renderMode=poppedOut&displayMode=full&http://search.library.northwestern.edu:80/primo_library/libweb/action/expand.do?gathStatTab=true&dscnt=0&mode=Basic&vid=NULV&rfnGrp=1&tab=default_tab&dstmp=1465498593567&frbg=&rfnGrpCounter=1&frbrVersion=2&tb=t&fctV=images&srt=rank&fctN=facet_rtype&dum=true&vl(freeText0)=winterton&fromTabHeaderButtonPopout=true -->
<xsl:with-param name="ispartof" select="dct:isPartOf,ubbont:collectionTitle"/>
<!--?? er dette riktig bruk av subfield for å få ut Universitetsbiblioteket i Bergen?-->
<xsl:with-param name="publisher" select="$publisher"/>
<xsl:with-param name="source" select="$source-repository"/>
<xsl:with-param name="subject" select="$display_subject"/>
<xsl:with-param name="title" select="$main_title"/>
<xsl:with-param name="type" select="flub:getPrimoTypeFromRdfTypeLabel(rdf:type[1])"/>
</xsl:call-template>
<!-- variables for facets-->
<xsl:variable name="rsrctype" select="flub:getRsrcTypeFromRdfTypeLabel(rdf:type[1])"/>
<!-- create facets section-->
<xsl:call-template name="facets">
<!-- ta inn overordnet samling? i.e billedsamling, eller alle undersamlinger??
-->
<xsl:with-param name="collection" select="ubbont:collectionTitle"/>
<!--?? normaliser creationdate i etter regler i dokumentasjon?-->
<xsl:with-param name="creationdate" select="$creation_date"/>
<!--@todo tror dct:contributor er med i ontology, men ikke særlig i bruk, tar bare med skapere-->
<!-- Har satt inn to forsøk på inverted name (concat lastname,firstname, så property inverted name,
hvis ikke brukes foaf:name som ikke er invertert. Tar vekk [1] bak invertedName siden denne kan ha flere?-->
<xsl:with-param name="creatorcontrib" select="ubbont:invertedName"/>
<xsl:with-param name="rsrctype" select="$rsrctype"/>
<xsl:with-param name="prefilter" select="$rsrctype"/>
<xsl:with-param name="toplevel" select="('online_resources','available')"/>
<xsl:with-param name="topic" select="$subjects"/>
<xsl:with-param name="library" select="flub:setSubfield('L',$library)"/>
</xsl:call-template>
<xsl:call-template name="search">
<!-- @todo finne ut om vi har skos:altLabel også på dokument, eller flere titler enn en, lage sparql mapping addtitle,alttitle-->
<!--@todo? ta inn datorange og lage flere felt som xs:gYear*-->
<xsl:with-param name="creationdate" select="$creation_date"/>
<xsl:with-param name="creatorcontrib" select="foaf:maker"/>
<xsl:with-param name="description" select="dct:description,dct:alternative"/>
<!--@todo enddate startdate date range må inn i sparql spørring-->
<!--@todo legg inn publisher på general og i sparql spørring<xsl:with-param name="general"/>-->
<xsl:with-param name="recordid" select="$recordid"/>
<xsl:with-param name="rsrctype" select="$rsrctype"/>
<xsl:with-param name="sourceid" select="$sourceid"/>
<xsl:with-param name="subject" select="$subjects"/>
<xsl:with-param name="title" select="$main_title"/>
<xsl:with-param name="addtitle" select="ubbont:collectionTitle"/>
<xsl:with-param name="scope" select="$scope"/>
<xsl:with-param name="searchscope" select="$searchscope"/>
</xsl:call-template>
<xsl:call-template name="delivery">
<xsl:with-param name="institution" select="$institution"/>
<xsl:with-param name="delcategory" select="'Online Resource'"/>
</xsl:call-template>
<xsl:call-template name="links">
<xsl:with-param name="thumbnail" select="flub:setSubfield('U',ubbont:hasThumbnail[1])"/>
<xsl:with-param name="linktorsrc" select="flub:subfieldSetDisplayAndUrl('Lenke til Marcus',@rdf:about)"/>
</xsl:call-template>
<xsl:call-template name="sort">
<xsl:with-param name="author" select="foaf:maker[1]"/>
<xsl:with-param name="title" select="$main_title"/>
<xsl:with-param name="creationdate" select="$creation_date[1]"/>
</xsl:call-template>
<xsl:call-template name="ranking">
<xsl:with-param name="booster1" select="'1'"/>
</xsl:call-template>
<!-- @todo kan mappe noe inn her i adddata, avventer og ser
<xsl:call-template name="addata">
</xsl:call-template>
-->
</recordContainer>
</metadata>
</record>
</xsl:template> |