Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Bug in VS XML Editor?
Hello everybody.  Can anybody could confirm if this is a bug???

If I create the schema:
-----------------------
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema id="MySchema"
targetNamespace="http://tempuri.org/MySchema.xsd"
elementFormDefault="qualified"
xmlns="http://tempuri.org/MySchema.xsd"
xmlns:mstns="http://tempuri.org/MySchema.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="MyElement">
<xs:complexType>
<xs:sequence>
<xs:any />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

And the file
------------
<?xml version="1.0" encoding="utf-8" ?>
<mySchema:MyElement xmlns:mySchema="http://tempuri.org/MySchema.xsd">
<Something>This is something and should be allowed</Something>
</MyElement>

Visual Studio says (in the XML editor) "The active schema does not
support the element 'Something'."

Is this a bug?  What I am doing wrong?


Thanks!

Report this thread to moderator Post Follow-up to this message
Old Post
Arturo
08-12-04 09:07 PM


Re: Bug in VS XML Editor?
I get the following (correct) errors in Visual Studio 2005:

Error 1 Tag was not closed. C:\Documents and Settings\clovett\My
Documents\Visual Studio\Projects\XMLFile1.xml 2 2
Error 2 Expecting end tag </mySchema:MyElement>. C:\Documents and
Settings\clovett\My Documents\Visual Studio\Projects\XMLFile1.xml 4 5
Warning 3 The 'Something' element is not declared. C:\Documents and
Settings\clovett\My Documents\Visual Studio\Projects\XMLFile1.xml 3 4

The validation error is just a warning, and if you change the following in
your schema, this warning goes away.

<xs:any processContents="skip" />


Chris.


"Arturo" <arturo-g@lycos.com> wrote in message
news:e1a45d36.0408120608.32a58919@posting.google.com...
> Hello everybody.  Can anybody could confirm if this is a bug???
>
> If I create the schema:
> -----------------------
> <?xml version="1.0" encoding="utf-8" ?>
> <xs:schema id="MySchema"
> targetNamespace="http://tempuri.org/MySchema.xsd"
>        elementFormDefault="qualified"
> xmlns="http://tempuri.org/MySchema.xsd"
>        xmlns:mstns="http://tempuri.org/MySchema.xsd"
>        xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:element name="MyElement">
> <xs:complexType>
> <xs:sequence>
> <xs:any />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
> And the file
> ------------
> <?xml version="1.0" encoding="utf-8" ?>
> <mySchema:MyElement xmlns:mySchema="http://tempuri.org/MySchema.xsd">
> <Something>This is something and should be allowed</Something>
> </MyElement>
>
> Visual Studio says (in the XML editor) "The active schema does not
> support the element 'Something'."
>
> Is this a bug?  What I am doing wrong?
>
>
> Thanks!



Report this thread to moderator Post Follow-up to this message
Old Post
Chris Lovett
09-27-04 08:57 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Visual Studio archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:32 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.