Skip to content
Snippets Groups Projects
Commit 6793b7f3 authored by usikora's avatar usikora :monkey:
Browse files

fixed comment-node error (ignore them) and changed some documentation information

parent 8213fe4e
Branches
Tags
No related merge requests found
...@@ -7,8 +7,8 @@ xquery version "3.0"; ...@@ -7,8 +7,8 @@ xquery version "3.0";
: on their first or last decendants path to set textcritical markers required in the printed version of a : on their first or last decendants path to set textcritical markers required in the printed version of a
: BdN digital edition. : BdN digital edition.
: :
: The basic idea is constructing a some kind of first- and last-descendants PATH for reading nodes (tei:lem and tei:rdg) describing : The basic idea is constructing some kind of left- and right-branch AXIS for reading nodes (tei:lem and tei:rdg) describing
: a save PATH of non-BLE self not including Blocklevel-elements on their own first- or last-decendants paths down the tree. : a save axis of non-Blocklevel nodes (non-BLE) self not including BLEs on their own left- or right-branch AXIS down the tree.
: :
: It includes the helping module "markerset" holding helper functions to collect and construct reading markers : It includes the helping module "markerset" holding helper functions to collect and construct reading markers
...@@ -27,7 +27,7 @@ declare default element namespace "http://www.tei-c.org/ns/1.0"; ...@@ -27,7 +27,7 @@ declare default element namespace "http://www.tei-c.org/ns/1.0";
(:~ (:~
: ident:blocklevel-elements : ident:blocklevel-elements
: Variable defining Blocklevelelements by name : Variable defining Blocklevel Elements (BLE) by name
: :
: @version 2.0 (2018-01-29) : @version 2.0 (2018-01-29)
: @author Uwe Sikora : @author Uwe Sikora
...@@ -50,7 +50,7 @@ declare variable $ident:blocklevel-elements := ('titlePage', 'titlePart', 'align ...@@ -50,7 +50,7 @@ declare variable $ident:blocklevel-elements := ('titlePage', 'titlePart', 'align
: @author Uwe Sikora : @author Uwe Sikora
:) :)
declare function ident:in-sequence declare function ident:in-sequence
( $values as xs:anyAtomicType* , $sequence as xs:anyAtomicType*) as xs:boolean { ( $values as xs:anyAtomicType* , $sequence as xs:anyAtomicType* ) as xs:boolean {
$values = $sequence $values = $sequence
}; };
...@@ -292,12 +292,13 @@ declare function ident:walk ...@@ -292,12 +292,13 @@ declare function ident:walk
return return
typeswitch($node) typeswitch($node)
case processing-instruction() return () case processing-instruction() return ()
case comment() return ()
case text() return ( case text() return (
if (normalize-space($node) eq "") then () else ( if (normalize-space($node) eq "") then () else (
ident:mark-node($node, $reading-sequence) ident:mark-node($node, $reading-sequence)
) )
) )
case element(teiHeader) return ( $node )
case element(rdg) return ( case element(rdg) return (
if ( not($node/parent::app[ @type eq "structural-variance" ]) ) then ( if ( not($node/parent::app[ @type eq "structural-variance" ]) ) then (
let $identified-targets := ident:identify-targets($node) let $identified-targets := ident:identify-targets($node)
...@@ -359,10 +360,16 @@ declare function ident:mark-node ...@@ -359,10 +360,16 @@ declare function ident:mark-node
) )
) else ( ) else (
if ( $node[ not(self::text()) ] ) then ( if ( $node[ not(self::text()) ] ) then (
element{$node/name()}{
$node/@*, if ($node[not(name())]) then (
ident:walk($node/node(), $reading-sequence) <ERROR>{$node}</ERROR>
} ) else (
element{$node/name()}{
$node/@*,
ident:walk($node/node(), $reading-sequence)
}
)
) else ( ) else (
$node $node
) )
...@@ -413,7 +420,7 @@ declare function ident:mark-node ...@@ -413,7 +420,7 @@ declare function ident:mark-node
: @author Uwe Sikora : @author Uwe Sikora
:) :)
declare function ident:fetch-marker-from-sequence declare function ident:fetch-marker-from-sequence
($node-id as xs:string, $reading-sequence as item()* ) as node()* { ( $node-id as xs:string, $reading-sequence as item()* ) as node()* {
for $seq-item in $reading-sequence for $seq-item in $reading-sequence
let $found := $seq-item/target[@gid = $node-id] let $found := $seq-item/target[@gid = $node-id]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment