github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

cstar / atom-validation-for-ejabberd-xml

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 4
    • 0
  • Source
  • Commits
  • Network (0)
  • Issues (0)
  • Downloads (0)
  • Wiki (1)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Branches (1)
    • master ✓
  • Tags (0)
Sending Request…
Enable Donations

Pledgie Donations

Once activated, we'll place the following badge in your repository's detail box:
Pledgie_example
This service is courtesy of Pledgie.

atom validation for ejabberd xml — Read more

  cancel

  cancel
  • Private
  • Read-Only
  • HTTP Read-Only

This URL has Read+Write access

Added checks for the finer details of the RFC : 
cstar (author)
Mon Jan 12 04:32:59 -0800 2009
commit  1050f6d77612c52d0be0cebbeaeb9502770276e4
tree    2e5e44c366fa26250f7c89664b0a96ce9bd5b9e1
parent  08a8fc3eb98d61266f8da717ed86c0623d4783bb
atom-validation-for-ejabberd-xml /
name age
history
message
file README Mon Jan 12 04:32:59 -0800 2009 Added checks for the finer details of the RFC :... [cstar]
file atom.erl Mon Jan 12 04:32:59 -0800 2009 Added checks for the finer details of the RFC :... [cstar]
file node_atom.erl Fri Jan 09 06:22:48 -0800 2009 Added node_atom New node type enforcing atom p... [cstar]
file sam.atom Fri Jan 09 05:16:52 -0800 2009 real first commit. Most of the atom features ar... [cstar]
file tim.atom Fri Jan 09 05:16:52 -0800 2009 real first commit. Most of the atom features ar... [cstar]
README
= atom_ejabberd =

This bit of code is designed to validate pubsub (http://xmpp.org/extensions/xep-0060.html) atom 
(http://www.ietf.org/rfc/rfc4287.txt) entry payload.

== USAGE ==

atom:check(Payload) returns valid | {invalid, first_error_message}

Payload is an ejabberd xmlelement tuple.

Also included is a node_atom enforcing atom.

You need to have the xml and xml_stream modules from ejabberd in your BEAM path for parsing.

https://svn.process-one.net/ejabberd/trunk/src/xml_stream.erl
https://svn.process-one.net/ejabberd/trunk/src/xml.erl

== Building ==

Do it manually with erlc. I may provide a build script someday.

== Notes ==

It only checks entries and not feeds. It is designed as a server component that receives entries for publishing.

Namespaces should be handled well as long as atom itself is the base namespace. (no <atom:entry>)

== A volontary step away from the atom spec ==

I have decided not to check for atom:author, even though the entry is not in a feed, as XMPP pubsub makes it pretty 
clear who's actually publishing.

== TODO ==

There are few bits and pieces not implemented yet. For instance :

 - dates are not validated

 - IRI are not checked as being valid

 - emails are not validated either

 - atom:source is weakly checked (it just accepts it as is)

 - better handle the namespacing / provide an extension hook to check foreign namespaces

Integrate with https://svn.process-one.net/ejabberd-modules/atom_pubsub/trunk/

build script

== Testing ==

The EUnit unit tests provide good coverage.

sam.atom and tim.atom are sample entries from Sam Ruby and Tim Bray's atom feed. I used them for testing (check out 
atom:check_entry() )

== License == 

Licensed under the EPL

== Author ==

Eric Cestari <eric+atom@ohmforce.com>
Website : http://www.cestari.info
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server