atom feed4 messages in org.oasis-open.lists.search-ws-commentRE: [search-ws-comment] XML Schema de...
FromSent OnAttachments
Saašha MetsärantalaJan 16, 2012 5:49 am 
Ray Denenberg, Library of CongressFeb 24, 2012 9:13 am 
Saašha MetsärantalaFeb 24, 2012 1:16 pm 
Ray Denenberg, Library of CongressMar 30, 2012 11:47 am 
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
List:org.oasis-open.lists.search-ws-comment

Hi Saašha,

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
application".

Again, thanks for the comment.

--Ray

-----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

Hello!

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 -

which answers:

<?xml version="1.0"?>

<count xmlns="http://docs.oasis-open.org/ns/search- ws/facetedResults">3</count>

- validates

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.

Regards!

Saašha,

-- 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/