OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

search-ws message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [search-ws-comment] XML Schema design for search WS


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:saasha@acc.umu.se]
> Sent: Monday, January 16, 2012 8:50 AM
> To: search-ws-comment@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,
>



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]