2017-05-31 6 views

答えて

2

正しいと仮定して、ロックアイコンを表示してメタデータ表示を制御するのに使用されているのと同じ情報を照会することができます。情報は検索するには少し醜いですが、そこにあります。

参考になるコードをいくつか抽出しました。私は実際にサムネイルの表示をカスタマイズするためにこれを使用しますが、そのコンセプトはあなたの場合に似ています。

<!-- Get the current item handle --> 
<xsl:variable name="HANDLE" select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request'][@qualifier='URI']"/> 

<!-- Generate the URL to the rights information for the item --> 
<xsl:variable name="EXTMETSURL" select="concat('cocoon://metadata/',$HANDLE,'/mets.xml?rightsMDTypes=METSRIGHTS')"/> 

<!-- Retrieve the rights information (as a cocoon request) --> 
<xsl:variable name="EXTMETS" select="document($EXTMETSURL)"/> 

<!-- Point this variable at a specific bitstream of interest (such as the primary bitstream or the first original bitstream)--> 
<xsl:variable name="bit" select="..."/> 

<!-- Retrieve the rights information for a specific bitstream --> 
<xsl:variable name="bitmets" select="$EXTMETS//mets:fileSec/mets:fileGrp[@USE='ORIGINAL']/mets:file[@GROUPID=$bit/@GROUPID]"/> 

<!-- Get the authorization id for the bitstream --> 
<xsl:variable name="authid" select="$bitmets/@ADMID"/> 

<!-- Get the authorization record based on that id --> 
<xsl:variable name="authrec" select="$EXTMETS//mets:rightsMD[@ID=$authid]"/> 

<!-- Check that General Public (aka Anonymous) can access that record --> 
<xsl:variable name="pubrec" select="$authrec//metsrights:Context[@in-effect='true'][@CONTEXTCLASS='GENERAL PUBLIC']"/> 
関連する問題