Trouble validating data

G

Group IIS

Hi all,

I am using ALTOVA XMLSpy.

The start of my XML file looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<Submission xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="layout.xsd">

When I go to validate my XML file it give me error "This file is not
valid. The declaration or definition "char30Type" is not defined in
the schema with targetNamespace."

The layout.xsd included 22 related schemas. The first schema
referenced in layout.xsd is simple.xsd it has this reference in it.
<xsd:simpleType name="char30Type">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="30"/>

I have assigned the full pathnames in the my xml and layout.xsd but I
still get the same error.

Does anyone have any idea as to why I am getting this message and what
I can do to correct it.

Thanks
 
P

Priscilla Walmsley

It's hard to tell what the error is without seeing the schemas.

What do the beginnings of layout.xsd and simple.xsd look like? Does
layout.xsd use xsd:include to include simple.xsd? What does the type in
layout.xsd (or elsewhere) that references char30Type look like?

Priscilla
 
G

Group IIS

Priscilla Walmsley said:
It's hard to tell what the error is without seeing the schemas.

What do the beginnings of layout.xsd and simple.xsd look like? Does
layout.xsd use xsd:include to include simple.xsd? What does the type in
layout.xsd (or elsewhere) that references char30Type look like?

Priscilla

The beginning of Layout.xml looks like this:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- @@@@@@ Include Related Schemas @@@@@@ Version# 2.0 -->
<xsd:include schemaLocation="simple.xsd"/>
<xsd:include schemaLocation="complex.xsd"/>
<xsd:include schemaLocation="t4.xsd"/>
<xsd:include schemaLocation="t4a.xsd"/>

The beginning of Simple.xml looks like this:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- @@@@@ Definition of SimpleTypes @@@@@@@@ Version# 2.0 -->

Char30Type is Definined with in this

<xsd:simpleType name="char30Type">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>

Here is the full schemas:
http://www.cra-arc.gc.ca/eservices/magmedia/schema-e.html

Thanks.
 
G

Group IIS

The beginning of Layout.xml looks like this:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- @@@@@@ Include Related Schemas @@@@@@ Version# 2.0 -->
<xsd:include schemaLocation="simple.xsd"/>
<xsd:include schemaLocation="complex.xsd"/>
<xsd:include schemaLocation="t4.xsd"/>
<xsd:include schemaLocation="t4a.xsd"/>

The beginning of Simple.xml looks like this:

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!-- @@@@@ Definition of SimpleTypes @@@@@@@@ Version# 2.0 -->

Char30Type is Definined with in this

<xsd:simpleType name="char30Type">
<xsd:restriction base="xsd:string">
<xsd:minLength value="1"/>
<xsd:maxLength value="30"/>
</xsd:restriction>
</xsd:simpleType>

Here is the full schemas:
http://www.cra-arc.gc.ca/eservices/magmedia/schema-e.html

Thanks.


I should mention that I only validating the T5 data so the only schema
i need is the T5.xsd. I tried to change the layout.xsd but only
having simple.xsd and T5.xsd and it changes the error to
decimal11Type.
 
L

Lady Chatterly

I should mention that I only validating the T5 data so the only schema
i need is the T5.xsd. I tried to change the layout.xsd but only
having simple.xsd and T5.xsd and it changes the error to
decimal11Type.

The Arab Jews are not directly involved but political situations are
dependant on Western stability, which collapses in 2005.

--
Lady Chatterly

"But Faxhor, you err in two major respects, To ask of her age, is
ill-mannered at best, For a gentleman waits for the lady to tell,
(Most unlikely until, he's well under her spell). But when you reply
to a program designed, Giving random responses, to annoy and to
blind, Neither human nor alien, that cares not a jot, It's apparent
to me, Lady C is a 'bot'!" -- Andrew Robertson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top