diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2017-06-20 00:04:54 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@edx.srv.br> | 2017-06-25 01:55:11 +0200 |
commit | 181b72469b27cc2f711525838463e98a0920161c (patch) | |
tree | 671e2cc4f601c6237fb00a95944a0b062ac5b2b2 /help3xsl/README.txt | |
parent | bd033eb897b7c43f1f6e8c35cc50d4a73ace84af (diff) |
Help-in-browser: several improvements
* tabs for Contents/Index/Search
* product version (6.0, 5.3, 5.2, etc...)
* capable to receive URL from LibreOffice help call
(need to change help url in sfx2/:
protocol://<host>/index.html?<params>
Change-Id: I2244336ea47cdb923884ae97b9f4a586d85ec706
Reviewed-on: https://gerrit.libreoffice.org/39227
Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Diffstat (limited to 'help3xsl/README.txt')
-rw-r--r-- | help3xsl/README.txt | 113 |
1 files changed, 36 insertions, 77 deletions
diff --git a/help3xsl/README.txt b/help3xsl/README.txt index 2d7b87af2a..c26d9152f7 100644 --- a/help3xsl/README.txt +++ b/help3xsl/README.txt @@ -2,27 +2,23 @@ Helpcontent displayed in a browser directly from XML ----------------------------------------------------------------- -This folder contains components for displaying the Helpcontent2 XML -pages (XHP) from a webserver and also directly rendered in a modern -browser. +This README shows how to display Helpcontent2 XML pages (XHP) directly rendered in a modern browser. ----------------------------------------------------------------- Background ----------------------------------------------------------------- -The XML files must be transformed into HTML files with the help of -a style sheet file (XSL). +The XML files must be transformed into HTML files with the help of a style sheet file (XSL). -In the current helpcontent2, the processing is done in xmlhelp/ -module, an ancient XSLT processor developed circa 2005 -(OpenOffice.org 1.5) +In the current helpcontent2, the processing is done in xmlhelp/ module, an ancient XSLT processor developed circa 2005 (OpenOffice.org 1.5) -Modern browsers such as Firefox, Chrome and Rekonq are capable to -execute the transformation direcly in the client, by getting an URL -that returns a XML file that contains the reference of the necessary -XSL style sheet. +Modern browsers such as Firefox, Chrome and Rekonq are capable to execute the transformation direcly in the client, by getting an URL that returns a XML file that contains the reference of the necessary XSL style sheet. -This is the objective of this exercise. +How to display Helpcontent2 in a browser + +1. Open the browser +2. Open the file index.html in source/ folder +3. Navigate in pages ----------------------------------------------------------------- File descriptions @@ -32,84 +28,47 @@ default.css: ------------- the cascading style sheet for HTML formatting. -index.html: ------------ -A dummy entry web page in the root folder of the server. - online_transform.xsl: -------------------- -the XSL transform file. This file is a modification of -xmlhelper/util/main_transform.xsl, which was designed for xmlhelp -XSL processor. +the XSL transform file. Transform XHP files into HTML files. -The XSLT online_transform.xsl is highly parametrizable and has params -and variables ready to handle the proper paths and URLs of the server. +This file is a modification of xmlhelper/util/main_transform.xsl, which was designed for xmlhelp XSL processor. ------------------------------------------------------------------ -How to build the help website ------------------------------------------------------------------ +help.js +------- +This javascript file: +1. modifies href attributes in <a> of #DisplayArea to handle &DbPAR and &System params +2. picks the bookmarks file and displays in #BottomLeft <div> area. +3. Reads URL params. -Each XHP file of helpcontent2/ must have a reference to the XSL file -online_transform.xsl, placed in the root folder of the help website. +----------------------------------------------------------------- +New ‘Object’ tag +----------------------------------------------------------------- -Therefore it is necessary to copy all XHP files in a temporary folder -and change the first line, through the script in addxsl2xhp.sh +The filter online_transform.xsl now support the <object> tag defined for XHP files to allow a generic object in the browser. The <object> tag now maps to the folowing HTML5 tags: +Maps to HTML5 <video> tag: -Media files: Media files in helpcontent2 are located in module -icons-themes/ . It is necessary to create a media/ folder in the -webserver and copy the icon-themes folders and files in the right place. +<section id="video"> + <object id="1232312" type ="video/ogg" data="movies/testvideo.ogv" height="480px" width="640px"/> +</section> -But media in XHP files also depends on the icon theme defined in the -LibreOffice View options. This issue is not addressed at the moment. +Maps to HTML5 <audio> tag: +<section id="audio"> + <object id="1232312" type ="audio/ogg" data="audio/testaudio.wav" height="" width=""/> +</section> -XHP file modified by addxsl2xml.sh script must exist in text/ folder -in the root folder of the webserver. +Maps to HTML5 <object> tag: + + <object id="1232312" type ="{mimetype}" data="object/testobject.swf" height="" width=""/> ----------------------------------------------------------------- -Folder layout. +How to build the LibreOffice Browser help ----------------------------------------------------------------- -Root folder - / - default.css - online_transform.xsl - index.html - media/ - text/ - - -Notes: -1) The folder text/ is exactly the same as in helpcontent2/ minus the -first line. The first line has the <xml> declaration followed by the -<xsl> declaration. NOTHING MORE. - -2) the online_transform.xsl is main_transform.xsl of HC2 modified to -accomodate the layout of the screen, It has 4 <div> hooked in each of -the 4 corners of the browser screen to allow resizing. - -3) the lower-right <div> displays the help content - -4) the upper-left <div> has entries to change help books/modules - -5) the upper right <div> is available to place a search mechanism - -6) the lower-left <div> is available to inser a index with javascript - -7) index.html is just a top landing page. - -8) default.css is the css used in helpconten2/languages - -9) plenty of simplification/tweak is possible in the XSLT. +1) run help-to-html.sh in helpcontent2/help3xsl/ folder. A previous language build must exist in workdir/HelpTranslatePartHelp/ . +The script will build all existing languages available in this folder. See help-to-html.sh script and adjust path. -10) The whole HC can be tranformed in html with XSLTPROC or any other -XSL processor, provided the reference to the XSL file is fixed, and -the xsl file be aware of the specifics of the XSL processor. -11) Help pages can be acessed by -http://<url>/help_file.xhp#<bookmark | section | whatever ID> +2) copy folder html/ to your root web server. -12) Works with Firefox, Chrome, Rekonq. MS Edge does not understand -xml+xsl at first glance, likely to need some config, I guess. -13) References to media are incomplete. That will require a change -in the urls of the media inside the help pages, thus forking from HC2 |