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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Harmonising RSS-* and Atom - solving interoperabilityprobl

[ Lists Home | Date Index | Thread Index ]

Sterling work, Sean.

Your schema also happens to be the first I've seen that not only covers 
RDF/XML's various syntax forms but also adequately represents the OPML 
format [1], which is particularly difficult to validate because it has 
allows [attribute*]. A marvellous piece of unification.

Cheers,
Danny.

[1] http://www.opml.org/spec

Sean McGrath wrote:

> All,
>
> 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
> versions.
>
> (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#";>
>         <items>
>         <rdf:Seq><rdf:li 
> rdf:resource="http://localhost:8080/DrRoryOHanlon/000013.html"; />
>         <rdf:li 
> rdf:resource="http://localhost:8080/DrRoryOHanlon/000012.html"; />
>         <rdf:li 
> rdf:resource="http://localhost:8080/DrRoryOHanlon/000004.html"; />
>         <rdf:li 
> rdf:resource="http://localhost:8080/DrRoryOHanlon/000003.html"; />
>         </rdf:Seq>
>         </items>
>         </rdf:RDF>
>
> and here is the same document, cross-translated to my interoperability 
> schema:
>         <tag type="rdf:RDF" 
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";>
>         <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"; />
>         </tag>
>         </tag>
>         </tag>
>
> 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"; 
> elementFormDefault="qualified">
>   <xs:element name="tag">
>     <xs:complexType>
>       <xs:sequence>
>         <xs:element minOccurs="0" maxOccurs="unbounded" ref="tag"/>
>       </xs:sequence>
>       <xs:anyAttribute processContents="skip"/>
>     </xs:complexType>
>   </xs:element>
> </xs:schema>
>
> -- Relax NG --
> <?xml version="1.0" encoding="UTF-8"?>
> <grammar xmlns="http://relaxng.org/ns/structure/1.0";>
>   <start>
>     <ref name="TAG"/>
>   </start>
>   <define name="TAG">
>     <element name="tag">
>       <zeroOrMore>
>         <attribute>
>           <anyName/>
>         </attribute>
>       </zeroOrMore>
>       <zeroOrMore>
>         <ref name="TAG"/>
>       </zeroOrMore>
>     </element>
>   </define>
> </grammar>
>
> -- Relax NG Compact Syntax --
> start = TAG
>
> TAG = element tag {
>         attribute * { text }*,
>         TAG *
> }
>
> Sean
>
>
> Sean McGrath
> http://seanmcgrath.blogspot.com
>
>
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
>
>


-- 
----
Raw
http://dannyayers.com





 

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

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