LISTSERV mailing list manager LISTSERV 16.0

Help for ZNG Archives


ZNG Archives

ZNG Archives


[email protected]


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

ZNG Home

ZNG Home

ZNG  July 2004

ZNG July 2004

Subject:

Schema issues

From:

Robert Sanderson <[log in to unmask]>

Reply-To:

Z39.50 Next-Generation Initiative

Date:

Tue, 13 Jul 2004 00:01:11 +0100

Content-Type:

TEXT/PLAIN

Parts/Attachments:

Parts/Attachments

TEXT/PLAIN (92 lines)

Futher to my comment about not being ready for standardisation, see below
message forwarded from Tom Habing at UIUC.

(Summary:  MSXML says our schema is fubar, and another validator does the
wrong thing)

Matthew, any comments?

Rob

---------- Forwarded message ----------
Date: Mon, 12 Jul 2004 11:18:42 -0500
From: Thomas G. Habing <[log in to unmask]>
To: Robert Sanderson <[log in to unmask]>
Subject: Re: OAI-PMH registry and ZeeRex

Hi Rob,

Sorry its taken me so long to get around to this.  However, in looking at this
fix I seem to have discovered a potential problem with SRW XML Schema:

http://www.loc.gov/z3950/agency/zing/srw/srw-types.xsd

Being a good XMLer :-) I always try to validate my files against the relevant
schemas.  My tools of choice are usually the Microsoft XML toolkit (MSXML 4.0)
and the XSV validator from http://www.ltg.ed.ac.uk/~ht/xsv-status.html.

The MS toolkit complains that the XML Schema is not valid, and XSV does not
give the expected result.

The XML Schema fragments relevant to your explainResponse are these:

   <xsd:complexType name="responseType">
     <xsd:all>
       <xsd:element ref="version"/>
       <xsd:element ref="diagnostics" minOccurs="0"/>
       <xsd:element ref="extraResponseData" minOccurs="0"/>
     </xsd:all>
   </xsd:complexType>

   <xsd:complexType name="explainResponseType">
     <xsd:complexContent>
       <xsd:extension base="responseType">
         <xsd:all>
           <xsd:element ref="record"/>
           <xsd:element ref="echoedExplainRequest" minOccurs="0"/>
         </xsd:all>
       </xsd:extension>
     </xsd:complexContent>
   </xsd:complexType>

Assuming that these are valid (see the following), to me this indicates that an
<explainResponse> must contain at least a <version> and a <record>, along with
some optional stuff including <diagnostics>.  Therefore, I was surprised when
the XSV validator didn't complain about your original suggested correction
above, because it didn't contain either a version or record element.  Then I
tried validating it using the MS XML toolkit which complained that the XML
Schema itself was not valid.  When I looked up the error message returned by MS
XML, I got this web page
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q316635 which
essentially explains that using <xsd:all> inside of an <xsd:extension> is not
legal.

Presumably, the developers of this schema have done some testing with various
validators, so I would be willing to accept that Microsoft's interpretation of
the schema spec is wrong, but it is also curious that the XSV validator, while
it doesn't complain of an error is unable to correctly validate against the
schema.

My suggestions would be to avoid using extensions of all groups, such that the
explain response becomes:


   <xsd:complexType name="explainResponseType">
     <xsd:all>
       <xsd:element ref="version"/>
       <xsd:element ref="diagnostics" minOccurs="0"/>
       <xsd:element ref="extraResponseData" minOccurs="0"/>
       <xsd:element ref="record" minOccurs="0"/>
       <xsd:element ref="echoedExplainRequest" minOccurs="0"/>
     </xsd:all>
   </xsd:complexType>

Assuming that the record really should be an optional element.  The other "all
extensions" could be modified similarly.

In any case, I've made your suggested correction, ignoring the fact that I
can't get it to validate with the current schema.

Kind regards,
        Tom

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

July 2017
October 2016
July 2016
August 2014
February 2014
December 2013
November 2013
October 2013
February 2013
January 2013
October 2012
August 2012
April 2012
January 2012
October 2011
May 2011
April 2011
November 2010
October 2010
September 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
October 2009
September 2009
August 2009
July 2009
May 2009
April 2009
March 2009
February 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001

ATOM RSS1 RSS2



LISTSERV.LOC.GOV

CataList Email List Search Powered by the LISTSERV Email List Manager