Math Web Queries

The MathWebSearch System (MWS) can be queried using simple extensions of the base format (currently OpenMath and MathML) languages. At the moment we offer two search modes: XML Query and String. Please read forward for the description of these search modes.

XML Query (XMLQ)

This is the most powerful search mode. Any search that is possible with other search modes is possible with XMLQ. XMLQ is not a specific query language. It instead uses an extension to already existing XML formats. For the purpose of this application, these XML formats are OpenMath and MathML.

The extension mechanism is represented by 4 tags and 4 attributes, all defined in the namespace URI http://mathweb.org/MathQuery. We will refer to this namespace with the namespace prefix mq.

The extension tags are mq:query, mq:and, mq:or, mq:not. The mq:query tag is used if one or more of the other extension tags are to be used. The query tag encloses the whole search expression. The tags mq:and, mq:or, mq:not may contain other mq:and, mq:or, mq:not tags. All extension tags may contain tags from the base XML format. Note that tags from the base XML format cannot contain extension tags. However, they may contain extension attributes (will be explained later). The mq:and, mq:or, mq:not tags are logical operators. mq:and and mq:or should contain two or more children. mq:not must contain exactly two children. Note that no error is reported if such a tag contains a single child; its logical value is then simply ignored. The logical operators support one attribute in the same namespace URI: mq:target. The default value of this attribute is term. The other accepted value is document. This attribute defines the scope of the logical operator. If the scope is term, then documents with terms containing the queries as subterms are searched for. If the scope is document, documents containing terms matched by some queries are searched for.

There are 3 other attributes that may be used for any of the base format tags. These attributes are mq:generic, mq:anyorder, mq:anycount.

The mq:generic attribute is used to define a term that matches anything. Once something is matched against a generic term (generic terms are generated by tags with the mq:generic attribute), the same matched expression is expected at other positions where the same value was specified for the mq:generic attribute. The mq:anyorder is used to specify that the order of the children is not important. The mq:anycount attribute defines any number of occurrences of a certain base tag (if that base tag is known to be allowed multiple times). This is particularly useful to define a variable number of bound variables for example.

String

This is the faster to type search method, but as powerful as XMLQ. Logical operators cannot be specified in this format, with two exceptions: || ('or') and && ('and') can be used to separate more expressions. Generic terms are specified using @string. Currently only prefix notation (used internally) and ASCII expressions can be interpreted by this search method. Note that if LaTeXML is not available on the search server, ASCII expressions are not properly interpreted. To mark a term as generic, put a @ in front of the name (@x is a generic term). To force the system to assume prefix notation for a search string if LaTeXML is available, prepend a # to the query. We will soon add support for LaTeX strings as well.

© 2006 Copyrights KWARC. | XHTML 1.0 | CSS | Page generated from XML sources with the WSML package