xml_composer submodule¶
This module contains composers to allow creation of XML for URN:NBN, so you don’t have to create XML by hand.
- See:
- class cz_urnnbn_api.xml_composer.MonographComposer(**kwargs)¶
Bases: kwargs_obj.kwargs_obj.KwargsObj
Compostition class for Monograph publications.
- title¶
str, required – Title of the publication.
- subtitle¶
str – Subtitle of the publication.
- ccnb¶
str – CCNB number.
- isbn¶
str – ISBN string. You should validate this first.
- other_id¶
str – Useful for UUID and so on..
- document_type¶
str – Electronic? Scan?
- digital_born¶
bool – Was the publication digitally born, or is it scan?
str – Author of the publication.
- publisher¶
str – Publishers name.
- place¶
str – Place where the publication was published (usually city).
- year¶
str – Year when the publication was published.
- format¶
str, required – PDF? EPUB?
- to_xml_dict()¶
Compose hierarchical structure from ordered dicts, which will hold the XML.
Returns: Structure from ordered dicts. Return type: odict
- to_xml()¶
Convert itself to XML string.
Returns: XML. Return type: str
- class cz_urnnbn_api.xml_composer.MultiMonoComposer(**kwargs)¶
Bases: cz_urnnbn_api.xml_composer.MonographComposer
Composition class for Multi monograph XMLs for URN:NBN.
- title¶
str, required – Title of the publication.
- volume_title¶
str, required – Title of the whole volume.
- subtitle¶
str – Subtitle of the publication.
- ccnb¶
str – CCNB number.
- isbn¶
str – ISBN string. You should validate this first.
- other_id¶
str – Useful for UUID and so on..
- document_type¶
str – Electronic? Scan?
- digital_born¶
bool – Was the publication digitally born, or is it scan?
str – Author of the publication.
- publisher¶
str – Publishers name.
- place¶
str – Place where the publication was published (usually city).
- year¶
str – Year when the publication was published.
- format¶
str, required – PDF? EPUB?
- to_xml_dict()¶
Convert itself to XML string.
Returns: XML. Return type: str