OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Harmonising RSS-* and Atom - solving interoperability problems with mode

[ Lists Home | Date Index | Thread Index ]


It seems to me that modern schema languages such as RelaxNG and W3C
XML schema, have a significant role to play in simplifying data
inter-operability and helping us move away from incessant disagreements
about data models that plagued the DTD years.

As an example of what can be achieved, and as a discussion piece, I
have created a schema that allows *all* versions of RSS and the
newer Atom notation to all conform to a single, simple schema. I'm convinced
that this harmonization will make life a lot easier for syndication tool
creators and feed creators alike.

I have included Relax NG compact syntax, Relax NG and W3C XML Schema

(The is no DTD version because DTDs lack the all important attribute wild 
carding capability
of modern schema languages. A capability that is vital to the power of this 
technique - especially
in the namespace-centric world we live in.)

Here is a fragment of RSS 1.0 for example:
         <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
rdf:resource="http://localhost:8080/DrRoryOHanlon/000013.html"; />
rdf:resource="http://localhost:8080/DrRoryOHanlon/000012.html"; />
rdf:resource="http://localhost:8080/DrRoryOHanlon/000004.html"; />
rdf:resource="http://localhost:8080/DrRoryOHanlon/000003.html"; />

and here is the same document, cross-translated to my interoperability schema:
         <tag type="rdf:RDF" 
         <tag type="items">
         <tag type="rdf:Seq"><tag type="rdf:li" 
rdf:resource="http://localhost:8080/foo/000013.html"; />
         <tag type="rdf:li" 
rdf:resource="http://localhost:8080/foo/000012.html"; />
         <tag type="rdf:li" 
rdf:resource="http://localhost:8080/foo/000004.html"; />
         <tag type="rdf:li" 
rdf:resource="http://localhost:8080/foo/000003.html"; />

Here is the schema. Comments welcome.

-- W3C XML schema --
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; 
   <xs:element name="tag">
         <xs:element minOccurs="0" maxOccurs="unbounded" ref="tag"/>
       <xs:anyAttribute processContents="skip"/>

-- Relax NG --
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0";>
     <ref name="TAG"/>
   <define name="TAG">
     <element name="tag">
         <ref name="TAG"/>

-- Relax NG Compact Syntax --
start = TAG

TAG = element tag {
         attribute * { text }*,
         TAG *


Sean McGrath


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS