Commit e2ecf78f authored by Magdalena Turska's avatar Magdalena Turska

feature(examples) add metadata section to dictionary example; close #208

parent 21349304
<?xml version="1.0" encoding="UTF-8"?>
<?teipublisher template="facsimile.html" odd="osinski.odd" view="page"?>
<?teipublisher template="osinski.html" odd="osinski.odd" view="page"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0">
<teiHeader>
<fileDesc>
......
......@@ -144,6 +144,167 @@
<param name="alternate" value="@norm"/>
</model>
</elementSpec>
<elementSpec ident="titleStmt" mode="change">
<model output="latex" behaviour="meta">
<param name="content" value="."/>
</model>
<model output="fo" behaviour="heading"/>
<modelSequence output="web" predicate="$parameters?mode='title' ">
<model behaviour="inline">
<param name="content" value="title[1]"/>
</model>
<model behaviour="inline">
<param name="content" value="subsequence(title, 2)"/>
</model>
</modelSequence>
<model predicate="$parameters?mode='metadata'" behaviour="block"/>
<modelSequence output="web" predicate="$parameters?header='short'">
<model behaviour="link">
<param name="content" value="title[1]"/>
<param name="uri" value="$parameters?doc"/>
</model>
<model behaviour="block">
<param name="content" value="subsequence(title, 2)"/>
</model>
<model behaviour="block">
<param name="content" value="(author, editor)"/>
</model>
</modelSequence>
<model output="web" behaviour="block"/>
</elementSpec>
<elementSpec ident="editor" mode="change">
<model predicate="ancestor::teiHeader" behaviour="block">
<outputRendition xml:space="preserve">
font-weight: bold;
</outputRendition>
</model>
<model behaviour="inline"/>
</elementSpec>
<elementSpec ident="teiHeader" mode="change">
<model output="web" predicate="$parameters?mode='metadata'" behaviour="block"/>
<model output="latex" behaviour="metadata"/>
<model output="fo" behaviour="omit"/>
<model output="web" predicate="$parameters?header='short'" behaviour="block"/>
<model output="web" behaviour="metadata"/>
</elementSpec>
<elementSpec ident="title" mode="change">
<model predicate="$parameters?mode='metadata'" behaviour="omit"/>
<model predicate="$parameters?header='short'" behaviour="heading">
<param name="level" value="5"/>
</model>
<modelSequence predicate="parent::titleStmt/parent::fileDesc">
<model predicate="preceding-sibling::title" behaviour="text">
<param name="content" value="' — '"/>
</model>
<model behaviour="inline" cssClass="foo"/>
</modelSequence>
<model predicate="not(@level) and parent::bibl" behaviour="inline"/>
<modelSequence predicate="@level='m' or not(@level)">
<model behaviour="inline">
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
</model>
<model predicate="ancestor::biblFull" behaviour="text">
<param name="content" value="', '"/>
</model>
</modelSequence>
<modelSequence predicate="@level='s' or @level='j'">
<model behaviour="inline">
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
</model>
<model predicate="following-sibling::* and ( ancestor::biblFull)" behaviour="text">
<param name="content" value="', '"/>
</model>
</modelSequence>
<modelSequence predicate="@level='u' or @level='a'">
<model behaviour="inline">
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
</model>
<model predicate="following-sibling::* and ( ancestor::biblFull)" behaviour="text">
<param name="content" value="'. '"/>
</model>
</modelSequence>
<model behaviour="inline">
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
</model>
</elementSpec>
<elementSpec ident="fileDesc" mode="change">
<model predicate="$parameters?mode='metadata'" behaviour="block"/>
<modelSequence predicate="$parameters?header='short'">
<model behaviour="block" cssClass="header-short">
<param name="content" value="titleStmt"/>
</model>
<model behaviour="block" cssClass="header-short">
<param name="content" value="editionStmt"/>
</model>
<model behaviour="block" cssClass="header-short">
<param name="content" value="publicationStmt"/>
</model>
</modelSequence>
<model behaviour="title">
<param name="content" value="titleStmt"/>
</model>
</elementSpec>
<elementSpec ident="msDesc" mode="add">
<modelSequence>
<model behaviour="block">
<desc>retrieves the primary language </desc>
<param name="content" value="(root(.)//langUsage/language)"/>
<outputRendition xml:space="preserve" scope="before">
content: 'Primary language: ';
</outputRendition>
</model>
<model behaviour="block">
<desc>retrieves the form of the source from taxonomy file</desc>
<param name="content" value="id(substring-after(root(.)//catRef[@scheme='#form']/@target, '#'), doc('/db/apps/tei-publisher/data/taxonomy.xml'))"/>
<outputRendition xml:space="preserve" scope="before">
content: 'Primary source: ';
</outputRendition>
</model>
<model behaviour="block">
<outputRendition xml:space="preserve">
content: 'Location: ';
</outputRendition>
</model>
</modelSequence>
</elementSpec>
<elementSpec ident="institution" mode="add">
<model behaviour="inline">
<outputRendition xml:space="preserve">
font-weight: bold;
</outputRendition>
</model>
</elementSpec>
<elementSpec ident="respStmt" mode="add">
<model behaviour="alternate">
<param name="default" value="persName"/>
<param name="alternate" value="resp"/>
</model>
</elementSpec>
<elementSpec ident="idno" mode="add">
<modelSequence>
<model behaviour="inline"/>
<model behaviour="inline">
<param name="content" value="ancestor::msDesc/@type"/>
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
<outputRendition xml:space="preserve" scope="before">
content: ' (';
</outputRendition>
<outputRendition xml:space="preserve" scope="after">
content: ')';
</outputRendition>
</model>
</modelSequence>
</elementSpec>
</schemaSpec>
</body>
</text>
......
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns:i18n="http://exist-db.org/xquery/i18n">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"/>
<link rel="shortcut icon" type="image/x-icon" href="resources/images/favicon.ico"/>
<link rel="shortcut icon" type="image/png" href="resources/images/favicon-16.png" sizes="16x16"/>
<link rel="shortcut icon" type="image/png" href="resources/images/favicon-24.png" sizes="24x24"/>
<link rel="shortcut icon" type="image/png" href="resources/images/favicon-32.png" sizes="32x32"/>
<link rel="shortcut icon" type="image/png" href="resources/images/favicon-64.png" sizes="64x64"/>
<title data-template="config:app-title"/>
<meta name="description" content="Historical dictionary"/>
<link rel="stylesheet" type="text/css" href="resources/fonts/font.css"/>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Oswald"/>
<script src="../tei-publisher/components/bower_components/webcomponentsjs/webcomponents-loader.js"/>
<link rel="import" href="../tei-publisher/components/dependencies-dev.html"/>
<style>
[unresolved] {
display:none;
}
</style>
<custom-style>
<style include="pb-common-styles">
body {
--pb-link-theme: {
font-family: "Junicode",Georgia,"Times New Roman",serif;
text-decoration: none;
color: black;
};
--pb-view-height: calc(100vh - 212px);
}
#view1 {
flex: 1 1;
font-family: "Junicode", Georgia, "Times New Roman", serif;
font-size: 14pt;
line-height: 1.42857143;
padding: 0 16px;
height: var(--pb-view-height);
overflow: auto;
}
.content-body {
position: relative;
display: flex;
justify-content: center;
padding: 0 20px;
}
.metadata {
position: relative;
display: flex;
justify-content: center;
padding: 0 20px;
}
.content-body pb-facsimile {
flex: 1 1;
height: var(--pb-view-height);
}
@media (max-width: 769px) {
pb-facsimile {
display: none;
}
}
</style>
</custom-style>
</head>
<body unresolved="unresolved" data-template="i18n:translate" data-template-catalogues="resources/i18n">
<pb-page data-template="pages:pb-page">
<pb-document id="document1" data-template="pages:pb-document"/>
<app-drawer-layout force-narrow="force-narrow">
<app-drawer data-template="templates:include" data-template-path="templates/drawer.html"/>
<app-header-layout>
<app-header slot="header" fixed="fixed" data-template="browse:fix-links">
<app-toolbar data-template="templates:include" data-template-path="templates/menu.html"/>
<app-toolbar data-template="templates:include" data-template-path="templates/toolbar.html"/>
</app-header>
<pb-drawer toggle="tocToggle" class="tocDrawer" emit="toc" subscribe="transcription">
<div class="drawer-content">
<h3>
<i18n:text key="contents">Contents</i18n:text>
</h3>
<pb-load id="toc" url="templates/toc.html?target=transcription" src="document1" subscribe="toc" load-once="load-once">Loading ...</pb-load>
</div>
</pb-drawer>
<section class="metadata">
<pb-collapse>
<h3 slot="collapse-trigger">
<pb-view id="title-view1" src="document1" xpath="//teiHeader/fileDesc/titleStmt" view="single">
<pb-param name="mode" value="title"/>
</pb-view>
</h3>
<div slot="collapse-content">
<pb-view id="metadata-view1" src="document1" xpath="//teiHeader" view="single">
<pb-param name="mode" value="metadata"/>
</pb-view>
<hr/>
</div>
</pb-collapse>
</section>
<main class="content-body">
<pb-view id="view1" src="document1" column-separator=".tei-cb" append-footnotes="append-footnotes" subscribe="transcription" emit="transcription" wait-for="#facsimile"/>
<pb-facsimile id="facsimile" base-uri="https://apps.existsolutions.com/cantaloupe/iiif/2/" default-zoom-level="0" show-navigation-control="show-navigation-control" show-navigator="show-navigator" subscribe="transcription"/>
</main>
</app-header-layout>
</app-drawer-layout>
</pb-page>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment