Skip to content

Commit

Permalink
Added documentation for OnixMeta class
Browse files Browse the repository at this point in the history
  • Loading branch information
titusz committed Jul 20, 2015
1 parent 4810fb9 commit ae60be6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/onixcheck/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,20 @@ def get_validator(self):


class OnixMeta(object):
"""A simple class representing low level onix file meta data."""
"""Read and detext minimal ONIX file properties needed for validation.
Onix XML files may or may not have `release` and `xmlns` attributes on
their root element. OnixMeta.from_file(infile) will detect Onix Version
and Style and also patch the root element with the appropriate namespace
needed for validation.
:param str xml_version: XML Version as str ("1.0").
:param str xml_encoding: XML Encoding as str ("utf-8").
:param str onix_version: Onix Version as string ("2.1" or "3.0")
:param str onix_style: Onix Style as str ("short" or "reference")
:param dict namespaces: dict of str with namspaces from the root element
"""

V21 = '2.1'
V30 = '3.0'
Expand Down

0 comments on commit ae60be6

Please sign in to comment.