-
Notifications
You must be signed in to change notification settings - Fork 17
/
text_to_solr.xslt
executable file
·23 lines (20 loc) · 1 KB
/
text_to_solr.xslt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="UTF-8"?>
<!-- Glob text into one field for indexing. -->
<xsl:stylesheet version="1.0"
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exts="xalan://dk.defxws.fedoragsearch.server.GenericOperationsImpl"
xmlns:islandora-exts="xalan://ca.upei.roblib.DataStreamForXSLT"
exclude-result-prefixes="exts">
<!-- Maintaining DSID mappings for backwards compatibility with wild implementations. -->
<xsl:template match="foxml:datastream[@ID='OCR'or @ID='ocr' or @ID='TEXT' or @ID='text' or @ID='full_text' or @ID='FULL_TEXT' or @ID='fullText']/foxml:datastreamVersion[last()] |
foxml:datastream/foxml:datastreamVersion[last() and @MIMETYPE='text/plain']" name="index_text">
<xsl:param name="content"/>
<field>
<xsl:attribute name="name">
<xsl:value-of select="concat(../@ID, '_t')"/>
</xsl:attribute>
<xsl:value-of select="$content"/>
</field>
</xsl:template>
</xsl:stylesheet>