How can I capture current or active locale in DSpace XMLUI?

£可爱£侵袭症+ 提交于 2019-12-08 03:24:14

问题


I have this setting in dspace.cfg webui.supported.locales = en, fr, zh. I wonder why I can't get the active or current locale if I use:

    <xsl:value-of
        select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='currentLocale']"/>

in my item-view.xsl?

Viewing the page eg http://localhost:8080/DRI/handle/123456789/10476?locale-attribute=fr, it is obviously there in:

<metadata element="page" qualifier="currentLocale">fr</metadata>

Am I missing something?


回答1:


Apparently, declaring this in a variable in the global-variables.xsl eg

<xsl:variable name="active-locale" select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='page'][@qualifier='currentLocale']"/>

solved my issue.

I can now capture the current/active locale. I still don't know why it won't work if I just use and declare the variable in item-view.xsl.



来源:https://stackoverflow.com/questions/32042118/how-can-i-capture-current-or-active-locale-in-dspace-xmlui

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!