Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
XPath Parser
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Sylvain Schmitz
XPath Parser
Commits
c7544571
Commit
c7544571
authored
Jun 28, 2018
by
Anthony LICK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add XPath 3.0 std results to full table
parent
76bb3edc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
55 deletions
+64
-55
tools/tex/composition_full.sh
tools/tex/composition_full.sh
+64
-55
No files found.
tools/tex/composition_full.sh
View file @
c7544571
#!/bin/bash
#!/bin/bash
fragment
=
'xpath-2.0-core-join.rnc'
fragment
=
'xpath-2.0-core-join.rnc'
std
=
'xpath-3.0-std.rnc'
xslt
=
`
grep
'xslt'
benchmarks-all-full.xml |
sed
-e
's/.*href="\([^"]*\).*/\1/'
`
xslt
=
`
grep
'xslt'
benchmarks-all-full.xml |
sed
-e
's/.*href="\([^"]*\).*/\1/'
`
xquery
=
`
grep
'xquery'
benchmarks-all-full.xml |
sed
-e
's/.*href="\([^"]*\).*/\1/'
`
xquery
=
`
grep
'xquery'
benchmarks-all-full.xml |
sed
-e
's/.*href="\([^"]*\).*/\1/'
`
printf
'\\begin{tabular}{lrrrrr}\n'
printf
'\\begin{tabular}{lrrrrr
r
}\n'
printf
'\\toprule\n'
printf
'\\toprule\n'
printf
'Source & queries & XPath\\,1.0 & XPath\\,2.0 & XPath\,3.0 &
\\textsf{CoreXPath
~2.0}\\\\\n'
printf
'Source & queries & XPath\\,1.0 & XPath\\,2.0 & XPath\,3.0 &
XPath\,3.0\,std & \\textsf{Core
~2.0}\\\\\n'
printf
' & & & & & extended\\\\\n'
printf
' & & & & &
&
extended\\\\\n'
printf
'\\midrule\n'
printf
'\\midrule\n'
# XSLT files
# XSLT files
...
@@ -27,6 +28,9 @@ do
...
@@ -27,6 +28,9 @@ do
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
"&
$percent
\\\\
%% "
done
done
count
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$std
\"
and @valid=
\"
yes
\"
]])"
$file
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
count
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$fragment
\"
and @valid=
\"
yes
\"
]])"
$file
`
count
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$fragment
\"
and @valid=
\"
yes
\"
]])"
$file
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
"&
$percent
\\\\
%% "
...
@@ -42,25 +46,36 @@ printf "& %'.0f " $n
...
@@ -42,25 +46,36 @@ printf "& %'.0f " $n
#coverage of standard XPath languages
#coverage of standard XPath languages
for
((
i
=
1
;
i < 4
;
++i
))
for
((
i
=
1
;
i < 4
;
++i
))
do
do
count
=
0
count
=
0
for
file
in
$xslt
for
file
in
$xslt
do
do
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
xpath-
$i
.0.rnc
\"
and @valid=
\"
yes
\"
]])"
$file
`
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
xpath-
$i
.0.rnc
\"
and @valid=
\"
yes
\"
]])"
$file
`
count
=
$((
count+c
))
count
=
$((
count+c
))
done
done
counts[
$i
]=
$count
counts[
$i
]=
$count
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
"&
$percent
\\\\
%% "
done
done
# std
count
=
0
count
=
0
for
file
in
$xslt
for
file
in
$xslt
do
do
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$
fragment
\"
and @valid=
\"
yes
\"
]])"
$file
`
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$
std
\"
and @valid=
\"
yes
\"
]])"
$file
`
count
=
$((
count+c
))
count
=
$((
count+c
))
done
done
counts[4]
=
$count
counts[4]
=
$count
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
"&
$percent
\\\\
%% "
# Core 2.0
count
=
0
for
file
in
$xslt
do
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$fragment
\"
and @valid=
\"
yes
\"
]])"
$file
`
count
=
$((
count+c
))
done
counts[5]
=
$count
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
'\\\\\n'
printf
'\\\\\n'
printf
'\\midrule\n'
printf
'\\midrule\n'
...
@@ -82,6 +97,9 @@ do
...
@@ -82,6 +97,9 @@ do
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
"&
$percent
\\\\
%% "
done
done
count
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$std
\"
and @valid=
\"
yes
\"
]])"
$file
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
count
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$fragment
\"
and @valid=
\"
yes
\"
]])"
$file
`
count
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$fragment
\"
and @valid=
\"
yes
\"
]])"
$file
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
"&
$percent
\\\\
%% "
...
@@ -97,58 +115,49 @@ printf "& %'.0f " $n
...
@@ -97,58 +115,49 @@ printf "& %'.0f " $n
# coverage of standard XPath languages
# coverage of standard XPath languages
for
((
i
=
1
;
i < 4
;
++i
))
for
((
i
=
1
;
i < 4
;
++i
))
do
do
count
=
0
count
=
0
for
file
in
$xquery
for
file
in
$xquery
do
do
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
xpath-
$i
.0.rnc
\"
and @valid=
\"
yes
\"
]])"
$file
`
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
xpath-
$i
.0.rnc
\"
and @valid=
\"
yes
\"
]])"
$file
`
count
=
$((
count+c
))
count
=
$((
count+c
))
done
done
counts[
$i
]=
$((
count
+
counts[i]
))
counts[
$i
]=
$((
count
+
counts[i]
))
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
"&
$percent
\\\\
%% "
done
done
count
=
0
count
=
0
for
file
in
$xquery
# std
do
for
file
in
$xquery
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$fragment
\"
and @valid=
\"
yes
\"
]])"
$file
`
do
count
=
$((
count+c
))
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$std
\"
and @valid=
\"
yes
\"
]])"
$file
`
done
count
=
$((
count+c
))
counts[4]
=
$((
count
+
counts[i]
))
done
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
counts[4]
=
$((
count
+
counts[4]
))
printf
"&
$percent
\\\\
%% "
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
# Core 2.0
count
=
0
for
file
in
$xquery
do
c
=
`
xmlstarlet sel
-N
xqx
=
"http://www.w3.org/2005/XQueryX"
-t
-c
"count(//xpath[schemas/validation[@schema=
\"
$fragment
\"
and @valid=
\"
yes
\"
]])"
$file
`
count
=
$((
count+c
))
done
counts[5]
=
$((
count
+
counts[5]
))
percent
=
`
echo
"scale=1; 100*
$count
/
$n
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
'\\\\\n'
printf
'\\\\\n'
N
=
$((
N
+
n
))
N
=
$((
N
+
n
))
printf
'\\midrule\n'
printf
'\\midrule\n'
printf
'Total '
printf
'Total '
printf
"& %'.0f "
$N
printf
"& %'.0f "
$N
for
((
i
=
1
;
i <
5
;
++i
))
for
((
i
=
1
;
i <
6
;
++i
))
do
do
count
=
${
counts
[i]
}
count
=
${
counts
[i]
}
percent
=
`
echo
"scale=1; 100*
$count
/
$N
"
| bc
`
percent
=
`
echo
"scale=1; 100*
$count
/
$N
"
| bc
`
printf
"&
$percent
\\\\
%% "
printf
"&
$percent
\\\\
%% "
done
done
printf
'\\\\\n'
printf
'\\\\\n'
printf
'\\bottomrule\n'
printf
'\\bottomrule\n'
printf
'\\end{tabular}\n'
printf
'\\end{tabular}\n'
# \begin{tabular}{lrrrr}
# \toprule
# Source & \!\!queries & \!\!XPath\,1.0 & \!\!XPath\,2.0 & \!\!XPath\,3.0\\
# % \midrule
# % W3C QT & 207 & 132 & 138 & 207\\
# % XPathMark & 38 & 38 & 38 & 38\\
# \midrule
# DocBook & 7,620 & 7,620 & 7,620 & 7,620 \\
# HTMLBook & 752 & 752 & 752 & 752 \\
# eXist-db & 1,236 & 955 & 1,105 & 1,236 \\
# HisTEI & 483 & 361 & 471 & 483 \\
# MarkLogic & 196 & 139 & 184 & 191 \\
# XQJSON & 90 & 67 & 90 & 90 \\
# \midrule
# Total & 10,377 & 9,894 & 10,222 & 10,372\\
# & & (95\%) & (98\%) & (100\%)\\
# \bottomrule
# \end{tabular}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment