Commit 181aae76 authored by Anthony LICK's avatar Anthony LICK

Merge branch 'master' of https://git.lsv.fr/schmitz/xpparser

parents 6f01fdc0 16a3fa9e
......@@ -21,7 +21,10 @@ default namespace = "http://www.w3.org/2005/XQueryX"
namespace xqx = "http://www.w3.org/2005/XQueryX"
# To catch equality between position() and last()
last.op = element ( eqOp | equalOp | neOp | notEqualOp ) {
last.op = element ( eqOp | equalOp | neOp | notEqualOp
| ltOp | leOp | gtOp | geOp
| lessThanOp | lessThanOrEqualOp
| greaterThanOp | greaterThanOrEqualOp ) {
element firstOperand { last.fun },
element secondOperand { last.fun }
}
......@@ -35,6 +38,10 @@ last.fun = element functionCallExpr {
},
element arguments { empty }?
}
| element ( addOp | subtractOp ) {
element firstOperand { last.fun },
element secondOperand { last.fun }
}
# Allowed axes before a [last()] predicate.
# Should be modified to a safe value when including this file.
......
......@@ -9,14 +9,19 @@ site/matrix.json: ../../xslt/matrix.xsl build.xml index.html numqueries xpp.css
ant
chord.inner.svg: site/matrix.json phantom.js chord.css
phantomjs phantom.js "file://$(PWD)/site/index.html" > chord.inner.svg
phantomjs phantom.js "file://$(PWD)/site/index.html" chord.inner.svg
chord.svg: chord.inner.svg chord.css
echo '<?xml version="1.0" standalone="no"?>' > $@
echo '<svg id="chord" width="650" height="650"><defs><style type="text/css"><![CDATA[' >> $@
cat chord.css >> $@
echo ']]></style></defs>' >> $@
sed -e 's/<svg[^>]*>//g' chord.inner.svg >> $@
# Remove opening <svg>
# + remove buggy NS[1..6] namespaces that show up on some systems...
sed -e 's/<svg[^>]*>//' -e 's/NS.:/xlink:/g' chord.inner.svg >> $@
chord.pdf: chord.svg
inkscape $< --export-pdf=$@
clean:
rm -f chord.inner.svg chord.svg chord.pdf
......@@ -2,6 +2,7 @@
// example usage: phantomjs phantom.js 'http://www.lsv.fr/~schmitz/xpparser/xpathmark/' > chord.svg
"use strict";
var system = require('system');
var fs = require('fs');
var args = system.args;
var page = require('webpage').create();
......@@ -17,7 +18,7 @@ page.open(args[1], function (status) {
var markup = page.evaluate(function(){
return document.getElementById('links').innerHTML;
});
console.log(markup);
fs.write(args[2],markup,'w');
phantom.exit();
}, 400)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment