> Robert Sanderson wrote:
> > .... If the query isn't to be encoded in XML (which
> > I assume that it won't) then at least make it typable. If it's not
> > typable, why not make it XML which is easier to parse?
> Rob -- Just want to be sure I understand what you're suggesting. By "make it
> XML" do you mean come up with an XML schema for cql, or do you mean move to an
> existing xml-based query syntax, though I don't know what that would be -- W3C
> XQUERY?
Yes. Either. Or something different again. But, in SOAP terms, something
that can be dumped into an object/array parameter rather than a
single string typed parameter.
For example
Currently:
<srw:query xsi:type="xsd:string">bib1.title="fish and chips" and
bib1.author="Smith, Jerry"</srw:query>
Possible encoding:
<srw:query><param><set>bib1</set><index>title</index><oper>=</oper><field>fish
and chips</field></param>
<bool>and</bool>
<param><set>bib1</set><index>author</index><oper>=</oper><field>Smith,
Jerry</field></param>
</srw:query>
(leaving out all the type information and namespaces for brevity)
Then you're explicit about what each section of data is _in the encoding_
not just leaving it up to the server to implement the string based CQL.
Then you could also do interesting things like setting the type of the
field to other than string. For example:
<field xsi:type="xsd:int">42</field> makes it expicit that this is the
integer 42 and not a 2 character string of "4" and "2"
Which would make it easier for things like parsing different operators
like > and < ... "0x42" could be sorted differently to 0x42.
There's also a standard datestamp type, which would make date parsing
trivial and so forth.
All SOAP toolkits will have this sort of deserialiser. And if there's no
information given to the client as to what it should be, it can always
just make it a string :)
Rob
--
,'/:. Rob Sanderson ([log in to unmask])
,'-/::::. http://www.o-r-g.org/~azaroth/
,'--/::(@)::. Special Collections and Archives, extension 3142
,'---/::::::::::. Twin Cathedrals: telnet: liverpool.o-r-g.org 7777
____/:::::::::::::. WWW: http://liverpool.o-r-g.org:8000/
I L L U M I N A T I
|