Last active
August 25, 2016 21:03
-
-
Save daniel-dgi/6001819 to your computer and use it in GitHub Desktop.
Indexing ancestors for islandora_collection_search module.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- In your demoFoxmlToSolr.xslt, do this! --> | |
<!-- Put this with the rest of your includes --> | |
<xsl:include href="/path/to/islandora_transforms/hierarchy.xslt"/> | |
<!-- Then put this in your main template --> | |
<xsl:variable name="ancestors"> | |
<xsl:call-template name="get-ancestors"> | |
<xsl:with-param name="PID" select="/foxml:digitalObject/@PID" /> | |
</xsl:call-template> | |
</xsl:variable> | |
<xsl:for-each select="xalan:nodeset($ancestors)//sparql:obj"> | |
<xsl:if test="@uri != concat('info:fedora/', $PID)"> | |
<field name="ancestors_ms"><xsl:value-of select="substring-after(@uri, '/')"/></field> | |
</xsl:if> | |
</xsl:for-each> |
Should probably be
<!-- In your foxmlToSolr.xslt, do this! -->
Like with the namespaces, traverse-graph.xslt also needs to be uncommented in foxmlToSolr.xslt.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, at the top of foxmlToSolr.xslt, where you see this:
uncomment the last two lines and remove the closing
>
in the third last line: