Table of contents
This document is a technical description of how the zip file is built. The zip file contains all elements in the book and are rendered as html files. You must have basic knowledge in html and xml for implementation usage.
It's also possible to just open the index.html file to do a basic navigation through the content.
The zip file contains all articles, folders, documents and links in your handbook.
Ex: Content of the zip file
Articles/folders are rendered as html files and placed in the «Pages» folder. Structure of the book is converted to an xml document. The index.html contains all elements in the root level of the handbook. All documents used in the book are placed in the folder «Resources»
This file contains all information about the structure of the book. An example of the file is copied in figure 1. All <element> tag inside <contents> are contents of the book. Each <element> could be a file, link, article or folder. Figure 2 describes information of attributes inside <element>. An element with type="Folder" can contain several <element>.
<?xml version="1.0" encoding="utf-16"> <contents> <element name="..." type="Article" value="122415.html" isvisible="1" itemid=".20337." contextid="122312" /> <element name="..." type="Folder" value="122416.html" isvisible="1" itemid="20338" contextid="122416"> <element name="..." type="Article" value="122417.html" isvisible="0" itemid="20339" contextid="122417" /> <element name="..." type="Article" value="122421.html" isvisible="1" itemid="20342" contextid="122421" culturecode="nb-NO"/> </element> .... </contents |
Figure 2 | |
---|---|
Attribute | Description |
Name | Name of the element |
Type | The available types are: Article, Folder, Url, Resource (Documents) |
Value | Pointer to name of rendered html file in Pages folder, or resource in resource folder if type is resource |
IsVisible | Bool: 0 or 1 if the element is visible for end users in the handbook |
ItemId | Unique Id for all elements. Can be used for integration logic. |
ContextId | Context id of the element. Corresponds to the id in end user. Also name of rendered html file |
CultureCode | Language code of the element |
This file is the root level of the book. Open it in web browser to navigate. It contains links to all elements that belong to the root level, inside <div id="content">.
<html> <body> <div id="content"> <h1>Utvikler lokal 3</h1> <ul> <li><a href="Pages/122411.html">[name of element]</a></li> <li><a href="./Resources/101-04.doc">[name of a document]</a></li> ... </ul> </div </body> </html |
Pages folder contains all rendered html files. It could be a catalog, an article or a link.
<!DOCTYPE html> <html> <head>..</head> <body> <div id="realurl" data-target="http://[link to the book]/122414/external"> <a href="http://[link to the book]/122414/external" target="_blank">http://[link to the book]/122414/external</a> </div> <div id="metadata">..<div id="content" data-contenttype="article" data-lastmodified="2015-nov-05 12:12:15" data-contentid="122414" data-itemid="20338" data-culturecode="nb-NO" data-lastwritedate="2018-mar-21 11.55.39" data-isedited="1"> ...[body of the article] <a href="100882.html">[name of article]</a> <a href="#">[name of not found article]</a> </div> </body> </html> |
Each rendered html file has the following information
The most important information is inside the <div id="content">. Figure 5 describe information about the attributes inside content div element. If current element is a folder, it should contain a list of links to underlying elements, more detail in figure 6
Figure 5 | ||
---|---|---|
Attribute | Description | |
Data-contenttype | [Article]: if element is an article [collectiveagreement]: if element is a collective agreement | |
Data-lastmodified | Officially modified date of active version | |
Data-contentid | Unique ID of the rendered page, same as contextid in table 2 | |
data-culturecode | [nb-NO]: language code of the element, norwegian | |
Data-itemid | Unique ID for each element | |
Data-isvisible | [0]: if the element is not visible for end user | |
Data-lastwritedate | Last modified date. | |
Data-isedited | [0]: if the element has not been modified after publishing [1]: if the element has been modified after publishing | |
Data-guid | the unique guide for the element. Only available if the element has contenttype collectiveagreement |
<div id="content" data-contenttype="folder" data-lastmodified="2015-nov-05 12:12:15" data-contentid="122416" data-itemid="20338" data-culturecode="nb-NO" data-isvisible="1" data-lastwritedate="2017-feb-20 13.48.58" data-isedited="1"> <h1>[Name of the folder]</h1> <ul> <li><a href="122421.html">[name of the element]</a></li> </ul> </div |
The resource folder contains all documents/attachments which are in used in the book.
If you do have collective agreements in your handbook, this will also be exported as from version 6.11.10.
You will get an extra folder called CollectiveAgreements, and a file called resource.xml
<?xml version="1.0" encoding="utf-8"?> <resources> <element itemid="39"> <resource agreement="Agreement 1" name="..." type="CollectiveAgreement" value="419fa023-e822-4022-a3b4-bace3ba88340.html" guid="419fa023-e822-4022-a3b4-bace3ba88340" /> <resource agreement="Agreement 2" name="..." type="CollectiveAgreement" value="c5e8743f-7450-44e7-a9f1-524baa497c54.html" guid="c5e8743f-7450-44e7-a9f1-524baa497c54" /> </element> <element itemid="40"> <resource agreement="Agreement 2" name="..." type="CollectiveAgreement" value="c5e8743f-7450-44e7-a9f1-524baa497c54.html" guid="c5e8743f-7450-44e7-a9f1-524baa497c54" /> </element> </resources> |
The element node (the article) has a list of resources. Each resource is in this case a specific agreement. The attributes for the resource is documented in figure 7.
Figure 8 | |
---|---|
Attribute | Description |
Agreement | Name of main agreement |
Name | Name of the resource |
Type | The available types are: CollectiveAgreement |
Value | Pointer to name of rendered html file in CollectiveAgreements folder |
Guid | The unique GUID for the resource |
<div id="content" data-contenttype="collectiveagreement" data-lastmodified="2015-nov-05 12:12:15" data-guid="41f2eb6d-6c18-4327-8ed5-9be20b11c91d" data-culturecode="nb-NO" data-isvisible="1" data-lastwritedate="2017-feb-20 13.48.58" data-isedited="1"> .... [body of the article] </div |
Figure 5 describes information about the attributes inside content div element.