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
a0e3280a
Commit
a0e3280a
authored
7 years ago
by
usikora
Browse files
Options
Downloads
Patches
Plain Diff
add @break='yes' if tei:pb has a whitespace text() as preceding or following sibling
parent
5f425c17
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/intermediate_format/preprocessing.xqm
+19
-5
19 additions, 5 deletions
modules/intermediate_format/preprocessing.xqm
with
19 additions
and
5 deletions
modules/intermediate_format/preprocessing.xqm
+
19
−
5
View file @
a0e3280a
...
@@ -186,7 +186,7 @@ declare function pre:preprocessing
...
@@ -186,7 +186,7 @@ declare function pre:preprocessing
)
)
case
element
(
pb
)
return
(
case
element
(
pb
)
return
(
let
$prece
e
ding-sibling
:=
$node
/
preceding-sibling
::
node
()[
1
]
let
$preceding-sibling
:=
$node
/
preceding-sibling
::
node
()[
1
]
let
$following-sibling
:=
$node
/
following-sibling
::
node
()[
1
]
let
$following-sibling
:=
$node
/
following-sibling
::
node
()[
1
]
let
$first
:=
$node
=
$node
/
parent
::
node
()
/
node
()[
not
(
self
::
text
()
and
normalize-space
(
self
::
node
())
=
''
)][
1
]
let
$first
:=
$node
=
$node
/
parent
::
node
()
/
node
()[
not
(
self
::
text
()
and
normalize-space
(
self
::
node
())
=
''
)][
1
]
let
$ignore
:=
(
"docAuthor"
,
"app"
,
"index"
,
"seg"
,
"bibl"
)
let
$ignore
:=
(
"docAuthor"
,
"app"
,
"index"
,
"seg"
,
"bibl"
)
...
@@ -195,15 +195,29 @@ declare function pre:preprocessing
...
@@ -195,15 +195,29 @@ declare function pre:preprocessing
$node
/
@
*,
$node
/
@
*,
if
(
if
(
(
$prece
e
ding-sibling
[
self
::
text
()
and
not
(
normalize-space
(
.
)
=
''
)]
and
ends-with
(
$prece
e
ding-sibling
,
" "
)
=
false
()
)
(
$preceding-sibling
[
self
::
text
()
and
not
(
normalize-space
(
.
)
=
''
)]
and
ends-with
(
$preceding-sibling
,
" "
)
=
false
()
)
and
and
(
$following-sibling
[
self
::
text
()
and
not
(
normalize-space
(
.
)
=
''
)]
and
starts-with
(
$following-sibling
,
" "
)
=
false
()
)
(
$following-sibling
[
self
::
text
()
and
not
(
normalize-space
(
.
)
=
''
)]
and
starts-with
(
$following-sibling
,
" "
)
=
false
()
)
)
then
(
attribute
{
"break"
}{
"no"
}
)
)
then
(
attribute
{
"break"
}{
"no"
}
)
(:else if (
( $preceeding-sibling[self::text() and not(normalize-space(.) = '')] and ends-with($preceeding-sibling, " ") = true() )
and
( $following-sibling[self::text() and not(normalize-space(.) = '')] and starts-with($following-sibling, " ") = true() )
) then ( attribute {"clear"}{"left"} ) :)
else
if
(
$following-sibling
[
self
::
docAuthor
or
self
::
app
or
self
::
index
or
self
::
seg
or
self
::
bibl
]
)
then
(
else
if
(
$following-sibling
[
self
::
docAuthor
or
self
::
app
or
self
::
index
or
self
::
seg
or
self
::
bibl
]
)
then
(
attribute
{
"break"
}{
"yes"
}
attribute
{
"break"
}{
"yes"
}
)
)
else
if
(
(
$preceding-sibling
[
self
::
text
()
and
normalize-space
(
.
)
=
''
]
)
and
(
$following-sibling
[
self
::
text
()
and
normalize-space
(
.
)
=
''
]
)
)
then
(
attribute
{
"break"
}{
"yes"
}
)
else
(
)
else
(
)
}
}
)
)
...
...
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