Skip to content

Commit

Permalink
Atom: output elements of "category" as attributes and not subnodes
Browse files Browse the repository at this point in the history
Fixes #54
  • Loading branch information
Chris00 committed Apr 6, 2015
1 parent 75eb352 commit fa8625f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/syndic_atom.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1388,10 +1388,10 @@ let author_to_xml a = person_to_xml "author" a
let contributor_to_xml a = person_to_xml "contributor" a

let category_to_xml (c: category) =
XML.Node(dummy_pos, atom "category",
[node_data (tag "term") c.term]
|> add_node_uri (tag "scheme") c.scheme
|> add_node_data (tag "label") c.label)
let attrs = [("", "term"), c.term]
|> add_attr_uri ("", "scheme") c.scheme
|> add_attr ("", "label") c.label in
XML.Node(dummy_pos, ((atom_ns, "category"), attrs), [])

let generator_to_xml (g: generator) =
let attr = [] |> add_attr ("", "version") g.version
Expand Down

0 comments on commit fa8625f

Please sign in to comment.