Difference between revisions of "Article Format"
(Created page with '== 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 (headlin…') |
|||
Line 24: | Line 24: | ||
To use the Article Meta Data you have to define a flag when opening a zimfile, so the zimlib is configured to include the Article Text into Article Meta Data before returning the data. | To use the Article Meta Data you have to define a flag when opening a zimfile, so the zimlib is configured to include the Article Text into Article Meta Data before returning the data. | ||
Revision as of 11:15, 16 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...).
- 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 ZIM File Format#Title_pointer_list (titlePtrPos) for details).
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.
By default the Meta Data can be non-existant or empty.
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 use the Article Meta Data you have to define a flag when opening a zimfile, so the zimlib is configured to include the Article Text into Article Meta Data before returning the data.