1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <xsl : stylesheet version =" 1.0" xmlns : xsl =" http://www.w3.org/1999/XSL/Transform" xmlns : xlink =" http://www.w3.org/1999/xlink"
3
- xmlns : i18n =" xalan://org.mycore.services.i18n.MCRTranslation" xmlns : mods =" http://www.loc.gov/mods/v3"
4
- xmlns : mcrxsl =" xalan://org.mycore.common.xml.MCRXMLFunctions" exclude-result-prefixes =" i18n mods xlink mcrxsl" >
5
- <xsl : import href =" xslImport:modsmeta:metadata/mir-admindata-box.xsl" />
6
- <!-- copied from http://www.loc.gov/standards/mods/v3/MODS3-4_HTML_XSLT1-0.xsl -->
2
+ <xsl : stylesheet version =" 1.0" xmlns : xsl =" http://www.w3.org/1999/XSL/Transform"
3
+ xmlns : xlink =" http://www.w3.org/1999/xlink"
4
+ xmlns : i18n =" xalan://org.mycore.services.i18n.MCRTranslation" xmlns : mods =" http://www.loc.gov/mods/v3"
5
+ xmlns : mcrxsl =" xalan://org.mycore.common.xml.MCRXMLFunctions"
6
+ exclude-result-prefixes =" i18n mods xlink mcrxsl" >
7
+ <xsl : import href =" xslImport:modsmeta:metadata/mir-admindata-box.xsl" />
8
+
7
9
<xsl : template match =" /" >
8
- <xsl : variable name =" ID" select =" /mycoreobject/@ID" />
10
+ <xsl : variable name =" ID" select =" /mycoreobject/@ID" />
9
11
<div id =" mir-admindata" >
10
- <xsl : copy-of select =" document(concat('staticcontent:mir-admindata-box:', $ID))/div" />
12
+ <div id =" system_box" class =" detailbox" >
13
+ <h4 id =" system_switch" class =" block_switch" >
14
+ <xsl : value-of select =" i18n:translate('component.mods.metaData.dictionary.systembox')" />
15
+ </h4 >
16
+ <div id =" system_content" class =" block_content" >
17
+ <table class =" metaData" >
18
+ <!-- *** publication status ************************************* -->
19
+ <tr >
20
+ <td class =" metaname" >
21
+ <xsl : value-of select =" concat(i18n:translate('component.mods.metaData.dictionary.status'),':')" />
22
+ </td >
23
+ <td class =" metavalue" >
24
+ <xsl : call-template name =" printClass" >
25
+ <xsl : with-param select =" mycoreobject/service/servstates/servstate" name =" nodes" />
26
+ </xsl : call-template >
27
+ </td >
28
+ </tr >
29
+ <xsl : call-template name =" printMetaDate" >
30
+ <xsl : with-param select =" mycoreobject/service/servdates/servdate[@type='createdate']" name =" nodes" />
31
+ <xsl : with-param select =" i18n:translate('metaData.createdAt')" name =" label" />
32
+ </xsl : call-template >
33
+ <xsl : call-template name =" printMetaDate" >
34
+ <xsl : with-param select =" mycoreobject/service/servflags/servflag[@type='createdby']" name =" nodes" />
35
+ <xsl : with-param select =" i18n:translate('mir.metaData.detailBox.by')" name =" label" />
36
+ </xsl : call-template >
37
+ <xsl : for-each select =" mycoreobject/metadata/def.modsContainer/modsContainer/mods:mods/mods:note" >
38
+ <xsl : variable name =" noteType" >
39
+ <xsl : choose >
40
+ <xsl : when test =" @type" >
41
+ <xsl : value-of select =" @type" />
42
+ </xsl : when >
43
+ <xsl : otherwise >
44
+ <xsl : value-of select =" 'admin'" />
45
+ </xsl : otherwise >
46
+ </xsl : choose >
47
+ </xsl : variable >
48
+ <xsl : variable name =" myURI"
49
+ select =" concat('classification:metadata:0:children:noteTypes:', mcrxsl:regexp($noteType,' ', '_'))" />
50
+ <xsl : variable name =" x-access" >
51
+ <xsl : value-of select =" document($myURI)//label[@xml:lang='x-access']/@text" />
52
+ </xsl : variable >
53
+ <xsl : variable name =" noteLabel" >
54
+ <xsl : value-of select =" document($myURI)//category/label[@xml:lang=$CurrentLang]/@text" />
55
+ </xsl : variable >
56
+ <xsl : if test =" contains($x-access, 'editor') or contains($x-access, 'admin')" >
57
+ <xsl : call-template name =" printMetaDate" >
58
+ <xsl : with-param select =" ." name =" nodes" />
59
+ <xsl : with-param select =" $noteLabel" name =" label" />
60
+ </xsl : call-template >
61
+ </xsl : if >
62
+ </xsl : for-each >
63
+ <!-- *** Last Modified ************************************* -->
64
+ <xsl : call-template name =" printMetaDate" >
65
+ <xsl : with-param select =" mycoreobject/service/servdates/servdate[@type='modifydate']" name =" nodes" />
66
+ <xsl : with-param select =" i18n:translate('metaData.lastChanged')" name =" label" />
67
+ </xsl : call-template >
68
+ <xsl : call-template name =" printMetaDate" >
69
+ <xsl : with-param select =" mycoreobject/service/servflags/servflag[@type='modifiedby']" name =" nodes" />
70
+ <xsl : with-param select =" i18n:translate('mir.metaData.detailBox.by')" name =" label" />
71
+ </xsl : call-template >
72
+ <!-- *** MyCoRe-ID and intern ID *************************** -->
73
+ <tr >
74
+ <td class =" metaname" >
75
+ <xsl : value-of select =" concat(i18n:translate('metaData.ID'),':')" />
76
+ </td >
77
+ <td class =" metavalue" >
78
+ <xsl : value-of select =" mycoreobject/@ID" />
79
+ </td >
80
+ </tr >
81
+ <xsl : call-template name =" printMetaDate" >
82
+ <xsl : with-param
83
+ select =" mycoreobject/metadata/def.modsContainer/modsContainer/mods:mods/mods:identifier[@type='intern']"
84
+ name =" nodes" />
85
+ <xsl : with-param select =" i18n:translate('component.mods.metaData.dictionary.identifier.intern')"
86
+ name =" label" />
87
+ </xsl : call-template >
88
+
89
+ <tr >
90
+ <td class =" metaname" >
91
+ <xsl : value-of select =" i18n:translate('metadata.versionInfo.version')" />
92
+ <xsl : text >:</xsl : text >
93
+ </td >
94
+ <td class =" metavalue" >
95
+ <xsl : variable name =" verinfo" select =" document(concat('versioninfo:',mycoreobject/@ID))" />
96
+ <xsl : variable name =" revision" >
97
+ <xsl : call-template name =" UrlGetParam" >
98
+ <xsl : with-param name =" url" select =" $RequestURL" />
99
+ <xsl : with-param name =" par" select =" 'r'" />
100
+ </xsl : call-template >
101
+ </xsl : variable >
102
+ <xsl : choose >
103
+ <xsl : when test =" not($revision = '')" >
104
+ <xsl : for-each select =" $verinfo/versions/version" >
105
+ <xsl : sort order =" descending" select =" position()" data-type =" number" />
106
+ <xsl : if test =" $revision = @r" >
107
+ <xsl : number />
108
+ </xsl : if >
109
+ </xsl : for-each >
110
+ </xsl : when >
111
+ <xsl : otherwise >
112
+ <xsl : value-of select =" count($verinfo/versions/version)" />
113
+ </xsl : otherwise >
114
+ </xsl : choose >
115
+ <br />
116
+ <a id =" historyStarter" style =" cursor: pointer" >
117
+ <xsl : value-of select =" i18n:translate('metadata.versionInfo.startLabel')" />
118
+ </a >
119
+ </td >
120
+ </tr >
121
+ </table >
122
+ </div >
123
+ </div >
124
+
11
125
</div >
12
- <xsl : apply-imports />
126
+ <xsl : apply-imports />
13
127
</xsl : template >
14
128
15
- </xsl : stylesheet >
129
+ </xsl : stylesheet >
0 commit comments