Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reactivate metadata view #423

Draft
wants to merge 65 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
05da859
reactivate metadata-view
bwbohl Jul 24, 2023
b91cb5a
remove template duplicated from xsl:import
bwbohl Jul 24, 2023
36f7270
move template rendToClass to ediromOnline_metadata.xsl
bwbohl Jul 24, 2023
e28b141
rebase on develop eactivate metadata-view
bwbohl Jul 24, 2023
a5a62ae
remove template duplicated from xsl:import
bwbohl Jul 24, 2023
f161d14
move template rendToClass to ediromOnline_metadata.xsl
bwbohl Jul 24, 2023
eed68a6
Merge branch 'ftr/metadata-view' of https://github.com/Edirom/Edirom-…
bwbohl Feb 26, 2024
0d4b58a
rebase on develop eactivate metadata-view
bwbohl Jul 24, 2023
51f5820
remove template duplicated from xsl:import
bwbohl Jul 24, 2023
66d609a
move template rendToClass to ediromOnline_metadata.xsl
bwbohl Jul 24, 2023
eab1825
Merge branch 'ftr/metadata-view' of https://github.com/Edirom/Edirom-…
bwbohl Sep 10, 2024
fa6d45a
getHeader.xql: fix location of teiHeader2HTML.xsl
bwbohl Sep 10, 2024
03089cd
getHeader.xql: simplify $base
bwbohl Sep 10, 2024
6c325cb
teiHeader2HTML: add some documentation
bwbohl Sep 10, 2024
ee7643f
tei2HTML: fix output media-type
bwbohl Sep 10, 2024
efa2f94
teiHead2HTML: update call to template rendToclass
bwbohl Sep 10, 2024
b26433b
tei2HTML: update relative URLs for edirom_*.xsl import
bwbohl Sep 10, 2024
ee75e95
First working draft ignoring fixed TEI Stylesheet imports
bwbohl Sep 10, 2024
dc5de0b
Revert "getHeader.xql: simplify $base"
bwbohl Sep 11, 2024
be3203b
teiHeader2HTML: disable output for XML comments
bwbohl Sep 11, 2024
fb479d6
teiHeader2HTML: disable output for XML processing-instructions
bwbohl Sep 11, 2024
aca72ba
teiHeader2HTML: promote editionStmt to property level
bwbohl Sep 11, 2024
e14fd2d
teiHeader2HTML: create output for encodingDesc/tagsDec
bwbohl Sep 11, 2024
4dbb705
teiHeader2HTML: create output for tei:seriesStmt and child-nodes
bwbohl Sep 11, 2024
84d98f0
teiHeader2HTML: promote tei:titleStmt to proerty-level
bwbohl Sep 11, 2024
d38a868
teiHeader2HTML: create output for tei:titleStmt child-nodes
bwbohl Sep 11, 2024
29b387e
teiHeader2HTML: create output for tei:langUsage
bwbohl Sep 11, 2024
34e50c2
teiHeader2HTML: improve output for tei:change
bwbohl Sep 11, 2024
1ade01a
teiHeader2HTML: cleanup template duplication
bwbohl Sep 11, 2024
148055d
teiHeader2HTML: add blank line to improve readability
bwbohl Sep 11, 2024
9dfff17
Update de.xml
bwbohl Sep 11, 2024
7de84c9
teiHeader2HTML: comment-out curretly unused TEI imports
bwbohl Sep 11, 2024
fc18443
xslt/i18n/de.xml: fix indentation
bwbohl Sep 11, 2024
112592b
xslt/i18n/de.xml: sort MEI section alphabetically
bwbohl Sep 11, 2024
7a5014e
xslt/i18n/de.xml: add entry for manifestationList
bwbohl Sep 11, 2024
602a761
meiHead2HTML: format and indent to 4 indentation spaces
bwbohl Sep 11, 2024
e6f7499
meiHead2HTML: add blsnk lines to improve deadability
bwbohl Sep 11, 2024
fd4d6fc
meiHead2HTML: promote fileDesc/titleStmt to property-level
bwbohl Sep 11, 2024
446a251
mei/tei2HTML: generalize rule for tei:respStmt to match *:respStmt
bwbohl Sep 11, 2024
59dbe73
mei/tei2HTML: generalize template for tei:editionStmt to match *:edit…
bwbohl Sep 11, 2024
66d9b17
meiHead2HTML: align output of seresStmt wit teiHeader2HTML
bwbohl Sep 11, 2024
15c8ad4
meiHead2HTML: fix watermark in paragraphs
bwbohl Sep 11, 2024
b30e0d7
meiHead2HTML: fix inline mei:title
bwbohl Sep 11, 2024
1d8758c
meiHead2HTML: output mei:q as html:q in mode valueOnly
bwbohl Sep 11, 2024
ad413f7
meiHead2HTML: output html:br for mei:lb in mei:titlePage
bwbohl Sep 11, 2024
34f0126
meiP2HTML: apply default xhtml namespace
bwbohl Sep 12, 2024
e2f2473
Fix mei:ref generated links in both meiHead2HTML and meiP2HTML
bwbohl Sep 12, 2024
94e752a
meiHead2HTML: apply import for mei:p to assure prettier processing of…
bwbohl Sep 12, 2024
9b3b308
meiP2HTML: make processing of mei:lb depend on ancestor (plaintext vs…
bwbohl Sep 12, 2024
20b385c
meiHead2HTML: apply template for tei:q to #all modes
bwbohl Sep 12, 2024
654a95b
meiHead2HTML: apply template also to mei:titleStmt in mei:manifestation
bwbohl Sep 12, 2024
5eabeea
ediromOnline_metadata: format and indent
bwbohl Sep 12, 2024
7a57207
ediromOnline_metadata: add blank lines to improve readability
bwbohl Sep 12, 2024
a2a5bfd
ediormOnline_metadata: add xd:doc namespace definition
bwbohl Sep 12, 2024
e2a97c0
meiP2html: format and indent
bwbohl Sep 12, 2024
f9d8501
ediromOnline_metadata: disable output of XML comments and processing …
bwbohl Sep 12, 2024
2d0185c
meiP2html: some leftover whitespace removal
bwbohl Sep 12, 2024
66db398
meiP2html: disable output of XML comments and processing instructions
bwbohl Sep 12, 2024
7021e73
meiHead2HTML: only make mei:titleStmt/mei:title a property or subprop…
bwbohl Sep 12, 2024
db797ec
meiHead2HTML: only make mei:annots a property if they are not contain…
bwbohl Sep 12, 2024
6ef85e7
meiHead2HTML: avoid duplicate output of mei:history
bwbohl Sep 12, 2024
9e6a3df
teiHeader2HTML: remove templates becasue the are in ediromOnline_meta…
bwbohl Sep 12, 2024
0518171
meiHead2HTML: simplify template for mei:creation
bwbohl Sep 12, 2024
535d54b
meiHead2HTML: peocess childnodes of mei:desc in mode plainCommaSep
bwbohl Sep 12, 2024
b630a98
meiHead2HTML: apply imports fofr mei:date in mode plainCommaSep
bwbohl Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion add/data/xql/getHeader.xql
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ return
</parameters>
)
) else if ($type = 'text') then (
transform:transform($doc, concat($base, 'teiHeader2HTML.xsl'),
transform:transform($doc, concat($base, 'tei/profiles/edirom-header/teiHeader2HTML.xsl'),
<parameters>
<param name="base" value="{$base}"/>
<param name="lang" value="{$lang}"/>
Expand Down
66 changes: 33 additions & 33 deletions add/data/xql/getLinkTarget.xql
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ declare function local:getView($type as xs:string, $docUri as xs:string, $doc as
else
$docUri
}

(: optionally set label for some views:)
let $labeled.map :=
if ($type = 'mei_textView') then
Expand All @@ -54,7 +54,7 @@ declare function local:getView($type as xs:string, $docUri as xs:string, $doc as
(map:put($baseMap, 'label', 'XML Quellenbeschreibung'))
else
($baseMap)

(: whether to set the view as default view:)
let $defaultViewed.map :=
if ($type = (
Expand All @@ -69,48 +69,48 @@ declare function local:getView($type as xs:string, $docUri as xs:string, $doc as
(map:put($labeled.map, 'defaultView', true()))
else
($labeled.map)

(: xpath check whether any given view is supported :)
let $hasView :=
if ($type = 'desc_summaryView') then
(true())

else if ($type = 'desc_headerView') then
(exists($doc//mei:meiHead or $doc//tei:teiHeader))

else if ($type = 'mei_textView') then
(exists($doc//mei:annot[@type = 'descLink']))

else if ($type = 'mei_sourceView') then
(exists($doc//mei:facsimile//mei:graphic[@type = 'facsimile']))

else if ($type = 'mei_audioView') then
(exists($doc//mei:recording))

else if ($type = 'mei_verovioView') then
(exists($doc//mei:body//mei:measure) and exists($doc//mei:body//mei:note))

else if ($type = 'tei_textView') then
(exists($doc//tei:body[matches(.//text(), '[^\s]+')]))

else if ($type = 'tei_facsimileView') then
(exists($doc//tei:facsimile//tei:graphic))

else if ($type = 'tei_textFacsimileSplitView') then
(exists($doc//tei:facsimile//tei:graphic) and exists($doc//tei:pb[@facs]))

else if ($type = 'mei_annotationView') then
(exists($doc//mei:annot[@type = 'editorialComment']))

else if ($type = 'xml_xmlView') then
(true())

else if ($type = 'desc_xmlView') then
(exists($doc//mei:annot[@type = 'descLink']))

else
(false())

return
if ($hasView) then
($defaultViewed.map)
Expand All @@ -122,10 +122,10 @@ declare function local:getView($type as xs:string, $docUri as xs:string, $doc as
: Returns the views for an edirom object
:)
declare function local:getViews($type as xs:string, $docUri as xs:string, $doc as node()+) as map(*)* {

let $views := (
(:'desc_summaryView',:)
(:'desc_headerView',:)
'desc_headerView',
'mei_textView',
'mei_sourceView',
'mei_audioView',
Expand All @@ -137,12 +137,12 @@ declare function local:getViews($type as xs:string, $docUri as xs:string, $doc a
'xml_xmlView',
'desc_xmlView'
)

let $maps :=
for $view in $views
return
local:getView($view, $docUri, $doc)

return
$maps
};
Expand All @@ -151,17 +151,17 @@ declare function local:getViews($type as xs:string, $docUri as xs:string, $doc a
: Returns the window title for an edirom-object
:)
declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs:string {

(: Work :)
if (exists($doc//mei:mei) and exists($doc//mei:workDesc/mei:work) and not(exists($doc//mei:perfMedium))) then
(eutil:getLocalizedTitle(($doc//mei:work)[1]/mei:titleStmt[1], $lang))
else if (exists($doc/root()/mei:work)) then
(eutil:getLocalizedTitle($doc/root()/mei:work, $lang))

(: Recording :)
else if (exists($doc//mei:mei) and exists($doc//mei:recording)) then
(eutil:getLocalizedTitle($doc//mei:fileDesc/mei:titleStmt[1], $lang))

(: Source / Score :)
else if ($type = 'source' and exists($doc//mei:manifestation/mei:titleStmt)) then
(string-join((eutil:getLocalizedTitle(($doc//mei:manifestation)[1]/mei:titleStmt[1], $lang),
Expand All @@ -171,19 +171,19 @@ declare function local:getWindowTitle($doc as node()+, $type as xs:string) as xs
(string-join((eutil:getLocalizedTitle(($doc//mei:source)[1]/mei:titleStmt[1], $lang),
($doc//mei:source)[1]//mei:identifier[lower-case(@type) = 'shelfmark'][1]), ' | ')
=> normalize-space())

(: MEI fallback if no title is found :)
else if (exists($doc//mei:mei) and exists(($doc//mei:titleStmt)[1])) then
(eutil:getLocalizedTitle(($doc//mei:titleStmt)[1], $lang))

(: Text :)
else if (exists($doc/tei:TEI)) then
(eutil:getLocalizedTitle($doc//tei:fileDesc/tei:titleStmt[1], $lang))

(: HTML :)
else if ($type = 'html') then
($doc//head/data(title))

else
(string('unknown'))
};
Expand Down Expand Up @@ -276,26 +276,26 @@ let $type :=
(: Work :)
if (exists($doc//mei:mei) and exists($doc//mei:work) and not(exists($doc//mei:perfMedium))) then
(string('work'))

(: Recording :)
else if (exists($doc//mei:mei) and exists($doc//mei:recording)) then
(string('recording'))

(: Source / Score :)
else if (source:isSource($docUri)) then
(string('source'))

(: Text :)
else if (exists($doc/tei:TEI)) then
(string('text'))

(: HTML :)
else if (exists($doc/html) or exists($doc/html:html)) then
(string('html'))

else if (contains($docUri, '.html')) then
(string('html'))

else
(string('unknown'))

Expand Down
Loading