XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 25th, 2004, 01:34 PM
Edward Bryant Edward Bryant is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Location: Chicago, IL
Posts: 3 Edward Bryant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XML Schema Confusion ... ?

Ok, I am new to this so sorry if the error is something obvious, but I can't seem to get the bit of code below to work properly:

<xs:element name="doctext">
<xs:complexType>
<xs:sequence>
<xs:element name="primary" type="xs:string"/>
<xs:element name="secondary" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>

Upon validation, I get a message telling me that the primary and secondary elements were not declared. Yet the code below (from the same Schema) worksd fine.

<xs:element name="administrative">
<xs:complexType>
<xs:sequence>
<xs:element name="id" minOccurs="1" maxOccurs="1">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:length value="15"/>
<xs:pattern value="\d{3}-\d{4}-\d{6}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="status-comment" type="xs:string"/>
<xs:element name="copyright" type="xs:string"/>
<xs:element name="sponsor" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>

Other than the simpleType restriction on the id element, I can't see anything that would cause one code snippet to work and the other not. Any leads would be appreciated.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XML Schema Confusion ... ?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway