Code Monkey home page Code Monkey logo

atom-validation-for-ejabberd-xml's Introduction

= 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 <[email protected]>
Website : http://www.cestari.info

atom-validation-for-ejabberd-xml's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

chinnurtb

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.