Page tree
Skip to end of metadata
Go to start of metadata

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.

Contents of the zip file

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»

Structure.xml file

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>.

Figure 1: Example of the structure.xml file
<?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
AttributeDescription
NameName of the element
Type

The available types are:

Article, Folder, Url, Resource (Documents)

ValuePointer to name of rendered html file in Pages folder, or resource in resource folder if type is resource
IsVisibleBool: 0 or 1 if the element is visible for end users in the handbook
ItemIdUnique Id for all elements. Can be used for integration logic.
ContextIdContext id of the element. Corresponds to the id in end user. Also name of rendered html file
CultureCodeLanguage code of the element

Index.html file

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">. 

Figure 3: Example of the index.html file
<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

Pages folder contains all rendered html files. It could be a catalog, an article or a link.

Figure 4: Example of the pages.html file
<!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

  • Link to your book.
  • Type of the element
  • Last modified date
  • If an article has a link to an article B, and article B is found in the book. You will see the link as marked with yellow background in figure 4. If the article B is not found in the book, it will link with a hashtag, see red background in figure 4.
  • 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
[Folder]: if element is a folder. Could contains several elements
[Url]: if element is a link
[Resource]: if element is a document

[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
[EN] : english language code
[sv-SE]: swedish language code

Data-itemid

Unique ID for each element

Data-isvisible

[0]: if the element is not visible for end user
[1]: if the element is visible for end user

Data-lastwritedateLast modified date.
Data-isedited[0]: if the element has not been modified after publishing
[1]: if the element has been modified after publishing
Data-guidthe unique guide for the element. Only available if the element has contenttype collectiveagreement
Figure 6: Example of content div of a folder
<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

Resources folder

The resource folder contains all documents/attachments which are in used in the book. 

CollectiveAgreements

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

Figure 7: Example of the resource.xml file
<?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
AttributeDescription
AgreementName of main agreement
NameName of the resource
Type

The available types are: CollectiveAgreement

ValuePointer to name of rendered html file in CollectiveAgreements folder
GuidThe unique GUID for the resource



Figure 9: Example of content div of a collective agreement
<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.

  • No labels