Search the web
Sign In
New User? Sign Up
RSS2-Support
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.

Messages

  Messages Help
Advanced
Schemas: update   Message List  
Reply Message #214 of 807 |
Schemas: update

I have run into a deal-stopper in constructing a schema for RSS 2.0. Meaning
that there is structure in the RSS spec that can't be modeled in schema
notation.

The problem is, in an element list where order is not important (the <channel>
element), it's only permitted for each child element to occur 0 or 1 times, no
more. This isn't the case when there is more than one <category>.

A simple example:

<root>
<a/>
<b/>
<b/>
<!-- Any number of b's here or anywhere under root. -->
<c/>
</root>

<root>
<b/> <!-- Or no b here at all -->
<a/>
<c/>
</root>

As far as I can tell, these two structures can't be validated with a single W3C
schema.


I've been researching this and trying examples and ideas for most of today. Also
talking to people I know who work with XML and validation. And it seems that
this 0-or-1 restriction on unordered elements is real.


As far as I'm concerned, this wraps it up for the usefulness of schema
validation for this format. It shouldn't be the place of the schema language to
dictate a change to an existing, well-formed file format that's in widespread
use. I don't have the authority to ask for a change like that and certainly the
designers of schema don't have that authority.





Sun Jan 26, 2003 8:55 pm

dino_morelli
Offline Offline
Send Email Send Email

Message #214 of 807 |
Expand Messages Author Sort by Date

I've been working on the schema nearly nonstop for the past few days, mostly requesting help on the XSDSchema group and reading lots of documentation. Let me...
Dino Morelli <dino.mo...
dino_morelli
Offline Send Email
Jan 24, 2003
4:16 pm

I have run into a deal-stopper in constructing a schema for RSS 2.0. Meaning that there is structure in the RSS spec that can't be modeled in schema notation. ...
Dino Morelli <dino.mo...
dino_morelli
Offline Send Email
Jan 26, 2003
8:55 pm

I've seen this style of structure modeled as a repeating choice in XSD. Cheers Simon...
Simon Fell
simonfell99
Offline Send Email
Jan 26, 2003
9:11 pm

... <choice> isn't permitted inside an <all> element, which is what allows the elements to be unordered. If the order of all elements in <channel> were forced,...
Dino Morelli <dino.mo...
dino_morelli
Offline Send Email
Jan 26, 2003
9:50 pm

... you have a sequence containing a repeating choice of all the elements, this give you what you're looking for. Cheers Simon...
Simon Fell
simonfell99
Offline Send Email
Jan 26, 2003
9:55 pm

... In doing so, the <sequence> forces the children to be in that specific order. The RSS document I've been using as an example (yesterday's Scripting News)...
Dino Morelli <dino.mo...
dino_morelli
Offline Send Email
Jan 26, 2003
10:09 pm

... the sequence only contains the choice, the choice is set to have maxOccurs="unbounded", so that in effect you end up with any number of elements from...
Simon Fell
simonfell99
Offline Send Email
Jan 26, 2003
10:57 pm

... Given this schema <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element...
Simon Fell
simonfell99
Offline Send Email
Jan 27, 2003
6:24 am

... Ok, I tried your document out and schema out and some other versions with the elements in different orders and/or missing. In your above example, it...
Dino Morelli <dino.mo...
dino_morelli
Offline Send Email
Jan 27, 2003
2:16 pm

I'm writing this to let everyone know that I'm stopping work on this and getting on to other things. To summarize, I can't figure out how to construct a schema...
Dino Morelli <dino.mo...
dino_morelli
Offline Send Email
Jan 28, 2003
2:42 pm
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help