Subject: An alternative workable schema that's unordered? Yes!

From: Randy Charles Morin <[email-masked]>
Date: Wed, 14 Jul 2004 16:47:35 -0700 (PDT)

I'm just developing this idea, but there's a way to allow unordered elements in Atom and have it expressed in XSD. With of course minor changes to the syntax. I'll start by presenting the XSD.

<xs:complexType name="feedinfoType">
<xs:all>
<xs:element name="title" type="atom:contentType" /> 
<xs:element name="author" type="atom:authorType" minOccurs="0" /> 
<xs:element name="tagline" type="atom:contentType" minOccurs="0" /> 
<xs:element name="id" type="xs:anyURI" minOccurs="0" /> 
<xs:element name="generator" type="atom:generatorType" minOccurs="0" /> 
<xs:element name="copyright" type="xs:string" minOccurs="0" /> 
<xs:element name="info" type="atom:contentType" minOccurs="0" /> 
<xs:element name="modified" type="xs:dateTime" /> 
</xs:all>
</xs:complexType>

<xs:complexType name="feedType">
<xs:sequence>
<xs:element name="entryinfo" type="atom:entryinfoType"/>
<xs:element name="link" type="atom:linkType" minOccurs="0" maxOccurs="unbounded" /> 
<xs:element name="contributor" type="atom:authorType" minOccurs="0" maxOccurs="unbounded" /> 
<xs:element name="entry" type="atom:entryType" minOccurs="0" maxOccurs="unbounded" /> 
</xs:sequence>
<xs:attribute name="version" type="atom:versionType" use="required" /> 
<xs:attribute ref="xml:lang" use="optional" />
</xs:complexType>

In this case, the elements w/ cardinality greater than 1 are removed from the feedinfo and placed at the same level as entry and ordered. This would also mean creating an entryinfo element in entry that would contain all the unordered elements w/ cardinality of less than 2. Thoughts?
 
Randy
http://www.kbcafe.com
 
Example feed
 
<feed>
   <feedinfo>
      <title>asdf</title>
      ...
   </feedinfo>
   <link .../>
   <link .../>
   <entry>
      <entryinfo>
         <title>asdf</title>
      </entryinfo>
      <link .../>
      <content .../>
   </entry>
</feed>

---------------------------------
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!

---

From: Asbjørn Ulsberg <[email-masked]>
Date: Thu, 15 Jul 2004 08:17:59 +0200

> </feed>

I've always thought it is kind of messy to not group the feed-level  
information together, so if this is all it takes to make Atom XSD  
friendly, I'm all for it. I'm not sure the elements should be called  
<feedinfo> and <entryinfo>, though. What about <head>?

-- 
Asbjørn Ulsberg         -=|=-        [email-masked]
«He's a loathsome offensive brute, yet I can't look away»

---

From: Randy Charles Morin <[email-masked]>
Date: Thu, 15 Jul 2004 07:03:00 -0700 (PDT)

Thanks. Yes, feedinfo was just a tag name suggested in other threads on the Atom mailing list. I don't like tagnames w/ the parent tagname prepended. Looks weird. <head> is much better. I'm not concerned at all w/ the tagname, in fact, if Atom XML was obfuscated, I wouldn't complain.... much ;)
Thanks,
 
Randy
http://www.kbcafe.com

Asbjørn_Ulsberg <[email-masked]> wrote:
I've always thought it is kind of messy to not group the feed-level 
information together, so if this is all it takes to make Atom XSD 
friendly, I'm all for it. I'm not sure the elements should be called 
and , though. What about ?

		
---------------------------------
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.