W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2007

RE: Regarding XML schema validation (XSD)

From: Michael Kay <mike@saxonica.com>
Date: Wed, 3 Jan 2007 11:34:38 -0000
To: "'merryla martina'" <merryla@gmail.com>
Cc: <xmlschema-dev@w3.org>
Message-ID: <00b701c72f2b$27009fc0$6401a8c0@turtle>
Please don't go off-list. Other people will find your post in the list
archives and will expect to find the answer as well as the question.
I get a "not available" response for the two URLs
http://www.xyz.com/acord/txlife2-9-00.xsd and
http://www.xyz.com/acord/xmlife2-9-00.xsd  so I can't comment on whether
these schemas are valid or not. However, the fact that you got a specific
error message from a reputable schema processor suggests that the schemas
are probably invalid. Unfortunately it's quite common to find published
schemas that are invalid, because some of the most popular tools that are
commonly used to develop schemas are notoriously lax in their checking. This
looks like a case where the problems were fixed in a later version of the
schema. You need to check with Acord.
Michael Kay


From: merryla martina [mailto:merryla@gmail.com] 
Sent: 03 January 2007 11:04
To: Michael Kay
Subject: Re: Regarding XML schema validation (XSD)

Hi Michael Kay,

Thanks a lot. The validation works fine for
1.zip> Life Specifications and Documentation Final 2.15.0 .


But the thing is that, I need to perform validation directly from the site

I tried both the way for validation. First by downloading the related file
from the site  <http://www.xyz.com/acord/xmlife2-9-00.xsd>
http://www.xyz.com/acord/xmlife2-9-00.xsd  and then, by directly connecting
to the site to perform validation.

Both the way, throws the same error message.



The error description looks like this

Validating C:\Schema\sample10.xml

http://www.xyz .com/acord/xmlife2-9-00.xsd#/schema [1]/complexType[position

() = 293 and @name = 'OLI_LU_VARIANT']/complexContent [1]/extension [1]

Derived type and the base type must have the same content type.

Base type: '{http://www.w3.org/2001/XMLSchema } anyType'

Derived type: '{http://ACORD.org/Standards/Life/2
<http://ACORD.org/Standards/Life/2> } OLI_LU_VARIANT'

Unspecified error. Validate failed because the root element had no
associated DTD/ 



Please help me to find solution.

Merryla Martina
On 1/2/07, Michael Kay <mike@saxonica.com> wrote: 

I'm not sure what you mean by "the Sample txlife.xsd file".
At http://acord.org/standards/life_downloads.aspx
<http://acord.org/standards/life_downloads.aspx>  you can download "
1.zip>  Life Specifications and Documentation Final 2.15.01" which contains
a set of four schema documents including one named TXLife2.15.01.xsd. The
definition of ACORD_TYPE_CODE is at line 216 of XLifeBase2.15.01.xsd , which
is reached via a chain of includes. Starting at TXLife2.15.01.xsd, the
schemas validate OK in Saxon.
Note that   <http://acord.org/Standards/Life/2>
http://ACORD.org/Standards/Life/2  is a namespace URI. In general you
shouldn't expect to find any resource when you try to dereference a
namespace URI - it's just a distinguishing character string, not the
location of any document. 
Michael Kay


From: xmlschema-dev-request@w3.org [mailto:
<mailto:xmlschema-dev-request@w3.org> xmlschema-dev-request@w3.org] On
Behalf Of merryla martina
Sent: 02 January 2007 05:28
To: xmlschema-dev@w3.org
Subject: Regarding XML schema validation (XSD)




I tried to perform schema validation. The code works well. But when I tried
with the Sample txlife.xsd file from http://acord.org/ I got error in
associating the namespace with the xsd i.e. in the add () method. The add ()
method returned E_FALSE.


When I referred the MSDN library, it states that 


"E_FAIL is returned if: 


.          The collection is read-only 

.          The document is not a recognized schema 

.          An error occurs when compiling the schema 

.          The ready state of the document is not 4. " 


After referring MSDN library, I tried to catch the error description.


The error descriptions look like this 

Undeclared XSD type: '{  <http://acord.org/Standards/Life/2>
http://ACORD.org/Standards/Life/2} ACORD_TYPE_CODE'.


So I referred the txlife.xsd schema, I found that ACORD_TYPE_CODE was
referred but not defined. After that I tried to view the site
http://ACORD.org/Standards/Life/2 for the definition of 

ACORD_TYPE_CODE.I found "page not found " error.


Here I can't understand why this error description, which is highted above,
comes, as this xsd file is a standard one. 


The sample txlife.xsd file starts like this


<xsd: schema targetNamespace="  <http://acord.org/Standards/Life/2>
http://ACORD.org/Standards/Life/2" xmlns="http://ACORD.org/Standards/Life/2"
xmlns:xsd=" http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> " elementFormDefault="unqualified"
attributeFormDefault="unqualified" version=" 2.9.00"> 


Received on Wednesday, 3 January 2007 11:34:51 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:39 UTC