473,787 Members | 2,932 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.net xml editor doesn't recognize extension correctly

I am trying to use the xml desinger in .net 1.1 to create
the follow schema. where USAddress is derived from Address
But when I generate the xml file, the .net xml editor says

"The active schema does not support the element 'street'"

The schema is from a msdn .net example.
What I am missing here?

Thanks
John

Here are the xml file and xsd file:

Here is the xml file:

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="MySchema"
targetNamespace ="http://tempuri.org/MySchema.xsd"
elementFormDefa ult="qualified"
xmlns="http://tempuri.org/MySchema.xsd"
xmlns:mstns="ht tp://tempuri.org/MySchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexTy pe name="address">
<xs:sequence>
<xs:element name="street"
type="xs:string " />
<xs:element name="city"
type="xs:string " />
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="USAddress ">
<xs:complexCont ent>
<xs:extension base="address">
<xs:sequence>
<xs:element
name="state" type="xs:string " />
</xs:sequence>
<xs:attribute
name="country" type="xs:string " fixed="US" />
</xs:extension>
</xs:complexConte nt>
</xs:complexType>
<xs:element name="USA"
type="USAddress "></xs:element>
</xs:schema>
Here is a schema saved as MySchema.xsd

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="MySchema"
targetNamespace ="http://tempuri.org/MySchema.xsd"
elementFormDefa ult="qualified"
xmlns="http://tempuri.org/MySchema.xsd"
xmlns:mstns="ht tp://tempuri.org/MySchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexTy pe name="address">
<xs:sequence>
<xs:element name="street"
type="xs:string " />
<xs:element name="city"
type="xs:string " />
</xs:sequence>
</xs:complexType>
<xs:complexTy pe name="USAddress ">
<xs:complexCont ent>
<xs:extension base="address">
<xs:sequence>
<xs:element
name="state" type="xs:string " />
</xs:sequence>
<xs:attribute
name="country" type="xs:string " fixed="US" />
</xs:extension>
</xs:complexConte nt>
</xs:complexType>
<xs:element name="USA"
type="USAddress "></xs:element>
</xs:schema>
Nov 12 '05 #1
4 1508
John wrote:
I am trying to use the xml desinger in .net 1.1 to create
the follow schema. where USAddress is derived from Address
But when I generate the xml file, the .net xml editor says

"The active schema does not support the element 'street'"


You forgot to post your XML instance.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog
Nov 12 '05 #2
Here are xml instance file and schema:

xml:
<?xml version="1.0" encoding="utf-8" ?>
<USA xmlns="http://tempuri.org/MySchema.xsd">
<street> 1st </street>
<state > CA </state>
</USA>

Schema:

<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="MySchema"
targetNamespace ="http://tempuri.org/MySchema.xsd"
elementFormDefa ult="qualified"
xmlns="http://tempuri.org/MySchema.xsd"
xmlns:mstns="ht tp://tempuri.org/MySchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexTy pe name="usaddress ">
<xs:complexCont ent>
<xs:extension base="address">
<xs:sequence>
<xs:element
name="state" type="xs:string " />
</xs:sequence>
<xs:attribute
name="country" type="xs:string " />
</xs:extension>
</xs:complexConte nt>
</xs:complexType>
<xs:complexTy pe name="address">
<xs:sequence>
<xs:element name="street"
type="xs:string " />
<xs:element name="city"
type="xs:string " />
</xs:sequence>
</xs:complexType>
<xs:element name="USA"
type="usaddress "></xs:element>
</xs:schema>

-----Original Message-----
John wrote:
I am trying to use the xml desinger in .net 1.1 to create the follow schema. where USAddress is derived from Address But when I generate the xml file, the .net xml editor says
"The active schema does not support the
element 'street'"
You forgot to post your XML instance.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog
.

Nov 12 '05 #3
Hi John,

