Generate Source-Specific Calls
After generating an XML version of a source-specific query for each source to be meta-searched, Watson™ Explorer Engine next needs to turn those calls into a form that the source can actually understand. For the majority of sources accessible via HTML, the required format is a URL with a set of CGI parameters. All sources based on the Watson Explorer Engine search collections are like this, along with many other Web-based sources. The information to make this translation is available in the source form, in particular the action attribute of the form element provides the base URL and the name attributes of the input and select elements in the form provide CGI parameter names. So, the instantiated form:
<submit num="50" status="translated"> <form action="http://source2-domain.com" normalized="normalized" status="trans-failed"> <input name="q2" field="query" logic="and" delimiters=" " position="0"> <operator middle-string="AND" logic="and"/> </input> </form> <form action="http://source2-domain" normalized="normalized" status="trans-succeeded"> <input name="qry" field="query" logic="and" delimiters=" " position="0" value="big OR large intitle:travel"> <operator middle-string="AND" logic="and"/> <operator middle-string="OR" logic="or"/> <operator field="title" name="intitle" start-string="intitle:"/> </input> <input field="per"/> </form> </submit>
would be translated into
<scope max="50" orig-tag="submit"> <parse URL="http://source2-domain.com?qry=big_OR_large_intitle%3atravel" per="50" page="0" start="0" parser="#vxml#" ref="1"/> </scope>
where the scope elements show the URL used to call each source. Note that this URL is an attribute of a parse element, which indicates that what the URL returns is to be Parse Source Results.
Some sources cannot be called via a URL with CGI parameters. For instance, a source might be accessible via HTTP, but require a SOAP call, or a source might be a database which requires SQL. In such cases, an additional transformation of the XML version of the source-specific query is required. This is performed using a secondary parser for the source (the primary parser is used to parse the results the source returns). The parser is typically custom XSL that transforms the instantiated form element into whatever format is required and is identified by a transform attribute of the source form.
The next step in processing is Parse Source Results.