W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2005

RE: [Fwd: Extending RSS 2.0]

From: Michael Kay <mike@saxonica.com>
Date: Fri, 7 Oct 2005 09:43:39 +0100
To: "'Borut Bolcina'" <bob@najdi.si>, <xmlschema-dev@w3.org>
Message-ID: <E1ENnpb-0006lW-HO@maggie.w3.org>
I don't know if it was your comment or someone else asking the same
question, but the advice given was to write a schema that defines the rules
for your own elements and import the RSS schema into your own. Since the
wildcard specifies lax validation, it will validate your elements against
their declarations. However, it will not prevent the appearance of elements
for which there is no declaration, and it will not constrain the order of
these elements.
If you want something stricter than this, you could define your own element
job:item and put it in the substitution group of the RSS item, with a
content model that's defined as an extension of the original. The instance
would then, of course, have to specify job:item rather than item.
Michael Kay


From: xmlschema-dev-request@w3.org [mailto:xmlschema-dev-request@w3.org] On
Behalf Of Borut Bolcina
Sent: 07 October 2005 08:19
To: xmlschema-dev@w3.org
Subject: [Fwd: Extending RSS 2.0]

Hi again,

I finally branched back to this task. Huh, those managers.

My job namespace elements are now being validated against external schema.
But, as RSS 2.0 schema allows any element (see below), I can not control
which of job namespace elements are mandatory or their order if that would

So there is no other option then to use my own schema based on RSS 2.0. I
thought I could avoid changing the original. Am I wrong?


-------- Original Message -------- 
Subject: 	Extending RSS 2.0	
Date: 	Mon, 26 Sep 2005 16:16:08 +0200	
From: 	Borut Bolčina  <mailto:bob@najdi.si> <bob@najdi.si>	
To: 	xmlschema-dev@w3.org	


if I extend RSS 2.0 with some additional <item> elements in my own job: 

namespace like this:


   <title>Job title</title>


   <description>Job description.</description>

   <enclosure url="http://some.domain.com/img/logo.jpg"

type="image/jpeg" length="34566"/>

   <pubDate>Mon, 26 Sep 2005 11:25:10 +0200</pubDate>

   <job:company>Acme ltd.</job:company>

   <job:work-area>Job work area</job:work-area>

   <job:type>type of job</job:type>

   <job:education>level of education</job:education>

   <job:location region="some region">town</job:location>

   <job:expires>Mon, 17 Oct 2005 11:25:10 +0200</job:expires>


it validates perfectly ok with 

http://www.thearchitect.co.uk/schemas/rss-2_0.xsd. Understandably, as

<xs:any namespace="##other" processContents="lax" minOccurs="0" 



       <xs:documentation>Extensibility element.</xs:documentation>



is allowing this. Now, how do I enforce rules for my job: elements? The 

basis for validation would be the above xsd, which would allow inclusion 

of different new sets of elements and namespaces (one of them being 

job:, the other maybe commerce:).

How to do this right?


Received on Friday, 7 October 2005 08:44:03 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:08 UTC