Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Error with trying to use this XSD


Error with trying to use this XSD

Author
Message
Khades
Khades
SSC-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 390
I'm not very good at creating XSDs, but for my current project, I have to. I created the one below, but seem to be getting the error
"The 'http://www.w3.org/2001/XMLSchema:Sequence' element is not supported in this context."

What am I doing wrong?


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3schools.com" xmlns="http://www.w3schools.com" elementFormDefault="qualified">
<xs:element name="VIConfigs">
<xs:complexType>
<xs:sequence>
<xs:element name="VIConfigData" type="VIConfigDataType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="VIConfigDataType">
<xs:complexContent>
<xs:sequence>
<xs:element name="Lender_ID" type="xs:int"/>
<xs:element name="Vendor_ID" type="xs:int"/>
<xs:element name="Product_ID" type="xs:int"/>
<xs:element name="URLConfigs" type="URLConfigList" minOccurs="0"/>
<xs:element name="ResourceConfigs" type="ResourceConfigList" minOccurs="0"/>
<xs:element name="DomainConfigs" type="DomainConfigList" minOccurs="0"/>
</xs:sequence>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="URLConfigList">
<xs:sequence>
<xs:element name="URLConfigData" type="URLConfigDataType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="URLConfigDataType">
<xs:complexContent>
<xs:sequence>
<xs:element name="isOutboundOrInbound" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="urlConfigEntryNumber" type="xs:int"/>
<xs:element name="sUrlTypeName" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sTransportName" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sUrl" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sUrlDescription" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sUserName" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sPassword" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sContentType" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sHeaderList" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="bNewOrderMessage" type="xs:boolean"/>
<xs:element name="bCancelOrderMessage" type="xs:boolean"/>
<xs:element name="bPauseOrderMessage" type="xs:boolean"/>
<xs:element name="bReopenOrderMessage" type="xs:boolean"/>
<xs:element name="bUpdateOrderMessage" type="xs:boolean"/>
<xs:element name="bNewDeliverableMessage" type="xs:boolean"/>
<xs:element name="bReopenDeliverableMessage" type="xs:boolean"/>
<xs:element name="bCancelDeliverableMessage" type="xs:boolean"/>
<xs:element name="bHoldDeliverableMessage" type="xs:boolean"/>
</xs:sequence>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="ResourceConfigList">
<xs:sequence>
<xs:element name="ResourceConfigData" type="ResourceConfigDataType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ResourceConfigDataType">
<xs:complexContent>
<xs:sequence>
<xs:element name="resourceConfigEntryNumber" type="xs:int"/>
<xs:element name="isOutboundOrInbound" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sResourceTypeName" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sResourceName" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sResourceDescription" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sResourceLocation" type="AlphaNumeric255Type" minOccurs="0"/>
</xs:sequence>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="DomainConfigList">
<xs:sequence>
<xs:element name="DomainConfigData" type="DomainConfigDataType" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="DomainConfigDataType">
<xs:complexContent>
<xs:sequence>
<xs:element name="domainConfigEntryNumber" type="xs:int"/>
<xs:element name="isOutboundOrInbound" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sDomainTypeName" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sDomainConfigName" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sDomainConfigValue" type="AlphaNumeric255Type" minOccurs="0"/>
<xs:element name="sDomainConfigDescription" type="AlphaNumeric255Type" minOccurs="0"/>
</xs:sequence>
</xs:complexContent>
</xs:complexType>
<xs:simpleType name="AlphaNumeric255Type">
<xs:annotation>
<xs:documentation> Alpha Numeric field of length 255 characters</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string">
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>


Russel Loski
Russel Loski
Mr or Mrs. 500
Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)

Group: General Forum Members
Points: 593 Visits: 8883
xs:complexContent cannot have xs:sequence as a child. You can have xs:extension or maybe xs:restriction which in turn can have xs:sequence as its child.

http://msdn.microsoft.com/en-us/library/ms256053(v=vs.110).aspx

Russel Loski, MCSE Business Intelligence, Data Platform
Khades
Khades
SSC-Enthusiastic
SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)SSC-Enthusiastic (101 reputation)

Group: General Forum Members
Points: 101 Visits: 390
Can xs:complexType have xs:Sequence as a child?
Russel Loski
Russel Loski
Mr or Mrs. 500
Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)Mr or Mrs. 500 (593 reputation)

Group: General Forum Members
Points: 593 Visits: 8883
complexType can have sequence as a sub-element. http://www.w3schools.com/schema/el_complextype.asp

Russel Loski, MCSE Business Intelligence, Data Platform
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search