Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Error with trying to use this XSD Expand / Collapse
Author
Message
Posted Friday, February 14, 2014 6:25 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 1:52 PM
Points: 97, Visits: 317
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>

Post #1541809
Posted Friday, February 14, 2014 6:45 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 5:10 AM
Points: 567, Visits: 8,716
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, MCITP
Post #1541811
Posted Saturday, February 15, 2014 9:54 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Tuesday, April 15, 2014 1:52 PM
Points: 97, Visits: 317
Can xs:complexType have xs:Sequence as a child?
Post #1541889
Posted Sunday, February 16, 2014 5:19 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 5:10 AM
Points: 567, Visits: 8,716
complexType can have sequence as a sub-element. http://www.w3schools.com/schema/el_complextype.asp

Russel Loski, MCITP
Post #1541897
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse