Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
intermediate-format
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bibliothek-der-neologie
intermediate-format
Commits
6793b7f3
Commit
6793b7f3
authored
7 years ago
by
usikora
Browse files
Options
Downloads
Patches
Plain Diff
fixed comment-node error (ignore them) and changed some documentation information
parent
8213fe4e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/intermediate_format/identification.xqm
+17
-10
17 additions, 10 deletions
modules/intermediate_format/identification.xqm
with
17 additions
and
10 deletions
modules/intermediate_format/identification.xqm
+
17
−
10
View file @
6793b7f3
...
@@ -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
firs
t- and
last-descendants PATH
for reading nodes (tei:lem and tei:rdg) describing
: The basic idea is constructing some kind of
lef
t- and
right-branch AXIS
for reading nodes (tei:lem and tei:rdg) describing
: a save
PATH
of non-BLE self not including B
locklevel-element
s on their own
firs
t- or
last-decendants paths
down the tree.
: a save
axis
of
non-Blocklevel nodes (
non-BLE
)
self not including B
LE
s on their own
lef
t- 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 Blocklevel
e
lements by name
: Variable defining Blocklevel
E
lements
(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
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment