Commit d0041161 authored by Wolfgang's avatar Wolfgang

docx import: preserve local styling within tags

parent 4ea47209
No preview for this file type
.content {
.content, .footnotes {
font-family: 'Roboto', 'Noto', sans-serif;
}
.footnotes {
font-size: 85%;
}
h1, h2, h3, h4, h5, h6 {
line-height: 1.2;
}
......@@ -32,4 +35,13 @@ h4 {
text-transform: uppercase;
border-top: 1px solid #2C3962;
padding-top: .25em;
}
.b {
font-weight: bold;
}
.i {
font-style: italic;
}
.u {
text-decoration: underline;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:pb="http://teipublisher.com/1.0" xml:lang="en">
<teiHeader>
<fileDesc>
<titleStmt>
<title>DOCX Output Preview
<desc>A test ODD to preview TEI imported from Word docx</desc>
<desc>A test ODD to preview TEI imported from Word docx</desc>
</title>
</titleStmt>
<publicationStmt>
......@@ -28,6 +31,11 @@
<p>born digital</p>
</sourceDesc>
</fileDesc>
<encodingDesc>
<tagsDecl>
<rendition source="docx-output.css"/>
</tagsDecl>
</encodingDesc>
<revisionDesc>
<change when="2019-09-25+02:00">Initial version</change>
</revisionDesc>
......@@ -39,10 +47,24 @@
<outputRendition xml:space="preserve">
font-family: Menlo, Consolas, monospace;
font-size: 0.85em;
</outputRendition>
</model>
</elementSpec>
......@@ -51,8 +73,22 @@ font-size: 0.85em;
<param name="uri" value="'https://www.google.de/maps/place/' || @ref"/>
<param name="target" value="'_blank'"/>
<outputRendition xml:space="preserve">
color: #e24329;
font-variant: small-caps;
</outputRendition>
</model>
<model behaviour="inline">
......@@ -80,10 +116,24 @@ font-variant: small-caps;
<outputRendition xml:space="preserve">
font-family: Menlo, Consolas, monospace;
font-size: .85em;
</outputRendition>
</model>
</elementSpec>
......@@ -102,15 +152,96 @@ font-size: .85em;
<outputRendition xml:space="preserve">
margin-left: 10px;
margin-right: 10px;
padding-left: 10px;
border-left: 1px solid #C0C0C0;
</outputRendition>
</model>
</elementSpec>
<elementSpec ident="supplied" mode="change">
<model behaviour="inline">
<outputRendition xml:space="preserve">
color: #909090;
</outputRendition>
</model>
</elementSpec>
<elementSpec ident="eg" mode="add">
<model behaviour="block">
<outputRendition xml:space="preserve">
margin-left: 1.5em;
</outputRendition>
</model>
</elementSpec>
<elementSpec ident="hi" mode="change">
<model predicate="@rend" behaviour="inline">
<param name="rend" value="@rend"/>
<pb:template xmlns="" xml:space="preserve"><span class="[[rend]]">[[content]]</span></pb:template>
<outputRendition xml:space="preserve">
text-decoration: underline;
</outputRendition>
</model>
<model predicate="@rend='b'" behaviour="inline">
<outputRendition xml:space="preserve">
font-weight: bold;
</outputRendition>
</model>
<model predicate="@rendition" behaviour="inline" useSourceRendition="true">
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
</model>
<model predicate="not(@rendition)" behaviour="inline">
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
</model>
</elementSpec>
<elementSpec ident="head" mode="change">
<model predicate="$parameters?header='short'" behaviour="inline">
<param name="content" value="replace(string-join(.//text()[not(parent::ref)]), '^(.*?)[^\w]*$', '$1')"/>
</model>
<model predicate="parent::figure" behaviour="block">
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
</model>
<model predicate="parent::table" behaviour="block">
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
</model>
<model predicate="parent::lg" behaviour="block">
<outputRendition xml:space="preserve">
font-style: italic;
</outputRendition>
</model>
<model predicate="parent::list" behaviour="block">
<outputRendition xml:space="preserve">
font-weight: bold;
</outputRendition>
</model>
<model predicate="parent::div" behaviour="heading">
<param name="level" value="count($get(.)/ancestor::div)"/>
</model>
<model behaviour="block"/>
</elementSpec>
</schemaSpec>
</body>
</text>
......
<?xml version="1.0" encoding="UTF-8"?>
<?teipublisher output="tei"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:pb="http://teipublisher.com/1.0" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" xmlns:rel="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:pic="http://schemas.openxmlformats.org/drawingml/2006/picture" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<teiHeader>
......@@ -22,7 +23,8 @@
<desc>Convert DOCX via ODD</desc>
<desc>Convert DOCX via ODD</desc>
</title>
<title type="short">DOCX Import</title>
</titleStmt>
......@@ -84,8 +86,7 @@
<param name="place" value="'endnote'"/>
</model>
<model predicate="$parameters?cstyle(.)/name[@w:val = 'tei:persName'] and matches(., '&amp;#60;.*&amp;#62;')" behaviour="inline">
<desc>Example for encoding @ref attached to a tei:persName element using a convention</desc>
<param name="content" value="replace(., '^(.*?)&amp;#60;.*&amp;#62;(.*)$', '$1$2')"/>
<desc>Example for encoding @ref attached to a tei:persName element using a convention. Content between angle brackets will be stripped by post-processing</desc>
<param name="ref" value="replace(., '^.*?&amp;#60;(.*)&amp;#62;.*$', '$1')"/>
<pb:template xmlns="" xml:space="preserve"><persName xmlns="http://www.tei-c.org/ns/1.0" ref="http://d-nb.info/gnd/[[ref]]">[[content]]</persName></pb:template>
</model>
......@@ -97,19 +98,13 @@
<desc>Character style starts with 'tei:' and has parameters in content, which will be interpreted as attribute list</desc>
<param name="tei_element" value="substring-after($parameters?cstyle(.)/name/@w:val, 'tei:')"/>
<param name="tei_attributes" value="tokenize(replace(., '^.*?&amp;#60;(.*)&amp;#62;.*$', '$1'), '\s*;\s*')"/>
<param name="content" value="replace(., '^(.*?)&amp;#60;.*&amp;#62;(.*)$', '$1$2')"/>
</model>
<model predicate="$parameters?cstyle(.)/name[starts-with(@w:val, 'tei:')]" behaviour="inline">
<param name="tei_element" value="substring-after($parameters?cstyle(.)/name/@w:val, 'tei:')"/>
</model>
<model predicate="rPr/u or $parameters?cstyle(.)/rPr/u" behaviour="inline">
<pb:template xmlns="" xml:space="preserve"><hi xmlns="http://www.tei-c.org/ns/1.0" rend="underline">[[content]]</hi></pb:template>
</model>
<model predicate="rPr/b or $parameters?cstyle(.)/rPr/b" behaviour="inline">
<pb:template xmlns="" xml:space="preserve"><hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">[[content]]</hi></pb:template>
</model>
<model predicate="rPr/(i|caps) or $parameters?cstyle(.)/rPr/(i|caps)" behaviour="inline">
<pb:template xmlns="" xml:space="preserve"><hi xmlns="http://www.tei-c.org/ns/1.0">[[content]]</hi></pb:template>
<model predicate="rPr/(u|i|caps|b) or $parameters?cstyle(.)/rPr/(u|i|caps|b)" behaviour="inline">
<param name="rend" value="(rPr/(u|i|caps|b), $parameters?cstyle(.)/rPr/(u|i|caps|b)) ! local-name(.)"/>
<pb:template xmlns="" xml:space="preserve"><hi xmlns="http://www.tei-c.org/ns/1.0" rend="[[rend]]">[[content]]</hi></pb:template>
</model>
<model behaviour="inline"/>
</elementSpec>
......@@ -119,7 +114,7 @@
</model>
</elementSpec>
<elementSpec ident="bookmarkStart" mode="add">
<model behaviour="anchor">
<model predicate="not(starts-with(@w:name, 'OLE') or @w:name='_GoBack')" behaviour="anchor">
<param name="id" value="@w:name"/>
</model>
</elementSpec>
......
......@@ -21,6 +21,10 @@ import module namespace html="http://www.tei-c.org/tei-simple/xquery/functions";
import module namespace epub="http://www.tei-c.org/tei-simple/xquery/functions/epub";
(: generated template function for element spec: hi :)
declare %private function model:template-hi($config as map(*), $node as node()*, $params as map(*)) {
<t xmlns=""><span class="{$config?apply-children($config, $node, $params?rend)}">{$config?apply-children($config, $node, $params?content)}</span></t>/*
};
(:~
Main entry point for the transformation.
......@@ -74,19 +78,7 @@ declare function model:apply($config as map(*), $input as node()*) {
else
html:metadata($config, ., ("tei-teiHeader4"), .)
case element(supplied) return
if (parent::choice) then
html:inline($config, ., ("tei-supplied1"), .)
else
if (@reason='damage') then
html:inline($config, ., ("tei-supplied2"), .)
else
if (@reason='illegible' or not(@reason)) then
html:inline($config, ., ("tei-supplied3"), .)
else
if (@reason='omitted') then
html:inline($config, ., ("tei-supplied4"), .)
else
html:inline($config, ., ("tei-supplied5"), .)
html:inline($config, ., ("tei-supplied"), .)
case element(milestone) return
html:inline($config, ., ("tei-milestone"), .)
case element(label) return
......@@ -121,10 +113,19 @@ declare function model:apply($config as map(*), $input as node()*) {
else
$config?apply($config, ./node())
case element(hi) return
if (@rend="bold") then
html:inline($config, ., ("tei-hi1"), .)
if (@rend) then
let $params :=
map {
"rend": @rend,
"content": .
}
let $content :=
model:template-hi($config, ., $params)
return
html:inline(map:merge(($config, map:entry("template", true()))), ., ("tei-hi1"), $content)
else
if (@rend='underline') then
if (@rend='b') then
html:inline($config, ., ("tei-hi2"), .)
else
if (@rendition) then
......@@ -543,6 +544,8 @@ declare function model:apply($config as map(*), $input as node()*) {
html:inline($config, ., ("tei-persName2"), .)
case element(tag) return
html:inline($config, ., ("tei-tag"), .)
case element(eg) return
epub:block($config, ., ("tei-eg"), .)
case element(exist:match) return
html:match($config, ., .)
case element() return
......
......@@ -19,6 +19,10 @@ import module namespace css="http://www.tei-c.org/tei-simple/xquery/css";
import module namespace latex="http://www.tei-c.org/tei-simple/xquery/functions/latex";
(: generated template function for element spec: hi :)
declare %private function model:template-hi($config as map(*), $node as node()*, $params as map(*)) {
<t xmlns=""><span class="{$config?apply-children($config, $node, $params?rend)}">{$config?apply-children($config, $node, $params?content)}</span></t>/*
};
(:~
Main entry point for the transformation.
......@@ -69,19 +73,7 @@ declare function model:apply($config as map(*), $input as node()*) {
case element(teiHeader) return
latex:metadata($config, ., ("tei-teiHeader1"), .)
case element(supplied) return
if (parent::choice) then
latex:inline($config, ., ("tei-supplied1"), .)
else
if (@reason='damage') then
latex:inline($config, ., ("tei-supplied2"), .)
else
if (@reason='illegible' or not(@reason)) then
latex:inline($config, ., ("tei-supplied3"), .)
else
if (@reason='omitted') then
latex:inline($config, ., ("tei-supplied4"), .)
else
latex:inline($config, ., ("tei-supplied5"), .)
latex:inline($config, ., ("tei-supplied"), .)
case element(milestone) return
latex:inline($config, ., ("tei-milestone"), .)
case element(label) return
......@@ -116,10 +108,19 @@ declare function model:apply($config as map(*), $input as node()*) {
else
$config?apply($config, ./node())
case element(hi) return
if (@rend="bold") then
latex:inline($config, ., ("tei-hi1"), .)
if (@rend) then
let $params :=
map {
"rend": @rend,
"content": .
}
let $content :=
model:template-hi($config, ., $params)
return
latex:inline(map:merge(($config, map:entry("template", true()))), ., ("tei-hi1"), $content)
else
if (@rend='underline') then
if (@rend='b') then
latex:inline($config, ., ("tei-hi2"), .)
else
if (@rendition) then
......@@ -528,6 +529,8 @@ declare function model:apply($config as map(*), $input as node()*) {
latex:inline($config, ., ("tei-persName2"), .)
case element(tag) return
latex:inline($config, ., ("tei-tag"), .)
case element(eg) return
latex:block($config, ., ("tei-eg"), .)
case element() return
if (namespace-uri(.) = 'http://www.tei-c.org/ns/1.0') then
$config?apply($config, ./node())
......
......@@ -19,6 +19,10 @@ import module namespace css="http://www.tei-c.org/tei-simple/xquery/css";
import module namespace fo="http://www.tei-c.org/tei-simple/xquery/functions/fo";
(: generated template function for element spec: hi :)
declare %private function model:template-hi($config as map(*), $node as node()*, $params as map(*)) {
<t xmlns=""><span class="{$config?apply-children($config, $node, $params?rend)}">{$config?apply-children($config, $node, $params?content)}</span></t>/*
};
(:~
Main entry point for the transformation.
......@@ -69,19 +73,7 @@ declare function model:apply($config as map(*), $input as node()*) {
case element(teiHeader) return
fo:omit($config, ., ("tei-teiHeader2"), .)
case element(supplied) return
if (parent::choice) then
fo:inline($config, ., ("tei-supplied1"), .)
else
if (@reason='damage') then
fo:inline($config, ., ("tei-supplied2"), .)
else
if (@reason='illegible' or not(@reason)) then
fo:inline($config, ., ("tei-supplied3"), .)
else
if (@reason='omitted') then
fo:inline($config, ., ("tei-supplied4"), .)
else
fo:inline($config, ., ("tei-supplied5"), .)
fo:inline($config, ., ("tei-supplied"), .)
case element(milestone) return
fo:inline($config, ., ("tei-milestone"), .)
case element(label) return
......@@ -116,10 +108,19 @@ declare function model:apply($config as map(*), $input as node()*) {
else
$config?apply($config, ./node())
case element(hi) return
if (@rend="bold") then
fo:inline($config, ., ("tei-hi1"), .)
if (@rend) then
let $params :=
map {
"rend": @rend,
"content": .
}
let $content :=
model:template-hi($config, ., $params)
return
fo:inline(map:merge(($config, map:entry("template", true()))), ., ("tei-hi1"), $content)
else
if (@rend='underline') then
if (@rend='b') then
fo:inline($config, ., ("tei-hi2"), .)
else
if (@rendition) then
......@@ -527,6 +528,8 @@ declare function model:apply($config as map(*), $input as node()*) {
fo:inline($config, ., ("tei-persName2"), .)
case element(tag) return
fo:inline($config, ., ("tei-tag"), .)
case element(eg) return
fo:block($config, ., ("tei-eg"), .)
case element() return
if (namespace-uri(.) = 'http://www.tei-c.org/ns/1.0') then
$config?apply($config, ./node())
......
......@@ -19,6 +19,10 @@ import module namespace css="http://www.tei-c.org/tei-simple/xquery/css";
import module namespace html="http://www.tei-c.org/tei-simple/xquery/functions";
(: generated template function for element spec: hi :)
declare %private function model:template-hi($config as map(*), $node as node()*, $params as map(*)) {
<t xmlns=""><span class="{$config?apply-children($config, $node, $params?rend)}">{$config?apply-children($config, $node, $params?content)}</span></t>/*
};
(:~
Main entry point for the transformation.
......@@ -72,19 +76,7 @@ declare function model:apply($config as map(*), $input as node()*) {
else
html:metadata($config, ., ("tei-teiHeader4"), .)
case element(supplied) return
if (parent::choice) then
html:inline($config, ., ("tei-supplied1"), .)
else
if (@reason='damage') then
html:inline($config, ., ("tei-supplied2"), .)
else
if (@reason='illegible' or not(@reason)) then
html:inline($config, ., ("tei-supplied3"), .)
else
if (@reason='omitted') then
html:inline($config, ., ("tei-supplied4"), .)
else
html:inline($config, ., ("tei-supplied5"), .)
html:inline($config, ., ("tei-supplied"), .)
case element(milestone) return
html:inline($config, ., ("tei-milestone"), .)
case element(label) return
......@@ -119,10 +111,19 @@ declare function model:apply($config as map(*), $input as node()*) {
else
$config?apply($config, ./node())
case element(hi) return
if (@rend="bold") then
html:inline($config, ., ("tei-hi1"), .)
if (@rend) then
let $params :=
map {
"rend": @rend,
"content": .
}
let $content :=
model:template-hi($config, ., $params)
return
html:inline(map:merge(($config, map:entry("template", true()))), ., ("tei-hi1"), $content)
else
if (@rend='underline') then
if (@rend='b') then
html:inline($config, ., ("tei-hi2"), .)
else
if (@rendition) then
......@@ -541,6 +542,8 @@ declare function model:apply($config as map(*), $input as node()*) {
html:inline($config, ., ("tei-persName2"), .)
case element(tag) return
html:inline($config, ., ("tei-tag"), .)
case element(eg) return
html:block($config, ., ("tei-eg"), .)
case element(exist:match) return
html:match($config, ., .)
case element() return
......
......@@ -4,9 +4,12 @@
/* external styles loaded from docx-output.css */
.content {
.content, .footnotes {
font-family: 'Roboto', 'Noto', sans-serif;
}
.footnotes {
font-size: 85%;
}
h1, h2, h3, h4, h5, h6 {
line-height: 1.2;
}
......@@ -39,6 +42,15 @@ h4 {
border-top: 1px solid #2C3962;
padding-top: .25em;
}
.b {
font-weight: bold;
}
.i {
font-style: italic;
}
.u {
text-decoration: underline;
}
.simple_allcaps { text-transform: uppercase; }
.simple_blackletter { font-family: fantasy; }
.simple_bold { font-weight: bold; }
......@@ -79,21 +91,14 @@ h4 {
/* Model rendition styles */
.tei-supplied2:before { content:"<"; }
.tei-supplied2:after { content:">"; }
.tei-supplied3:before { content:"["; }
.tei-supplied3:after { content:"]"; }
.tei-supplied4:before { content:"("; }
.tei-supplied4:after { content:")"; }
.tei-supplied5:before { content:"{"; }
.tei-supplied5:after { content:"}"; }
.tei-supplied { color: #909090; }
.tei-signed1 { text-align: right; }
.tei-signed2 { font-style: italic; }
.tei-pb { display: block; margin-left: 4pt; color: grey; float: right; }
.tei-pb:before { content: '[Page '; }
.tei-pb:after { content: ']'; }
.tei-hi1 { font-weight: bold; }
.tei-hi2 { text-decoration: underline; }
.tei-hi1 { text-decoration: underline; }
.tei-hi2 { font-weight: bold; }
.tei-hi3 { font-style: italic; }
.tei-hi4 { font-style: italic; }
.tei-code { font-family:monospace }
......@@ -157,5 +162,4 @@ h4 {
.tei-persName1 { color: #007e00; }
.tei-persName2 { color: #007e00; }
.tei-tag { font-family: Menlo, Consolas, monospace; font-size: .85em; }
.tei-tag:before { content: '<'; }
.tei-tag:after { content: '>'; }
\ No newline at end of file
.tei-eg { margin-left: 1.5em; }
\ No newline at end of file
......@@ -41,15 +41,7 @@ declare %private function model:template-r4($config as map(*), $node as node()*,
};
(: generated template function for element spec: r :)
declare %private function model:template-r8($config as map(*), $node as node()*, $params as map(*)) {
<hi xmlns="http://www.tei-c.org/ns/1.0" rend="underline">{$config?apply-children($config, $node, $params?content)}</hi>
};
(: generated template function for element spec: r :)
declare %private function model:template-r9($config as map(*), $node as node()*, $params as map(*)) {
<hi xmlns="http://www.tei-c.org/ns/1.0" rend="bold">{$config?apply-children($config, $node, $params?content)}</hi>
};
(: generated template function for element spec: r :)
declare %private function model:template-r10($config as map(*), $node as node()*, $params as map(*)) {
<hi xmlns="http://www.tei-c.org/ns/1.0">{$config?apply-children($config, $node, $params?content)}</hi>
<hi xmlns="http://www.tei-c.org/ns/1.0" rend="{$config?apply-children($config, $node, $params?rend)}">{$config?apply-children($config, $node, $params?content)}</hi>
};
(: generated template function for element spec: cp:coreProperties :)
declare %private function model:template-cp_coreProperties($config as map(*), $node as node()*, $params as map(*)) {
......@@ -129,11 +121,11 @@ declare function model:apply($config as map(*), $input as node()*) {
tei:note($config, ., ("tei-r3"), $parameters?endnote(.), 'endnote', ())
else
if ($parameters?cstyle(.)/name[@w:val = 'tei:persName'] and matches(., '&#60;.*&#62;')) then
(: Example for encoding @ref attached to a tei:persName element using a convention :)
(: Example for encoding @ref attached to a tei:persName element using a convention. Content between angle brackets will be stripped by post-processing :)
let $params :=
map {
"content": replace(., '^(.*?)&#60;.*&#62;(.*)$', '$1$2'),
"ref": replace(., '^.*?&#60;(.*)&#62;.*$', '$1')
"ref": replace(., '^.*?&#60;(.*)&#62;.*$', '$1'),
"content": .
}
let $content :=
......@@ -147,49 +139,31 @@ declare function model:apply($config as map(*), $input as node()*) {
else
if ($parameters?cstyle(.)/name[starts-with(@w:val, 'tei:')] and matches(., '&#60;.*=.*&#62;')) then
(: Character style starts with 'tei:' and has parameters in content, which will be interpreted as attribute list :)
tei:inline($config, ., ("tei-r6"), replace(., '^(.*?)&#60;.*&#62;(.*)$', '$1$2'), map {"tei_element": substring-after($parameters?cstyle(.)/name/@w:val, 'tei:'), "tei_attributes": tokenize(replace(., '^.*?&#60;(.*)&#62;.*$', '$1'), '\s*;\s*')})
tei:inline($config, ., ("tei-r6"), ., map {"tei_element": substring-after($parameters?cstyle(.)/name/@w:val, 'tei:'), "tei_attributes": tokenize(replace(., '^.*?&#60;(.*)&#62;.*$', '$1'), '\s*;\s*')})
else
if ($parameters?cstyle(.)/name[starts-with(@w:val, 'tei:')]) then
tei:inline($config, ., ("tei-r7"), ., map {"tei_element": substring-after($parameters?cstyle(.)/name/@w:val, 'tei:')})
else
if (rPr/u or $parameters?cstyle(.)/rPr/u) then
if (rPr/(u|i|caps|b) or $parameters?cstyle(.)/rPr/(u|i|caps|b)) then
let $params :=
map {
"rend": (rPr/(u|i|caps|b), $parameters?cstyle(.)/rPr/(u|i|caps|b)) ! local-name(.),
"content": .
}
let $content :=
model:template-r8($config, ., $params)
return
tei:inline(map:merge(($config, map:entry("template", true()))), ., ("tei-r8"), $content, map {})
tei:inline(map:merge(($config, map:entry("template", true()))), ., ("tei-r8"), $content, map {"rend": (rPr/(u|i|caps|b), $parameters?cstyle(.)/rPr/(u|i|caps|b)) ! local-name(.)})
else
if (rPr/b or $parameters?cstyle(.)/rPr/b) then
let $params :=
map {
"content": .
}
let $content :=
model:template-r9($config, ., $params)
return
tei:inline(map:merge(($config, map:entry("template", true()))), ., ("tei-r9"), $content, map {})
else
if (rPr/(i|caps) or $parameters?cstyle(.)/rPr/(i|caps)) then
let $params :=
map {
"content": .
}
let $content :=
model:template-r10($config, ., $params)
return
tei:inline(map:merge(($config, map:entry("template", true()))), ., ("tei-r10"), $content, map {})
else
tei:inline($config, ., ("tei-r11"), ., map {})
tei:inline($config, ., ("tei-r9"), ., map {})
case element(document) return
tei:document($config, ., ("tei-document"), ($parameters?properties, .))
case element(bookmarkStart) return
tei:anchor($config, ., ("tei-bookmarkStart"), ., @w:name)
if (not(starts-with(@w:name, 'OLE') or @w:name='_GoBack')) then
tei:anchor($config, ., ("tei-bookmarkStart"), ., @w:name)
else
$config?apply($config, ./node())
case element(hyperlink) return
if (@w:anchor) then
tei:link($config, ., ("tei-hyperlink1"), ., '#' || @w:anchor, ())
......
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