Does slurp_all_MODS_to_solr work with default namespaces?

23 views
Skip to first unread message

Kelsey

unread,
Aug 22, 2016, 4:51:14 PM8/22/16
to islandora
Hi everyone,
I've found myself in a circumstance where a good portion of our (older, migrated) records use a defined mods prefix (mods:mods), and are inline in fedora, while all records created via Islandora use a default namespace and are managed. 

I'm trying to get the mods datastream indexed in solr and am finding that the slurp_all_mods and default foxmlToSolr files seem to grab the older records only (the ones with the mods: prefix, inline in fedora). I would suspect it's because of this part in slurp_all_mods:

    <xsl:apply-templates mode="slurping_MODS" select="$content//mods:mods[1]">
      <xsl:with-param name="prefix" select="$prefix"/>
      <xsl:with-param name="suffix" select="$suffix"/>
      <xsl:with-param name="pid" select="../../@PID"/>
      <xsl:with-param name="datastream" select="../@ID"/>
    </xsl:apply-templates>

I would guess that changing the path from "$content//mods:mods[1]" to "$content//mods:mods[1] | $content//mods/*" would fix the problem (caveat, still getting comfortable with xslts). But I'm somewhat confused because I imagine most other set ups have managed MODS datastreams and use a default namespace, and figured this configuration would work with most default set-ups. Any kind souls who might suggest if I'm looking in the right direction? 

Thanks as always.
Kelsey

Bridger Dyson-Smith

unread,
Aug 22, 2016, 5:47:40 PM8/22/16
to isla...@googlegroups.com
Hi Kelsey,

You might try changing "$content//mods:mods[1]" to "$content//*:mods[1]". That should match something namespaced or not, but I'm not sure if that will cover all of your bases.
 
Thanks as always.
Kelsey

Best,
Bridger 

--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/islandora.
To view this discussion on the web visit https://groups.google.com/d/msgid/islandora/b4570e19-d3b3-4465-9c89-beb14a875cbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kelsey

unread,
Aug 23, 2016, 9:01:50 AM8/23/16
to islandora
Hi Bridger,
Ah, that makes more sense. I will try that tweak. Thanks so much!

Kind regards,
Kelsey


On Monday, August 22, 2016 at 5:47:40 PM UTC-4, Bridger Dyson-Smith wrote:
Hi Kelsey,

On Mon, Aug 22, 2016 at 4:51 PM, Kelsey <kelseyfa...@gmail.com> wrote:
Hi everyone,
I've found myself in a circumstance where a good portion of our (older, migrated) records use a defined mods prefix (mods:mods), and are inline in fedora, while all records created via Islandora use a default namespace and are managed. 

I'm trying to get the mods datastream indexed in solr and am finding that the slurp_all_mods and default foxmlToSolr files seem to grab the older records only (the ones with the mods: prefix, inline in fedora). I would suspect it's because of this part in slurp_all_mods:

    <xsl:apply-templates mode="slurping_MODS" select="$content//mods:mods[1]">
      <xsl:with-param name="prefix" select="$prefix"/>
      <xsl:with-param name="suffix" select="$suffix"/>
      <xsl:with-param name="pid" select="../../@PID"/>
      <xsl:with-param name="datastream" select="../@ID"/>
    </xsl:apply-templates>

I would guess that changing the path from "$content//mods:mods[1]" to "$content//mods:mods[1] | $content//mods/*" would fix the problem (caveat, still getting comfortable with xslts). But I'm somewhat confused because I imagine most other set ups have managed MODS datastreams and use a default namespace, and figured this configuration would work with most default set-ups. Any kind souls who might suggest if I'm looking in the right direction? 

You might try changing "$content//mods:mods[1]" to "$content//*:mods[1]". That should match something namespaced or not, but I'm not sure if that will cover all of your bases.
 
Thanks as always.
Kelsey

Best,
Bridger 

--
For more information about using this group, please read our Listserv Guidelines: http://islandora.ca/content/welcome-islandora-listserv
---
You received this message because you are subscribed to the Google Groups "islandora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to islandora+...@googlegroups.com.

Kelsey

unread,
Aug 23, 2016, 11:58:12 AM8/23/16
to islandora
For posterity's sake, I got it working by changing the path to <xsl:apply-templates mode="slurping_MODS" select="$content//mods:mods[1] | //mods[1]">

However, cleaning up this disparity is another can of worms :)
Reply all
Reply to author
Forward
0 new messages