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
5d9b7766
Commit
5d9b7766
authored
6 years ago
by
Michelle Weidling
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/editorial-notes' into 'develop'
Closes bdn-SADE#45 See merge request
!3
parents
d0c5abe4
607d1a54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!3
Closes bdn-SADE#45
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/intermediate_format/ifweb.xql
+3
-1
3 additions, 1 deletion
modules/intermediate_format/ifweb.xql
modules/intermediate_format/preprocessing.xqm
+15
-8
15 additions, 8 deletions
modules/intermediate_format/preprocessing.xqm
with
18 additions
and
9 deletions
modules/intermediate_format/ifweb.xql
+
3
−
1
View file @
5d9b7766
...
...
@@ -64,6 +64,7 @@ $target-dir as xs:string) as node()* {
declare function ifweb:transform-split-xml($xml as node()*, $filename as xs:string,
$dir as xs:string) {
let $preprocessed-data := pre:preprocessing($xml/*, $ifweb:replace-whitespace)
let $editorial-notes := pre:get-editorial-notes($xml/*, $ifweb:replace-whitespace)
let $intermediate-format := ident:walk($preprocessed-data, ())
(: sometimes we have structural variance on chapter level - in these cases
...
...
@@ -84,7 +85,8 @@ $dir as xs:string) {
let $transformed :=
element tei:div {
$content
$content,
$editorial-notes
}
let $store := xmldb:store($dir, $filename, $transformed)
...
...
This diff is collapsed.
Click to expand it.
modules/intermediate_format/preprocessing.xqm
+
15
−
8
View file @
5d9b7766
...
...
@@ -51,9 +51,7 @@ declare function pre:preprocessing-textNode
element
{
$node
/
name
()}{
$node
/
@
*,
pre:preprocessing-textNode
(
$node
/
node
())
,
element
{
"editorial-notes"
}{
$node
//
note
[
@type
eq
"editorial-commentary"
]
}
pre:get-editorial-notes
(
$node
,
$replace-whitespace
)
}
)
...
...
@@ -166,11 +164,7 @@ declare function pre:preprocessing
element
{
$node
/
name
()}{
$node
/
@
*,
pre:preprocessing
(
$node
/
node
()
,
$replace-whitespace
)
,
element
{
"editorial-notes"
}{
for
$editorial-note
in
$node
//
note
[
@type
eq
"editorial-commentary"
]
return
pre:default-element
(
$editorial-note
,
pre:preprocessing
(
$editorial-note
/
node
()
,
$replace-whitespace
)
)
}
pre:get-editorial-notes
(
$node
,
$replace-whitespace
)
}
)
...
...
@@ -312,3 +306,16 @@ declare function pre:preprocessing
pre:default-element
(
$node
,
pre:preprocessing
(
$node
/
node
()
,
$replace-whitespace
)
)
)
};
(:~
: Returns all editorial notes of a document in a new element.
:
: @author Michelle Weidling :)
declare
function
pre:get-editorial-notes
(
$node
as
node
()
*,
$replace-whitespace
)
as
element
(
editorial-notes
)
{
element
{
"editorial-notes"
}{
for
$editorial-note
in
$node
//
note
[
@type
eq
"editorial-commentary"
]
return
pre:default-element
(
$editorial-note
,
pre:preprocessing
(
$editorial-note
/
node
()
,
$replace-whitespace
))
}
};
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