I test the schema and XML file in my project it work well. ( I just copy
the xml code from your meassge to my VS.) Is the error only with the C++
project you upload?

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 12 '05 #4

MSFT wrote:
*I test the schema and XML file in my project it work well. ( I just
copy
the xml code from your meassge to my VS.) Is the error only with the
C++
project you upload?

Luke
*


Luke what am I doing doing wrong? I got the same error as John. I did
the following:
1) Add a new schema to my project.
2) Paste John's schema example into the file.
3) Add a new XML file to the project
4) Right-click properties in the XML document to set the target schema
to the new schema.
5) Add street and state elements to the XML file.

The element street is underlined with a red wavy line with the tooltip
error "The active schema does not support the element 'street'."
I am using VS (version 7.1.3088) with .Net Framework (version 1.1.4322
SP1)

John's example was stright out of the .Net Framework general
regerence.
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003 FEB.1033/cpgenref/html/xsdrefextension complexcontente lement.htm

--
kjm87
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message185473.html

Nov 12 '05 #5

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

Similar topics

71
6507
by: tomy_baseo | last post by:
I'm new to HTML and want to learn the basics by learning to code by hand (with the assistance of an HTML editor to eliminate repetitive tasks). Can anyone recommend a good, basic HTML editor that's a step beyond Notepad (not a WYSIWYG tool). Thanks.
4
1453
by: gswitz | last post by:
When Editing .SQL files using .Net, when I execute the SQL or Check the SQL, it reformats the SQL differently than we normally do it. I would like to know how I can disable this automatic formatting. Alternatively, I would like a format option that creates a carriage return after each field in sub selects. I work primarily with Oracle, and this is our company standard. I like the tabbing in many cases, but I am now on the data warehouse...
8
2295
by: pacs34 | last post by:
I just read some stuff about XHTML 2.0 and it sounds fascinating so I have been trying to create a small test doc which has a few graphics files but whenever I submit it to the W3 validator I get this foolishness about mime type="text/html" and then it tries to validate it using SGML (in liew of XHTML 2.0) rules. Obviously this all fails. Is there anything I can do? = = = = = = = Here's my doc: = = = = = = =
149
25211
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
6
1446
by: Bob | last post by:
I noticed that some of the Microsoft site pages have the extension name of mspx. It's easy to config IIS to map a particular extension name to the ASP.NET dll for production purpose. However I can't figure out how to config VS.NET to recognize my own file extension name e.g. *.bob, as ASPX pages. Is it matter of creating a set of template? If so, would it compile correctly? My goal is for VS.NET to treat a different extension name the...
16
4929
by: Dany | last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer says service packs marked as "critical" by Microsoft must be installed on their servers. Now german Umlaute (ä, ü, ö) and quotes are returned incorrectly in SOAP fault responses. This can be easily verified: Implement the following in a web service method (just raises a SOAPException with a...
3
11634
by: naveen.sabapathy | last post by:
Hi, I am trying to use virtual serial ports to develop/test my serial communication program. Running in to trouble... I am using com0com to create the virtual ports. The virtual ports seem to be working fine when I test it with Hyperterminal . I am using the example program that comes with pyserial, as below. --------------- import serial
3
1793
by: lenbell | last post by:
When I create a html using my html editor and then insert php code I get odd results. I've gotten rid of most but some remain. If I rename the file to a .php it helps but still screws up. here are tow examples http://dominatesoftware.com/tenets/Hello11.php http://dominatesoftware.com/tenets/Hello1.html Same exact code!
19
2106
by: Eric S. Johansson | last post by:
Almar Klein wrote: there's nothing like self interest to drive one's initiative. :-) 14 years with speech recognition and counting. I'm so looking to my 15th anniversary of being injured next year.... another initiative is exporting the speech recognition environment to the Linux context. In a nutshell, he dictated to application on Windows, it tunnels over the network to a Linux machine, and will allow you to cut and paste to and...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
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
8993
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
7517
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
6749
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
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4067
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
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.