-
Notifications
You must be signed in to change notification settings - Fork 12
MWSAnswerSet
Tom Wiesing edited this page Jan 17, 2019
·
1 revision
Mws Answer Set is the response format of the MathWebSearch daemon. It is a simple XML extension which introduces a few tags and attribute.
The introduced tags are answset, answ, subst and substpair, all defined in the mws namespace. The root element is mws:answset and it has the following attributes:
-
size- number of solutions in the returned response (INT) -
total- the total number of solutions found in the database (INT)
This can have two types of child nodes: mws:answ and mws:subst nodes.
The first level children are mws:answ nodes, which represent single answers which have matched the Mws Query. The data is encoded in its attributes:
-
uri- the URL+UUID of the m:math containing the solution. -
xpath- the XPath of the solution withing them:mathnode.
The mws:answ nodes contain mws:substpair nodes which encode the substitution details for each named qvar.
The mws:substpair have the following attributes:
-
qvar- the name of the substituted qvar. -
xpath- the XPath of theqvarwithin them:mathnode.
Here is an example Mws Answer Set:
<?xml version="1.0"?>
<mws:answset xmlns:mws="http://www.mathweb.org/mws/ns" size="3" total="50">
<mws:answ
uri="http://arxivdemo.mathweb.org/article/435/0704.0464/article/435/0704.0464#id2388921"
xpath="1/3" >
<mws:substpair qvar="op" xpath="1/3/1"/>
<mws:substpair qvar="x" xpath="1/3/2"/>
<mws:substpair qvar="y" xpath="1/3/4"/>
<mws:substpair qvar="z" xpath="1/3/5"/>
</mws:answ>
<mws:answ
uri="http://arxivdemo.mathweb.org/article/429/0704.2438/article/429/0704.2438#id2690439"
xpath="1/2/3/2/3">
<mws:substpair qvar="op" xpath="1/2/3/2/3/1"/>
<mws:substpair qvar="x" xpath="1/2/3/2/3/2"/>
<mws:substpair qvar="y" xpath="1/2/3/2/3/4"/>
<mws:substpair qvar="z" xpath="1/2/3/2/3/5"/>
</mws:answ>
<mws:answ
uri="http://arxivdemo.mathweb.org/article/429/0704.2438/article/429/0704.2438#id2696261"
xpath="1/3/3/4/2/3" >
<mws:substpair qvar="op" xpath="1/3/3/4/2/3/1"/>
<mws:substpair qvar="x" xpath="1/3/3/4/2/3/2"/>
<mws:substpair qvar="y" xpath="1/3/3/4/2/3/4"/>
<mws:substpair qvar="z" xpath="1/3/3/4/2/3/5"/>
</mws:answ>
</mws:answset>