473,849 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML schema validation problem with XMLSpy

Hello,

I have the following XML schema fragment:

<xs:complexTy pe name="type.1">
<xs:simpleConte nt>
<xs:restricti on base="ns:type">
<xs:simpleTyp e>
<xs:restricti on base="xs:positi veInteger"/>
</xs:simpleType>
</xs:restriction>
</xs:simpleConten t>
</xs:complexType>
<xs:complexTy pe name="type">
<xs:simpleConte nt>
<xs:extension base="xs:anySim pleType">
<xs:attributeGr oup ref="nx:att.gro up"/>
</xs:extension>
</xs:simpleConten t>
</xs:complexType>
XMLSpy gives me the below error when I'm in the schema/WSDL view,
while the text view works fine:

File testSchema.xsd is not valid.
The content type (simpleType) of complexType "type.1" cannot restrict
simpleType 'anySimpleType' !
Is this a problem in my schema, or it's a bug in the XMLSPy validator

I'm using XMLSpy 2006 rel. 3 sp2

I tried one online schema validator, on the w3c site, and it didn't
complain.

Mar 9 '07 #1
1 3054
On Mar 9, 11:22 am, "Blue Doze" <blued...@gmail .comwrote:
Hello,

I have the following XML schema fragment:

<xs:complexTy pe name="type.1">
<xs:simpleConte nt>
<xs:restricti on base="ns:type">
<xs:simpleTyp e>
<xs:restricti on base="xs:positi veInteger"/>
</xs:simpleType>
</xs:restriction>
</xs:simpleConten t>
</xs:complexType>
<xs:complexTy pe name="type">
<xs:simpleConte nt>
<xs:extension base="xs:anySim pleType">
<xs:attributeGr oup ref="nx:att.gro up"/>
</xs:extension>
</xs:simpleConten t>
</xs:complexType>

XMLSpygives me the below error when I'm in the schema/WSDL view,
while the text view works fine:

File testSchema.xsd is not valid.
The content type (simpleType) of complexType "type.1" cannot restrict
simpleType 'anySimpleType' !

Is this a problem in my schema, or it's a bug in theXMLSPyvalida tor

I'm usingXMLSpy2006 rel. 3 sp2

I tried one online schema validator, on the w3c site, and it didn't
complain.
Hello,

The Text View is correct so rely on that validation! I have reported
this issue to the development team for a fix so the error is not
raised in the Schema Design View. Please excuse us for the
inconvenience.

(http://www.altova.com )

Best regards,

.... Jerry Sheehan
.... Pre-Sales Engineer
.... Altova, Inc.
.... 978-816-1614

Mar 9 '07 #2

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

Similar topics

0
1400
by: Andy Dingley | last post by:
I'm writing XSLT to transform fntg-schema (our own project's document schema) into PartnerML, a HTML-like XML dialect used for mobile phones. I'm using XMLSPy 4.4 to do this. The schema for PartnerML is supplied in several modules, brought together by <xs:include> and <xs:import> statements. My understanding (and experiment) suggests that XMLSpy can't work with such a modularized schema. As a result, my XSLT documents have a header...
8
13543
by: UndoMiel | last post by:
Hi, I am looking for a way to validate IP addresses using XML Schemas. The following is what i used: <xsd:simpleType name="IPType"> <xsd:restriction base="xsd:string"> <xsd:pattern value="((? | 1 | 2 | 25)\.){3} (? | 1 |
0
1335
by: shawnk | last post by:
I want to use the Hosts file to locate schema for validation. The Hosts file (C:\Windows\System32\etc) will locate xsd schema files on a LAN server for development purposes. This gives me a alias mechanism for XML namespace redirection. If the host file on a client machine has the entry; 192.168.1.12 XML-srv
2
1544
by: Rajesh Jain | last post by:
I Have 2 separate schemas. --------------Schema 1 is defined as below----------- <xs:schema targetNamespace="http://Schemas/1" xmlns="http://Schemas/1" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="Loan"> <xs:complexType> <xs:sequence> <xs:element name="Borrower" maxOccurs="unbounded"> <xs:complexType> <xs:attribute name="BorrID" use="required">
1
2328
by: Dan Bass | last post by:
There's an XML message I have, that has no namespace information. Then there is a XSD schema that is must validate against, but this has a targetNamespace and xmlns of "http://www.wbf.org/xml/b2mml-v02". How do I get this XML to validate against the Schema in C#? If I use XmlSpy (2005 home edition) to perform the validation, it first inserts namespace and schema information into the XML before validating. Validation then seems to work if...
12
2430
by: steve_marjoribanks | last post by:
I'm fairly new to XML and schemas and I'm trying to work out why a schema I've been given keeps throwing up validation errors in XMLSpy. The section of code with the problem is: <!--============= Element =============--> <element name="conResults" type="agsml:CongArrayType" substitutionGroup="agsml:_congProperty"/> <!--============= ComplexType =============--> <complexType name="CongArrayType"> <complexContent>
3
2055
by: Adam Clauss | last post by:
I'm running into a problem with schema validation. For some reason, if a schema has an xs:all section to it, it does not validate correctly. It seems to treat it as a sequence. My understanding is that switching to an xs:all should not require that the child elements be in any particular order - yet that is exactly the error I am seeing. I've tested this on both .NET 1.1 and .NET 2.0 and I get the same error. The XML validates against...
2
2410
by: yannick.beot | last post by:
Hi, I have a problem with nested namespace in a schema. I defined a schema A. A is importing a schema B with the namespace nsB and a schema C with the namespace nsC. But both B and C are importing a schema D with a namespace D. I have a validation error because some elements are defined twice.
1
6041
by: tthunder | last post by:
Hi @all, Please check the following XML file and XML schema definition below first: ------- XML File (full): ------- <?xml version="1.0" encoding="UTF-8"?>
0
9893
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9738
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9501
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7894
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7070
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5921
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4544
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4139
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.