Update of /cvsroot/monetdb/pathfinder/runtime/xrpc/demo
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv6365
Modified Files:
Tag: xrpcdemo
demo-mod.xq index.html
Added Files:
Tag: xrpcdemo
noquery.gif
Removed Files:
Tag: xrpcdemo
test.gif tree.gif
Log Message:
Clean up the GUI, remove temporary fake query graph figures
--- test.gif DELETED ---
--- NEW FILE: noquery.gif ---
(This appears to be a binary file; contents omitted.)
U index.html
Index: index.html
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc/demo/Attic/index.html,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -d -r1.1.2.6 -r1.1.2.7
--- index.html 10 Jun 2008 04:55:47 -0000 1.1.2.6
+++ index.html 10 Jun 2008 21:22:11 -0000 1.1.2.7
@@ -67,25 +67,37 @@
}
var funcdefs = new Array();
- funcdefs[funcdefs.length]=new funcdef("add", false, new Array("integer",
"integer"), new Array("", ""), "declare function f:add($v1 as xs:integer, $v2
as xs:integer) as xs:integer\n{ $v1 + $v2 };");
- funcdefs[funcdefs.length]=new funcdef("addSeq", false, new Array("integer",
"integer"), new Array("+", "+"), "declare function f:addSeq($v1 as xs:integer+,
$v2 as xs:integer+) as xs:integer\n{ for $vi in $v1, $vj in $v2 return $vi +
$vj };");
- funcdefs[funcdefs.length]=new funcdef("firstPerson", false, new
Array("string"), new Array(""), "declare function f:firstPerson($doc as
xs:string) as node()\n{ exactly-one(doc($doc)//person[1]) };");
- funcdefs[funcdefs.length]=new funcdef("firstPerson", false, new
Array("string", "string"), new Array("+", "+"), "declare function
f:firstPerson($docs as xs:string+, $dsts as xs:string+) as node()+\n{ for $d at
$pos in $dsts\n return execute at {$d}
{f:firstPerson(exactly-one($docs[$pos]))}\n};");
- funcdefs[funcdefs.length]=new funcdef("boughtItems", false, new
Array("string", "string"), new Array("", ""), "declare function
f:boughtItems($pid as xs:string, $doc as xs:string) as node()*\n{
doc($doc)//closed_auction[./buyer/@person=$pid] };");
- funcdefs[funcdefs.length]=new funcdef("boughtItemsSeq", false, new
Array("string", "string"), new Array("+", ""), "declare function
f:boughtItemsSeq($pid as xs:string+, $doc as xs:string) as node()*\n{ for $p in
$pid\n return\n doc($doc)//closed_auction[./buyer/@person=$p]\n};");
- funcdefs[funcdefs.length]=new funcdef("boughtItemsAllPersons", false, new
Array("string", "string", "string"), new Array("", "", ""), "declare function
f:boughtItemsAllPersons($docL as xs:string, $docR as xs:string, $dst as
xs:string) as node()*\n{ for $p in $pid\n return\n for $ca in
doc($doc)//closed_auction[./buyer/@person=$p]\n return\nelement
closed_auction {attribute buyer {$ca/buyer/@person}, $ca/price, $ca/date}\n};");
- funcdefs[funcdefs.length]=new funcdef("insertPerson", true, new
Array("node()", "string"), new Array("", ""), "declare updating function
f:insertPerson($p as node(), $doc as xs:string)\n{ do insert $p into
doc($doc)//persons };");
- funcdefs[funcdefs.length]=new funcdef("deletePerson", true, new
Array("string", "string"), new Array("", ""), "declare updating function
f:deletePerson($pid as xs:string, $doc as xs:string)\n{ do delete
doc($doc)//person[./@pid=$pid] };");
+ funcdefs[funcdefs.length]=new funcdef("add", false, new Array("integer",
"integer"), new Array("", ""),
+ "declare function f:add($v1 as xs:integer, $v2 as xs:integer) as
xs:integer\n{ $v1 + $v2 };");
+ funcdefs[funcdefs.length]=new funcdef("addSeq", false, new Array("integer",
"integer"), new Array("+", "+"),
+ "declare function f:addSeq($v1 as xs:integer+, $v2 as xs:integer+) as
xs:integer\n{ for $vi in $v1, $vj in $v2 return $vi + $vj };");
+ funcdefs[funcdefs.length]=new funcdef("firstPerson", false, new
Array("string"), new Array(""),
+ "declare function f:firstPerson($doc as xs:string) as node()\n{
exactly-one(doc($doc)//person[1]) };");
+ funcdefs[funcdefs.length]=new funcdef("firstPerson", false, new
Array("string", "string"), new Array("+", "+"),
+ "declare function f:firstPerson($docs as xs:string+, $dsts as
xs:string+) as node()+\n{ for $d at $pos in $dsts\n return execute at {$d}
{f:firstPerson(exactly-one($docs[$pos]))}\n};");
+ funcdefs[funcdefs.length]=new funcdef("boughtItems", false, new
Array("string", "string"), new Array("", ""),
+ "declare function f:boughtItems($pid as xs:string, $doc as xs:string) as
node()*\n{ doc($doc)//closed_auction[./buyer/@person=$pid] };");
+ funcdefs[funcdefs.length]=new funcdef("boughtItemsSeq", false, new
Array("string", "string"), new Array("+", ""),
+ "declare function f:boughtItemsSeq($pid as xs:string+, $doc as
xs:string) as node()*\n{ for $p in $pid\n return\n
doc($doc)//closed_auction[./buyer/@person=$p]\n};");
+ funcdefs[funcdefs.length]=new funcdef("boughtItemsAllPersons", false, new
Array("string", "string", "string"), new Array("", "", ""),
+ "declare function f:boughtItemsAllPersons($docL as xs:string, $docR as
xs:string, $dst as xs:string) as node()*\n{ for $p in $pid\n return\n for
$ca in doc($doc)//closed_auction[./buyer/@person=$p]\n return\nelement
closed_auction {attribute buyer {$ca/buyer/@person}, $ca/price, $ca/date}\n};");
+ funcdefs[funcdefs.length]=new funcdef("insertPerson", true, new
Array("node()", "string"), new Array("", ""),
+ "declare updating function f:insertPerson($p as node(), $doc as
xs:string)\n{ do insert $p into doc($doc)//persons };");
+ funcdefs[funcdefs.length]=new funcdef("deletePerson", true, new
Array("string", "string"), new Array("", ""),
+ "declare updating function f:deletePerson($pid as xs:string, $doc as
xs:string)\n{ do delete doc($doc)//person[./@pid=$pid] };");
funcdefs[funcdefs.length]=new funcdef("custom...", false, new
Array("integer", "integer", "integer", "integer"), new Array("", "", "", ""),
"");
var par_types = new Array("integer", "string", "node()");
var par_types_display = new Array("xs:integer", "xs:string", "node()");
var quant_types = new Array("", "?", "+", "*");
- var example_nodes = new Array("<person>Schaap<\/person>", "John Denver",
"Elvis Presley", "Shania Twain");
+ var example_nodes = new Array("<person id=\"newperson1\">Schaap<\/person>",
+ "<person id=\"newperson2\">John Denver</person>",
+ "<person id=\"newperson3\">Elvis Presley</person>",
+ "<person id=\"newperson4\">Shania Twain</person>");
function fillPostUrlBox() {
var obj = document.getElementById("postUrl");
- obj.value = "http://" + window.location.hostname + ":" +
window.location.port + "/xrpc";
+ obj.value = "http://" + window.location.hostname + ":" +
window.location.port + "/xrpc";
}
function fillLocationBox() {
@@ -256,9 +268,9 @@
}
if (funcdefs[idx].getArr(i) == "string") {
if (funcdefs[idx].getQArr(i) == "")
- default_val = "xmark.xml";
//String.fromCharCode(65 + i);
+ default_val = "xmark.xml";
else
- default_val = "(" + String.fromCharCode(65 +
i*3) + ", " + String.fromCharCode(66 + i*3) + ", " + String.fromCharCode(67 +
i*3) + ")";
+ default_val = "(xmark.xml, xmark.xml,
xmark,xml)";
}
if (funcdefs[idx].getArr(i) == "node()") {
if (funcdefs[idx].getQArr(i) == "")
@@ -376,7 +388,7 @@
var obj = document.getElementById("resvis");
obj.innerHTML = "changed";
- var qid = 'UNKNOWN';
+ var qid = 'None';
try {qid =
xmldoc.getElementsByTagName("Identifier")[0].firstChild.nodeValue;} catch(err)
{}
var resnode = xmldoc.getElementsByTagName("response")[0];
var funcn = resnode.getAttribute("xrpc:method");
@@ -507,11 +519,6 @@
<td><input type="button" value="Submit"
onclick="sendRequest(this.form)" /></td>
</tr>
</table>
- <!--<table id="answers">
- <tr class="myheader">
- <td>ANSWER<br /><textarea cols="65" rows="7" name="answer"
id="answer" readonly="readonly"></textarea></td>
- </tr>
- </table>-->
</td>
<td>
<div id="graph">
@@ -529,7 +536,8 @@
</map>
<table id="graphtable">
<tr>
- <td><img id="treeimg" src="test.gif" usemap="#treemap"
border="0" alt="messageflow" /></td>
+ <td>Query Flow:<br/><br/>
+ <img id="treeimg" src="noquery.gif" usemap="#treemap" border="0"
alt="messageflow"/></td>
</tr>
</table>
</div>
@@ -548,7 +556,7 @@
<textarea cols="48" rows="15"
name="messreq" id="messreq" readonly="readonly"></textarea>
</div>
<div id="reqvis">
- visual display
+ No message
</div>
</td>
</tr>
@@ -565,7 +573,7 @@
<textarea cols="48" rows="15"
name="messres" id="messres" readonly="readonly"></textarea>
</div>
<div id="resvis">
- visual display
+ No message
</div>
</td>
</tr>
--- tree.gif DELETED ---
U demo-mod.xq
Index: demo-mod.xq
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/xrpc/demo/Attic/demo-mod.xq,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- demo-mod.xq 7 Jun 2008 22:13:21 -0000 1.1.2.3
+++ demo-mod.xq 10 Jun 2008 21:22:11 -0000 1.1.2.4
@@ -31,6 +31,9 @@
return execute at {$dst} {f:boughtItems($pid, $docR)}
};
+declare function f:getdoc($url as xs:string) as document-node()?
+{ doc($url) };
+
declare updating function f:insertPerson($p as node(), $doc as xs:string)
{ do insert $p into doc($doc)//persons };
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins