Difference between revisions of "Article Format"
Line 1: | Line 1: | ||
== Article Text == | == Article Text == | ||
Articles to be parsed and shown directly by the ZIM reader are stored as HTML body, without any layout except the formattings used in the article text (headlines, tables, images...). | Articles to be parsed and shown directly by the ZIM reader are stored as HTML body, without any layout except the formattings used in the article text (headlines, tables, images...). | ||
Shortly, the A namespace contains the ''visible'' data of an article. | |||
* '''Namespace:''' A | * '''Namespace:''' A | ||
Line 7: | Line 9: | ||
== Meta Data == | == Meta Data == | ||
Some publisher want to provide additional information for the reader application to individual articles, such as HTML Meta Data or a special layout around the article text. | Some publisher want to provide additional header information for the reader application to individual articles, such as HTML Meta Data or a special layout around the article text. | ||
Shortly, the B namespace contains the ''invisible'' part of an article. | |||
By default the Meta Data can be non-existant or empty. | By default the Meta Data can be non-existant or empty. | ||
Typically the article text and article meta data are linked to each other by having the same URL. | |||
* '''Namespace:''' B | * '''Namespace:''' B | ||
Line 23: | Line 27: | ||
Links inside articles always use the A namespace to refer to other articles, so the zimlib does provide Article Text by default for any requests of namespace A. | Links inside articles always use the A namespace to refer to other articles, so the zimlib does provide Article Text by default for any requests of namespace A. | ||
To use the | To request the pure article data from namespace A use the <tt>getData()</tt> method in zimlib. | ||
To get an article included inside the layoutpage and with meta data use the <tt>getPage()</tt> method in zimlib. |
Revision as of 14:12, 17 October 2010
Article Text
Articles to be parsed and shown directly by the ZIM reader are stored as HTML body, without any layout except the formattings used in the article text (headlines, tables, images...).
Shortly, the A namespace contains the visible data of an article.
- Namespace: A
- Path: /A/URL
- whereas URL is often identical to the Article Name, but this is not a requirement (see URL pointer list and title pointer list for details).
Meta Data
Some publisher want to provide additional header information for the reader application to individual articles, such as HTML Meta Data or a special layout around the article text.
Shortly, the B namespace contains the invisible part of an article.
By default the Meta Data can be non-existant or empty.
Typically the article text and article meta data are linked to each other by having the same URL.
- Namespace: B
- Path: /B/URL
- whereas /B/URL is the Meta Data used for /A/URL.
Content Inclusion
The Article Text needds to be combined with Article Meta Data, therefore the Meta Data needs to define a placeholder where the Article Text has to be inserted.
Fetching Article Text vs. Article Meta Data
Links inside articles always use the A namespace to refer to other articles, so the zimlib does provide Article Text by default for any requests of namespace A.
To request the pure article data from namespace A use the getData() method in zimlib.
To get an article included inside the layoutpage and with meta data use the getPage() method in zimlib.