473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Shared Xml file problem when xsd.exe is used

Raj
Hi All,
I am having three XML files. One called SimpleTypes.xsd from which
ComplexTypes.xsd is constructed. Then, there is another file called
InformationExchangeModel.xsd that uses types in complexTypes.xsd to
construct messages.

I am having all sorts of problems validating these xsd files in XML
spy version 5 release 4. It always complains about "undefined value
for 'type' encountered".

Here is the scenario

SimpleTypes.xsd
****************
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:simpleType name="URLType">
<xs:restriction base="xs:string">
<xs:maxLength value="1024"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

ComplexTypes.xsd
*****************
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNameSpace="http://www.x.com/schema"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="http://www.x.com/SimpleTypes.xsd"/>
<xs:complexType name="StreamURLType">
<xs:sequence>
<xs:element name="URL" type="URLType"/> <---- GIVES ERROR HERE
!!!
<xs:element name="BandWidthK" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:unsignedInt">
<xs:maxInclusive value="2048"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

InformationExchangeModel.xsd
****************************

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.x.com/schema" xmlns:rmt="rmt"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified"
id="rmt_message">
<xs:import namespace="rmt"
schemaLocation="http://dev.radiotime.com/RMTSchema/RadioMytime_ComplexTypes.xsd"/>
<xs:element name="ScheduleResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Header" type="rmt:HeaderType"/>
<xs:element name="ClientID" type="rmt:ClientIDType"/>
<xs:element name="ReturnCode" type="rmt:ReturnCodeType"/>
<xs:element name="ScheduleItemList"
type="rmt:ScheduleItemGroupType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

please assume that all the other types that are referred to are
defined in the complextypes file.

I had earlier import statements for complex and informationmodel.xsd
but when I ran xsd.exe it put everything in different namespaces. When
I just have xs:include, it complains that the namespace '' has already
been included. That is the reason I changed the files and to have one
namespace, from the on I have been having problems

Can someone suggest a better way to do this

Thanks
Raj
Nov 11 '05 #1
1 3433
This came up quite a few times before. Check the archives, for example [0]

--
HTH
Christoph Schittko [MVP]
Software Architect, .NET Mentor

[0]
http://groups.google.com/groups?q=ch...ftngp05&rnum=4

"Raj" <ph*********@yahoo.com> wrote in message
news:26**************************@posting.google.c om...
Hi All,
I am having three XML files. One called SimpleTypes.xsd from which
ComplexTypes.xsd is constructed. Then, there is another file called
InformationExchangeModel.xsd that uses types in complexTypes.xsd to
construct messages.

I am having all sorts of problems validating these xsd files in XML
spy version 5 release 4. It always complains about "undefined value
for 'type' encountered".

Here is the scenario

SimpleTypes.xsd
****************
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:simpleType name="URLType">
<xs:restriction base="xs:string">
<xs:maxLength value="1024"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>

ComplexTypes.xsd
*****************
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNameSpace="http://www.x.com/schema"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="http://www.x.com/SimpleTypes.xsd"/>
<xs:complexType name="StreamURLType">
<xs:sequence>
<xs:element name="URL" type="URLType"/> <---- GIVES ERROR HERE
!!!
<xs:element name="BandWidthK" minOccurs="0">
<xs:simpleType>
<xs:restriction base="xs:unsignedInt">
<xs:maxInclusive value="2048"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>

InformationExchangeModel.xsd
****************************

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="http://www.x.com/schema" xmlns:rmt="rmt"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified"
id="rmt_message">
<xs:import namespace="rmt"
schemaLocation="http://dev.radiotime.com/RMTSchema/RadioMytime_ComplexTypes.
xsd"/> <xs:element name="ScheduleResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="Header" type="rmt:HeaderType"/>
<xs:element name="ClientID" type="rmt:ClientIDType"/>
<xs:element name="ReturnCode" type="rmt:ReturnCodeType"/>
<xs:element name="ScheduleItemList"
type="rmt:ScheduleItemGroupType" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

please assume that all the other types that are referred to are
defined in the complextypes file.

I had earlier import statements for complex and informationmodel.xsd
but when I ran xsd.exe it put everything in different namespaces. When
I just have xs:include, it complains that the namespace '' has already
been included. That is the reason I changed the files and to have one
namespace, from the on I have been having problems

Can someone suggest a better way to do this

Thanks
Raj

Nov 11 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Srijit Kumar Bhadra | last post by:
Hello, Here is some sample code with pywin32 build 203 and ctypes 0.9.6. Best regards, /Srijit File: SharedMemCreate_Mutex_win32all.py # This application should be used with...
11
by: Brett | last post by:
I have an assembly on a shared LAN drive. On my developer machine, I give that assembly full trust from the .NET wizard. It works fine. I go to a user machine on the LAN, map to the shared...
0
by: Shiraz | last post by:
Hi I have a question regarding the functionality of merge modules. Since this relates to my previous queries, I'll just give you a brief background on the topic. I had to make an installer for...
9
by: Invalidlastname | last post by:
Hi, We developed some assemblies which use EnterpriseServices queued components. In order to use EnterpriseServices, these assemblies need to be installed into GAC. I used the pre-build and...
11
by: tshad | last post by:
I am setting up some of my functions in a class called MyFunctions. I am not clear as to the best time to set a function as Shared and when not to. For example, I have the following bit...
27
by: Javier Martinez | last post by:
Hi I have asp application in a machine with a virtual directory referring a shared directory in another machine When I try to load any aspx page of my portal I get the following error: ...
33
by: Joe Fallon | last post by:
1. I have a Base class that has a certain amount of functionality. 2. Then I have a CodeSmith generated class that inherits from the Base class and adds functionality. 3. Since I want to be able...
6
by: jzdeng | last post by:
Hi, All I use VS 2005 to create a web service. The web service is used to create a sheared folder. It works fine we I run it from VS 2005. But, when I move it to inetpub, it does not work...
7
by: akennis | last post by:
First of all, sorry for duplicating this post. I put it up in the alt.comp.lang.learn.c-c++ mistakenly. I'm investigating a problem whereby exceptions thrown from functions in a Shared Library...
5
by: David T. Ashley | last post by:
I've occasionally had trouble compiling and linking programs that use shared libraries. That never made a lot of sense to me, because I thought the operating system went hunting for the symbols...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.