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
aa82ae8b
Commit
aa82ae8b
authored
7 years ago
by
usikora
Browse files
Options
Downloads
Patches
Plain Diff
minor changes in axis testing
parent
6793b7f3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
oxygen/devel/data/samples4.xml
+1
-1
1 addition, 1 deletion
oxygen/devel/data/samples4.xml
oxygen/intermediate_format.oxygen.devel.xqm
+55
-2
55 additions, 2 deletions
oxygen/intermediate_format.oxygen.devel.xqm
with
56 additions
and
3 deletions
oxygen/devel/data/samples4.xml
+
1
−
1
View file @
aa82ae8b
...
...
@@ -140,7 +140,7 @@
</div>
</lem>
<rdg
wit=
"#a"
type=
"om"
></rdg>
<rdg
wit=
"#b"
type=
"ptl"
>
<rdg
wit=
"#b
#e
"
type=
"ptl"
>
<div>
<app>
<lem
/>
...
...
This diff is collapsed.
Click to expand it.
oxygen/intermediate_format.oxygen.devel.xqm
+
55
−
2
View file @
aa82ae8b
...
...
@@ -168,7 +168,39 @@ declare function local:is-save-last-node
if
(
$has-save-last-descendants
and
not
(
$self-ble
))
then
(
true
())
else
(
false
())
};
declare
function
local:axis-test
(
$node
as
node
()
)
as
item
()
{
let
$left-axis
:=
ident:left-branch-axis
(
$node
)
let
$right-axis
:=
ident:right-branch-axis
(
$node
)
return
element
{
"axisTest"
}{
element
{
"node"
}{
$node
}
,
(:element {"test"}{
attribute {"index"}{fn:index-of($left-axis, $left-axis[4])},
fn:index-of($left-axis, $left-axis[ ident:is-or-are-ble(self::node()/name()) ][last()])
},:)
element
{
"leftAxis"
}{
attribute
{
"names"
}{
$left-axis
/
name
()}
,
for
$item
at
$nr
in
$left-axis
return
element
{
"item"
}{
attribute
{
"n"
}{
$nr
}
,
attribute
{
"gid"
}{
generate-id
(
$item
)}
,
$item
}
}
,
element
{
"rightAxis"
}{
attribute
{
"names"
}{
$right-axis
/
name
()}
,
for
$item
at
$nr
in
$right-axis
return
element
{
"item"
}{
attribute
{
"n"
}{
$nr
}
,
attribute
{
"gid"
}{
generate-id
(
$item
)}
,
$item
}
}
}
};
let
$doc
:=
.
...
...
@@ -176,8 +208,29 @@ let $pre := pre:preprocessing($doc/node())
(:let $pre := pre:preprocessing($doc/node())
let $app-index := local:app-index( $pre//app[not(@type)] )
let $target-index := target:index($app-index):)
let
$test
:=
<test>
<div>
<head>
<app>
<lem>
Überschrift
</lem>
<rdg
wit=
"#a"
type=
"v"
>
überschrift
</rdg>
</app>
</head>
<p>
Erster
Absatz
</p>
<p>
Zweiter
Absatz
</p>
<note>
<app>
<lem>
Anmerkung
</lem>
<rdg
wit=
"#a"
type=
"v"
>
anmerkung
</rdg>
<rdg
wit=
"#b"
type=
"ppl"
><div>
DIV
anmerkung
</div></rdg>
<rdg
wit=
"#c"
type=
"v"
><div>
DIV2
anmerkung
</div></rdg>
</app>
</note>
</div>
</test>
return
(
(:ident:left-nodes-path($test),:)
(:local:axis-test($test):)
(:ident:identify-unit-test($pre):)
(:$pre:)
ident:walk
(
$pre
,
())
...
...
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