HighTechTalks DotNet Forums  

The validate schema menu (VS.NET 2002)

Dotnet XML microsoft.public.dotnet.xml


Discuss The validate schema menu (VS.NET 2002) in the Dotnet XML forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Julian Hershel
 
Posts: n/a

Default The validate schema menu (VS.NET 2002) - 04-07-2004 , 06:06 PM






Hi.

Does the Validate Schema menu option interpret any feature of a .xsd file? I
am trying to test a simple extension from a complextype, but when I try to
validate my XML file, the validation complains.

This is my .xsd file:

<?xml version="1.0" ?>
<xs:schema id="Sent" targetNamespace="http://tempuri.org/OrdersExtended.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:mstns="http://tempuri.org/OrdersExtended.xsd"
xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"
attributeFormDefault="qualified" elementFormDefault="qualified">
<xs:element name="Sent">
<xs:complexType>
<xs:sequence>
<xs:element name="Order" type="BaseOrder" />
</xs:sequence>
</xs:complexType>
</xs:element>

<xs:complexType name="BaseOrder">
<xs:sequence>
<xs:element name="ProductId" type="xs:integer" />
<xs:element name="Product" type="xs:string" />
<xs:element name="Supplier" type="xs:string" />
</xs:sequence>
<xs:attribute name="ID" type="xs:integer" use="required" />
</xs:complexType>

<xs:complexType name="BaseOrderExt">
<xs:complexContent>
<xs:extension base="BaseOrder">
<xs:sequence>
<xs:element name="Available" type="xs:string" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>


How can I test this extension using vs.net?

Thank you.
Julian



Reply With Quote
  #2  
Old   
Alex Shirshov
 
Posts: n/a

Default Re: The validate schema menu (VS.NET 2002) - 04-09-2004 , 03:24 AM






Hello, Julian!
You wrote on Wed, 7 Apr 2004 19:06:25 -0300:

JH> Does the Validate Schema menu option interpret any feature of a .xsd
JH> file? I am trying to test a simple extension from a complextype, but
JH> when I try to validate my XML file, the validation complains.


[Sorry, skipped]

You should specify namespace for your custom types

<xs:sequence>
<xs:element name="Order" type="mstns:BaseOrder" />
</xs:sequence>

<xs:extension base="mstns:BaseOrder">
<xs:sequence>
....

and so on.

With best regards, Alex Shirshov.



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.