[tdwg-tapir] {Definitely Spam?} Modification in the Inventory response
Javier de la Torre
jatorre at gmail.com
Tue Oct 25 12:41:06 CEST 2005
Dear all,
Samy Gaiji, from IPGRI, sent us yesterday an email with comments
about TAPIR. He consider the response format of the inventory
operation inconvenient. For those not remembering an inventory
operation looks like this:
Request:
------------
<?xml version='1.0' encoding='UTF-8'?>
<request>
<header />
<inventory count='true' start='0' limit='50'
xmlns:dwc='http://digir.net/schema/conceptual/darwin/2003/1.0'>
<concepts>
<concept path='dwc:/Country' />
<concept path='dwc:/Genus' />
</concepts>
</inventory>
</request>
----
Response
-------------
<?xml version="1.0" encoding="UTF-8"?>
<response>
<header></header>
<inventory>
<record>
<value>AUSTRALIA</value>
<value>Calicium</Genus>
</record>
<summary start="0" totalReturned="50" totalMatched="73"
next="50" />
</inventory>
</response>
--------------
He find hards to parse after that all concepts are named 'value' and
having to trust on that the elements are returned in the same order
as they were request. I don't know, for me this does not look like a
big issue, but in any case here is a proposal that makes possible to
assign names to the elements that are responded.
Request:
-----------------------------------
<?xml version='1.0' encoding='UTF-8'?>
<request>
<header />
<inventory count='true' start='0' limit='50'
xmlns:dwc='http://digir.net/schema/conceptual/darwin/2003/1.0'>
<concepts>
<concept path='dwc:/Country' elementName='Country' />
<concept path='dwc:/Genus' elementName='Genus' />
</concepts>
</inventory>
</request>
-------------------------------
Response:
-------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<response>
<header></header>
<inventory>
<record>
<Country>AUSTRALIA</Country>
<Genus>Calicium</Genus>
</record>
<summary start="0" totalReturned="50" totalMatched="73"
next="50" />
</inventory>
</response>
------------------------
You can find attached a modification of the latest protocol schema
that includes this.
What are your thoughts on this?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tapir_modified.xsd
Type: application/octet-stream
Size: 52996 bytes
Desc: not available
Url : http://lists.tdwg.org/pipermail/tdwg-tag/attachments/20051025/e5445821/attachment.obj
-------------- next part --------------
Best regards,
Javier.
More information about the tdwg-tag
mailing list