Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: specify element type depending of same element attribute value? >Thread Next - RE: include and targetNamespace error include and targetNamespace errorTo: xmlschema-dev@--.---, ---------@--------.--- Date: 5/16/2006 6:54:00 PM
Hi!
I have some problems with targetNamespace:
I have a file .xsd with some simpleType that I want to use also in
another file.xsd, so I would like to include it.
When I do it it comes out this error
element message_content: Schemas validity error : Element
'message_content': No matching global declaration available.
(message_content is the root node of the message xml).
I tried not to use the include and define types inside schema but it's
the same. It only works without define targetNamespace and xmls.
These are files...what's wrong?
Please help me!
<?xml version="1.0"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.tvblob3.com/TVB"
xmlns:tvb="http://www.tvblob3.com/TVB">
<xs:include schemaLocation="common_types.xsd"/>
<xs:element name="message_content">
<xs:complexType>
<xs:all>
<xs:element name="filter-parameters" >
<xs:complexType>
<xs:all minOccurs="0">
<xs:element name="family-name" type="tvb:simple_text"/>
<xs:element name="first-name" type = "tvb:simple_text"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:element>
</xs:schema>
and the other file is
<?xml version="1.0"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.tvblob3.com/TVB"
xmlns:tvb="http://www.tvblob3.com/TVB">
<xs:simpleType name="simple_text">
<xs:restriction base="xs:string">
<xs:pattern
value="([a-zA-Z'])+([ ])*([a-zA-Z'])*([ ])*([a-zA-Z'])*([ ])*([a-zA-Z'])*([ ])*([a-zA-Z'])*([ ])*([a-zA-Z'])*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="alfa_numeric_plus">
<xs:restriction base="xs:string">
<xs:pattern value="([a-zA-Z0-9])+[-_#*]*"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="alfa_numeric">
<xs:restriction base="xs:string">
<xs:pattern value="([a-zA-Z0-9])+"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Thanks
Debora Vanni
debora.vanni@t...
From george@o... Thu May 18 06:45:49 2006
Received: from maggie.w3.org ([193.51.208.68])
by frink.w3.org | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
