diff --git a/data/samples/samples4.xml b/data/samples/samples4.xml index 61483a9d4ca228f69a5f1d6c00ee9bafc2893ead..519321e7b60fdf2d23f8b947295a1ffbaec4aa96 100644 --- a/data/samples/samples4.xml +++ b/data/samples/samples4.xml @@ -2,20 +2,208 @@ <?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?><?xml-model href="http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron"?> <TEI xmlns="http://www.tei-c.org/ns/1.0"> + <teiHeader xml:id="gr_header"> + <!-- Dateibeschreibung --> + <fileDesc> + <!-- Titelbeschreibung --> + <titleStmt> + <title level="s"> + <title type="main">Bibliothek der Neologie (BdN)</title> + <title type="sub">Kommentierte kritische Auswahledition in zehn Bänden</title> + </title> + <title level="a">BdN III: Johann Jakob Griesbach, Anleitung zum Studium der populären Dogmatik + (1. Aufl. 1779; 2. Aufl. 1786; 3. Aufl. 1787; 4. Aufl. 1789), <date>Juni 2018</date> + </title> + <title type="condensed">Anleitung zum Studium der populären Dogmatik</title> + <author> + <persName> + <ref target="#textgrid:2r5h7">Griesbach, Johann Jakob</ref> + </persName> + </author> + <principal> + <persName> + <ref target="#textgrid:24gvr">Beutel, Albrecht</ref> + </persName> + </principal> + <respStmt> + <resp>Herausgeber</resp> + <persName>Stallmann, Marco</persName> + </respStmt> + <respStmt> + <resp>Unter Mitarbeit von</resp> + <persName>Figgen, Larissa</persName> + <persName>Huck, Johannes</persName> + <persName>Lemitz, Bastian</persName> + <persName>Söntgerath, Olga</persName> + <persName>Stallmann, Marco</persName> + </respStmt> + <respStmt> + <resp>TEI-Schema und Metadaten</resp> + <persName>Sikora, Uwe</persName> + </respStmt> + <respStmt> + <resp>Visualisierung und Portal</resp> + <persName>Rodzis, Michelle</persName> + </respStmt> + <respStmt> + <resp key="former" from="2014" to="2015">Principal</resp> + <persName> + <ref target="#textgrid:2r5z5">Neuroth, Heike</ref> + </persName> + </respStmt> + <respStmt> + <resp key="former" from="2014" to="2015">Editor</resp> + <persName>Goormann, Lena</persName> + <persName>Meier, Lars-Steffen</persName> + </respStmt> + <respStmt> + <resp key="former" from="2014" to="2014">Visualisierung und Portal</resp> + <persName>Göbel, Matthias</persName> + </respStmt> + <respStmt> + <resp key="former" from="2014" to="2015">Visualisierung und Portal</resp> + <persName>Riebl, Hannes</persName> + </respStmt> + <sponsor>Deutsche Forschungsgemeinschaft (DFG)</sponsor> + </titleStmt> + + <!-- Editionsbeschreibung --> + <editionStmt> + <edition>Johann Jakob Griesbach, Anleitung zum Studium der populären Dogmatik (1. Aufl. 1779; + 2. Aufl. 1786; 3. Aufl. 1787; 4. Aufl. 1789), hg. v. Marco Stallmann (BdN III), + <date>2018</date> + </edition> + </editionStmt> + + + <!-- Publikationsbeschreibung --> + <publicationStmt> + <publisher>DFG-Projekt "Bibliothek der Neologie. Kommentierte kritische Auswahledition in zehn + Bänden", Seminar für Kirchengeschichte II, Evangelisch-Theologische Fakultät, Westfälische + Wilhelms-Universität Münster</publisher> + <publisher>Niedersächsische Staats- und Universitätsbibliothek Göttingen, Abteilungen: + Forschung und Entwicklung, Informations- und Literaturversorgung Zentrale Erwerbung und + Erschließung (Gruppe Metadaten und Datenkonversion)</publisher> + <distributor> + <persName>Stallmann, Marco</persName> + </distributor> + <authority> + <persName> + <ref target="#textgrid:24gvr">Beutel, Albrecht</ref> + </persName> + <persName> + <ref target="#textgrid:2r5z6">Blümm, Mirjam</ref> + </persName> + <persName> + <ref target="#textgrid:2r5z3">Söntgerath, Olga</ref> + </persName> + </authority> + <date>Juni 2018</date> + <availability status="free"> + <licence target="https://creativecommons.org/licenses/by-sa/3.0/legalcode"> + <p>Creative Commons Attribution-ShareAlike 3.0 Unported License</p> + </licence> + </availability> + </publicationStmt> + + <!-- Reihenbeschreibung --> + <seriesStmt> + <title level="s"> + <title type="main">Bibliothek der Neologie (BdN)</title> + <title type="sub">Kommentierte kritische Auswahledition in zehn Bänden</title> + </title> + <title level="a">BdN III: Johann Jakob Griesbach, Anleitung zum Studium der populären Dogmatik + (1. Aufl. 1779; 2. Aufl. 1786; 3. Aufl. 1787; 4. Aufl. 1789)</title> + <respStmt> + <resp>Reihenherausgeber</resp> + <persName> + <ref target="#textgrid:24gvr">Beutel, Albrecht</ref> + </persName> + <persName> + <ref target="#textgrid:2r5z3">Söntgerath, Olga</ref> + </persName> + </respStmt> + <respStmt> + <resp>Bandherausgeber</resp> + <persName>Stallmann, Marco</persName> + </respStmt> + </seriesStmt> + + + <!-- Quellenbeschreibung --> + <sourceDesc> + <listWit> + <witness xml:id="a"> + <desc>1. Aufl. 1779</desc> + <bibl>D. Johann Jakob Griesbach's Anleitung zur gelehrten Kenntnis der populären + Dogmatik. Jena, mit Hellers Schriften, 1779</bibl> + </witness> + <witness xml:id="b"> + <desc>2. Aufl. 1786</desc> + <bibl>D. Johann Jakob Griesbach's, Sachsen Weimar- und Eisenachischen Geheimen + Kirchenraths und ersten Lehrers der Theologie zu Jena, Anleitung zum Studium der + populären Dogmatik, besonders für künftige Religionslehrer. Zweite stark vermehrte + Ausgabe. Mit Churfürstl. Sächßis. gnädigsten Privilegien. Jena, im Verlag der + Cunoischen Erben. 1786</bibl> + </witness> + <witness xml:id="c"> + <desc type="base-text">3. Aufl. 1787</desc> + <bibl>D. Johann Jakob Griesbach's, Sachsen Weimar- und Eisenachischen Geheimen + Kirchenraths und ersten Lehrers der Theologie zu Jena, Anleitung zum Studium der + populären Dogmatik, besonders für künftige Religionslehrer. Dritte verbesserte + Ausgabe. Mit Churfürstl. Sächßis. gnädigsten Privilegien. Jena, im Verlag der + Cunoischen Erben. 1787</bibl> + </witness> + <witness xml:id="d"> + <desc>4. Aufl. 1789</desc> + <bibl>D. Johann Jakob Griesbach's, Sachsen Weimar- und Eisenachischen Geheimen + Kirchenraths und ersten Lehrers der Theologie zu Jena, Anleitung zum Studium der + populären Dogmatik, besonders für künftige Religionslehrer. Vierte neu + durchgesehene Ausgabe. Mit Churfürstl. Sächßis. gnädigsten Privilegien. Jena, bei + Christ. Heinr. Cuno's Erben. 1789.</bibl> + </witness> + </listWit> + </sourceDesc> + </fileDesc> + + <!-- Beschreibung der Editionsrichtlinien --> + <encodingDesc> + <projectDesc> + <p>DFG-Projekt "Bibliothek der Neologie. Kommentierte kritische Auswahledition in zehn + Bänden", Seminar für Kirchengeschichte II, Evangelisch-Theologische Fakultät, Westfälische + Wilhelms-Universität Münster</p> + </projectDesc> + <editorialDecl> + <p>Eine umfassende Beschreibung der Editionsrichtlinien wird auf dem Portal des Projekts + veröffentlicht: <ref target="http://www.bdn-edition.de">http://www.bdn-edition.de</ref>.</p> + </editorialDecl> + </encodingDesc> + + <revisionDesc> + <change/> + </revisionDesc> + + </teiHeader> <text> <app n="1"> <lem> <div> <head> - <item> - <hi> - <item> - <hi>ÜberschriftT</hi> - </item> - </hi> - </item> + <div> + <head>tr</head> + <item> + <hi> + <item> + <hi>ÜberschriftT</hi> + </item> + </hi> + </item> + </div> <hi>1</hi> </head> + <div> + <head>3</head> + </div> <p>Erster Paragraph</p> <p> <hi> @@ -227,5 +415,17 @@ <rdg wit="#b" type="v">eingeschränkt</rdg> </app>, oder wieder aufgehoben worden ist:</rdg> </app> + <app> + <lem> + <aligned> + <pb edRef="#c" type="sp" n="I"/> + <hi>LEM Überschrift</hi> + </aligned> + </lem> + <rdg wit="#a" type="typo_corr">A Überschrift</rdg> + <rdg wit="#b" type="invisible-ref"> + <di>A Überschrift</di> + </rdg> + </app> </text> </TEI> \ No newline at end of file diff --git a/modules/intermediate_format/identification.xqm b/modules/intermediate_format/identification.xqm index 7bf2819a1c32afd2bab69486c8a25cd20d129f76..4f0f1b3600d5988e3e5e0558207b0d34248777a3 100644 --- a/modules/intermediate_format/identification.xqm +++ b/modules/intermediate_format/identification.xqm @@ -303,9 +303,9 @@ declare function ident:identify-targets : @param $reading-sequence sequence holding the evaluation reports of the relevant readings in the nodes' context : @return converted node : - : @version 2.1 (2018-02-20) + : @version 2.2 (2018-02-21) : @status working - : @author Uwe Sikora + : @author Uwe Sikora, Michelle Rodzis :) declare function ident:walk ( $nodes as node()*, $reading-sequence as item()* ) as item()* { @@ -322,9 +322,16 @@ declare function ident:walk ) case element(teiHeader) return ( $node ) - (: considering all tei:rdg except structural-variances and textcritical tei:rdg[@type="v"]:) + (: + considering all tei:rdg except structural-variances and textcritical tei:rdg[@type="v"] + Also ignore tei:rdg with types "typo_corr", "invisible-ref", "varying-target" - They don't need Markers + :) case element(rdg) return ( - if ( not($node/parent::app[ @type eq "structural-variance" ] or $node[@type="v"]) ) then ( + if ( not( + $node/parent::app[ @type eq "structural-variance" ] or + $node[@type="v" or @type="typo_corr" or @type="invisible-ref" or @type="varying-target"] + ) + ) then ( let $identified-targets := ident:identify-targets($node) return ident:mark-node( $node, ($reading-sequence, ident:identify-targets($node)) ) ) else ( diff --git a/modules/intermediate_format/markerset.xqm b/modules/intermediate_format/markerset.xqm index ca0e14f1774ace758b6928b48a0782dcf8b0c86a..25669750ac0deb7f1c8921eda3e14daa4f433ca0 100644 --- a/modules/intermediate_format/markerset.xqm +++ b/modules/intermediate_format/markerset.xqm @@ -4,9 +4,9 @@ xquery version "3.0"; : ******************************************************************************************* : This module is a helper module and defines functions to collect and construct reading markers : - : @version 2.0 (2018-01-29) + : @version 2.1 (2018-02-21) : @status working - : @author Uwe Sikora + : @author Uwe Sikora, Michelles Rodzis :) module namespace markerset="http://bdn.edition.de/intermediate_format/markerset"; declare default element namespace "http://www.tei-c.org/ns/1.0"; @@ -22,17 +22,18 @@ declare default element namespace "http://www.tei-c.org/ns/1.0"; : @param $reading the reading node to collect readings for : @return node() representing a markerset of readings for the given node : - : @version 2.0 (2018-01-29) + : @version 2.1 (2018-02-21) : @status working - : @author Uwe Sikora + : @author Uwe Sikora, Michelle Rodzis :) declare function markerset:collect-markers ( $reading as node()* ) as item() { let $markers := ( if ($reading[self::lem]) then ( + (: In case of tei:lem ignore all siglae for types "typo_corr", "invisible-ref", "varying-target" :) attribute {"count"}{count($reading/following-sibling::rdg)}, - for $sibling in $reading/following-sibling::rdg + for $sibling in $reading/following-sibling::rdg[ not(@type="typo_corr" or @type="invisible-ref" or @type="varying-target") ] return( element {name($sibling)} { $sibling/@*, @@ -41,6 +42,7 @@ declare function markerset:collect-markers ) ) else if ($reading[self::rdg]) then ( + (: Preparing "Leittextwechsel" :) if ($reading[@type = "ppl" or @type = "pp"][descendant::lem[@wit]]) then ( let $children-readings := $reading/descendant::rdg return( diff --git a/rest/intermediate_format.xql b/rest/intermediate_format.xql index ebe88af40daa4b6b8dd2eca873710d2abf361808..65ba12d5bc572f3758ffdad7cd137988c77b6b52 100644 --- a/rest/intermediate_format.xql +++ b/rest/intermediate_format.xql @@ -1,7 +1,6 @@ xquery version "3.1"; declare namespace tei = "http://www.tei-c.org/ns/1.0"; -import module namespace functx="http://www.functx.com"; import module namespace pre="http://bdn.edition.de/intermediate_format/preprocessing" at "xmldb:exist:///db/apps/interformat/modules/intermediate_format/preprocessing.xqm"; import module namespace ident = "http://bdn.edition.de/intermediate_format/identification" at "xmldb:exist:///db/apps/interformat/modules/intermediate_format/identification.xqm"; @@ -10,7 +9,7 @@ declare option exist:serialize "method=xml media-type=text/xml omit-xml-declarat (: http://localhost:8080/exist/rest/apps/interformat/rest/intermediate_format.xql :) declare variable $doc-path := request:get-parameter("path", ()); -(:declare variable $doc-path := "/apps/interform/data/sample1.xml";:) +(:declare variable $doc-path := "/db/apps/interformat/data/samples/samples4.xml";:) let $doc := doc($doc-path) let $preprocessed-data := pre:preprocessing($doc/tei:TEI) return (