Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mycore_applications
orient
mymss-common
Commits
2ee77bb6
Commit
2ee77bb6
authored
Nov 30, 2022
by
Michael Becker
Browse files
allow passive relations in mss74 (link to external works)
parent
0ee7d3c5
Pipeline
#13642
passed with stage
in 2 minutes and 57 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/resources/META-INF/resources/editor/import_editor_form_manuscript-common.xed
View file @
2ee77bb6
...
...
@@ -4180,7 +4180,7 @@
<xed:output
i18n=
"module.dptbase.common.editor.choose"
/>
</option>
<xed:include
uri=
"xslStyle:frbr-items2editor-options:classification:editor[Text]:-1:children:MyCoReFRBRerProperties"
uri=
"xslStyle:frbr-items2editor-options
-all
:classification:editor[Text]:-1:children:MyCoReFRBRerProperties"
cacheable=
"false"
/>
</select>
</xed:bind>
...
...
@@ -4225,7 +4225,7 @@
<xed:output
i18n=
"module.dptbase.common.editor.choose"
/>
</option>
<xed:include
uri=
"xslStyle:frbr-items2editor-options:classification:editor[Text]:-1:children:MyCoReFRBRerProperties"
uri=
"xslStyle:frbr-items2editor-options
-all
:classification:editor[Text]:-1:children:MyCoReFRBRerProperties"
cacheable=
"false"
/>
</select>
</xed:bind>
...
...
src/main/resources/xsl/frbr-items2editor-options-all.xsl
0 → 100644
View file @
2ee77bb6
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
version=
"1.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xed=
"http://www.mycore.de/xeditor"
>
<!-- Transforms output of "classification:editorComplete:*" URIs to xeditor compatible format -->
<!-- same as frbr-items2editor-options but also allows selection of passive (has...) elements -->
<xsl:param
name=
"CurrentLang"
/>
<xsl:param
name=
"DefaultLang"
/>
<xsl:param
name=
"MaxLengthVisible"
/>
<xsl:param
name=
"Mode"
/>
<xsl:param
name=
"allSelectable"
select=
"'false'"
/>
<xsl:variable
name=
"editor.list.indent"
select=
"'   '"
/>
<xsl:template
match=
"items"
>
<xsl:choose>
<xsl:when
test=
"$Mode='editor'"
>
<xsl:apply-templates
select=
"."
mode=
"editor"
/>
</xsl:when>
<xsl:otherwise>
<select>
<xsl:copy-of
select=
"@*"
/>
<xsl:apply-templates
/>
</select>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"item"
>
<xsl:param
name=
"indent"
select=
"''"
/>
<xsl:variable
name=
"toolTip"
>
<xsl:apply-templates
select=
"."
mode=
"toolTip"
/>
</xsl:variable>
<xsl:choose>
<xsl:when
test=
"label[lang('x-group')] and not($allSelectable='true')"
>
<optgroup
title=
"{$toolTip}"
>
<xsl:attribute
name=
"label"
>
<xsl:value-of
select=
"$indent"
disable-output-escaping=
"yes"
/>
<xsl:apply-templates
select=
"."
mode=
"label"
/>
</xsl:attribute>
<xsl:copy-of
select=
"@*"
/>
<xsl:apply-templates
select=
"item"
>
<xsl:with-param
name=
"indent"
select=
"concat($editor.list.indent,$indent)"
/>
</xsl:apply-templates>
</optgroup>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select=
"@value"
/>
<xsl:if
test=
"
@value = 'isContinuation' or @value = 'isEditing' or @value = 'isExemplarOf' or
@value = 'isGloss' or @value = 'isPartOf' or @value = 'isTranslationOf' or
@value = 'isCommentary' or
@value = 'hasContinuation' or @value = 'hasEditing' or @value = 'hasExemplar' or
@value = 'hasGloss' or @value = 'hasPart' or @value = 'hasTranslation' or
@value = 'hasCommentary'"
>
<option
title=
"{$toolTip}"
>
<xsl:if
test=
"label[lang('x-disable')] and not($allSelectable='true')"
>
<xsl:attribute
name=
"disabled"
/>
</xsl:if>
<xsl:attribute
name=
"value"
>
<xsl:value-of
select=
"@value"
/>
</xsl:attribute>
<xsl:attribute
name=
"title"
>
<xsl:apply-templates
select=
"."
mode=
"label"
/>
</xsl:attribute>
<xsl:value-of
select=
"$indent"
disable-output-escaping=
"yes"
/>
<xsl:apply-templates
select=
"."
mode=
"label"
/>
</option>
</xsl:if>
<xsl:apply-templates
select=
"item"
>
<xsl:with-param
name=
"indent"
select=
"concat($editor.list.indent,$indent)"
/>
</xsl:apply-templates>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"item"
mode=
"label"
>
<xsl:variable
name=
"onDisplay"
>
<xsl:choose>
<xsl:when
test=
"label[lang($CurrentLang)]"
>
<xsl:value-of
select=
"label[lang($CurrentLang)]"
/>
</xsl:when>
<xsl:when
test=
"label[lang($DefaultLang)]"
>
<xsl:value-of
select=
"label[lang($DefaultLang)]"
/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select=
"."
/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:call-template
name=
"shorten"
>
<xsl:with-param
name=
"onDisplay"
select=
"$onDisplay"
/>
</xsl:call-template>
</xsl:template>
<xsl:template
match=
"item"
mode=
"toolTip"
>
<xsl:choose>
<xsl:when
test=
"label[lang($CurrentLang)]"
>
<xsl:value-of
select=
"label[lang($CurrentLang)]"
/>
</xsl:when>
<xsl:when
test=
"label[lang($DefaultLang)]"
>
<xsl:value-of
select=
"label[lang($DefaultLang)]"
/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select=
"."
/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"items"
mode=
"editor"
>
<items>
<xsl:apply-templates
mode=
"editor"
/>
</items>
</xsl:template>
<xsl:template
match=
"item"
mode=
"editor"
>
<item
value=
"{@value}"
>
<xsl:for-each
select=
"label"
>
<xsl:apply-templates
select=
"."
mode=
"editor"
/>
</xsl:for-each>
<!-- ==== handle children ==== -->
<xsl:apply-templates
select=
"item"
mode=
"editor"
/>
</item>
</xsl:template>
<xsl:template
match=
"label"
mode=
"editor"
>
<label
xml:lang=
"{@xml:lang}"
>
<xsl:call-template
name=
"shorten"
>
<xsl:with-param
name=
"onDisplay"
select=
"."
/>
</xsl:call-template>
</label>
</xsl:template>
<xsl:template
name=
"shorten"
>
<xsl:param
name=
"onDisplay"
/>
<xsl:choose>
<xsl:when
test=
"$MaxLengthVisible and (string-length($onDisplay) > $MaxLengthVisible) "
>
<xsl:value-of
select=
"concat(substring($onDisplay, 0, $MaxLengthVisible), ' [...]')"
/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select=
"$onDisplay"
/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment