2

I am using XSLT to look up data in an external document, which is an XML file from a DSpace URL (link). But I cannot use an URL with parameters in document().

This is my code:

<xsl:param name="myurl">
  <xsl:text>cocoon://search-filter?field=author&amp;rpp=100000&amp;XML</xsl:text>
</xsl:param>
<xsl:value-of select="document($myurl)//dri:metadata[@element='contextPath'][not(@qualifier)]"/>
<xsl:value-of select="document($myurl)//metadata[@element='contextPath'][not(@qualifier)]"/>

The log file shows this:

WARN  org.apache.cocoon.components.xslt.TraxErrorListener  - Can not load requested doc: unknown protocol: cocoon at file:///dados-teste/webapps/xmlui/themes/Papaya/lib/xsl/papaya/navigation.xsl:245:78

If I use a different URL (without parameters), it does work! For example:

<xsl:param name="myurl">
  <xsl:text>cocoon://metadata/handle/123456789/1261/mets.xml</xsl:text>
</xsl:param>

2 Answers2

1

Do you need it to be the cocoon protocol? Does it work if you switch to http?

schweerelos
  • 2,189
  • 2
  • 17
  • 25
0

I added this declaration to my stylesheet and it is not failing for me. Have you set the rpp too high for your server to process?

terrywb
  • 3,740
  • 3
  • 25
  • 50
  • I tried a lower rpp value (100), but I didn´t work anyway. And the server can process higher rpp values.The schweerelos' answer worked for me! Thanks for the response. – Fernando Hattori Sep 14 '16 at 02:23