|Subject:||RE: [search-ws-comment] XML Schema design for search WS|
|From:||Ray Denenberg, Library of Congress (rd...@loc.gov)|
|Date:||Feb 24, 2012 9:13:50 am|
The OASIS WS TC thanks you for your comment of January 16 about schema design.
There is no single "right way" to design a schema and your suggestion that a
schema should define a single root element (or more generally, only as many root
elements as would be used for instances used by the application for which the
schema is developed) certainly represents one valid approach.
In our schemas we have chosen to define each element as global so that it can be
imported by another schema. The consequence of this design is that every
element can therefore be the root of a valid instance of its schema, and that
means valid instances can be created which make no sense for the searchRetrieve
application. So it is reasonable to question this design decision.
The reasoning behind this design is that there may be other applications (some
yet to be developed) that may want to import one or more our schemas for
reference to specific elements. And you could reasonably argue that even so,
there are some elements for which that would never happen. But we don't know for
sure which elements they are and it seems simpler and safer to globalize all
elements rather than arbitrarily (or best guest) select some but not others.
Still, we can see that this might cause confusion, and we can add a comment in
the next draft, something along the lines of "although all elements are defined
as global, only the following should be root elements for the searchRetrieve
Again, thanks for the comment.
-----Original Message----- From: Saašha Metsärantala [mailto:saa...@acc.umu.se] Sent: Monday, January 16, 2012 8:50 AM To: sear...@lists.oasis-open.org Subject: [search-ws-comment] XML Schema design for search WS
I have read parts of the XML Schemas available through http://www.loc.gov/standards/sru/oasis/ and reflected about their design. In this e-mail, I will focus on the number of possible root elements. As an introductory example, let us consider the following code snippet:
echo '<count xmlns="http://docs.oasis-open.org/ns/search- ws/facetedResults">3</count>' | xmllint --schema facetedResults.xsd -
<count xmlns="http://docs.oasis-open.org/ns/search- ws/facetedResults">3</count>
Similar results are possible with other elements or with other of these schemas. This result is consistent with the schema, but is it really what we want? Should such a short XML document with no more than one element be considered a valid document?
Maybe, we could choose another XML Schema design, appropriately limiting the number of root elements.
-- This publicly archived list offers a means to provide input to the OASIS Search Web Services TC.
In order to verify user consent to the Feedback License terms and to minimize spam in the list archive, subscription is required before posting.
Subscribe: sear...@lists.oasis-open.org Unsubscribe: sear...@lists.oasis-open.org List help: sear...@lists.oasis-open.org List archive: http://lists.oasis-open.org/archives/search-ws-comment/ Feedback License: http://www.oasis-open.org/who/ipr/feedback_license.pdf List Guidelines: http://www.oasis-open.org/maillists/guidelines.php Committee: http://www.oasis-open.org/committees/tc_home.php?wg_abbrev=search-ws Join OASIS: http://www.oasis-open.org/join/