diff options
author | Jan Holesovsky <kendy@collabora.com> | 2016-11-07 13:17:11 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-11-07 13:17:11 +0100 |
commit | 433c4c0477c6dfcde68ed5b1eb98f1811095f050 (patch) | |
tree | 32cf005bfe85673b9c104f0b2d17d24c6047436e | |
parent | 677759f9f3b94cc73b78f4fd21d10e36a96fc59b (diff) |
Change '/text' to just 'text' on many places.
With this, the pages start appearing even locally with just pointing the
browser to file:///.../help_git_repo/source/index.html
-rwxr-xr-x | source/get_bookmark.sh | 18 | ||||
-rw-r--r-- | source/get_bookmark.xsl | 12 | ||||
-rw-r--r-- | source/index.html | 22 | ||||
-rw-r--r-- | source/online_transform.xsl | 22 |
4 files changed, 41 insertions, 33 deletions
diff --git a/source/get_bookmark.sh b/source/get_bookmark.sh index a64ee2402f..af2edd88d5 100755 --- a/source/get_bookmark.sh +++ b/source/get_bookmark.sh @@ -11,54 +11,54 @@ stub2='</ul></body></html>' ffile=bookmark_calc.html rm -f $ffile echo $stub1 > $ffile -find ../source/text/scalc -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile +find text/scalc -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile echo $stub2 >> $ffile ffile=bookmark_writer.html rm -f $ffile echo $stub1 > $ffile -find ../source/text/swriter -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile +find text/swriter -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile echo $stub2 >> $ffile ffile=bookmark_draw.html rm -f $ffile echo $stub1 > $ffile -find ../source/text/sdraw -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile +find text/sdraw -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile echo $stub2 >> $ffile ffile=bookmark_impress.html rm -f $ffile echo $stub1 > $ffile -find ../source/text/simpress -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile +find text/simpress -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile echo $stub2 >> $ffile ffile=bookmark_shared.html rm -f $ffile echo $stub1 > $ffile -find ../source/text/shared -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile +find text/shared -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile echo $stub2 >> $ffile ffile=bookmark_chart.html rm -f $ffile echo $stub1 > $ffile -find ../source/text/schart -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile +find text/schart -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile echo $stub2 >> $ffile ffile=bookmark_math.html rm -f $ffile echo $stub1 > $ffile -find ../source/text/smath -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile +find text/smath -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile echo $stub2 >> $ffile ffile=bookmark_basic.html rm -f $ffile echo $stub1 > $ffile -find ../source/text/sbasic -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile +find text/sbasic -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile echo $stub2 >> $ffile ffile=bookmark_base.html rm -f $ffile echo $stub1 > $ffile -find ../source/text/shared/explorer/database -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile +find text/shared/explorer/database -type f -name "*.xhp" -exec xsltproc get_bookmark.xsl {} + >> $ffile echo $stub2 >> $ffile diff --git a/source/get_bookmark.xsl b/source/get_bookmark.xsl index b3e65ebfe3..3b1be23b0f 100644 --- a/source/get_bookmark.xsl +++ b/source/get_bookmark.xsl @@ -23,7 +23,17 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> # Variables and Parameters # ############################ //--> -<xsl:variable name="filename" select="/helpdocument/meta/topic/filename"/> +<xsl:variable name="fname" select="/helpdocument/meta/topic/filename"/> +<xsl:variable name="filename"> + <xsl:choose> + <xsl:when test="starts-with($fname, '/')"> + <xsl:value-of select="substring($fname, 2)"/> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$fname"/> + </xsl:otherwise> + </xsl:choose> +</xsl:variable> <!-- Product brand variables used in the help files --> <xsl:variable name="brand1" select="'$[officename]'"/> <xsl:variable name="brand2" select="'$[officeversion]'"/> diff --git a/source/index.html b/source/index.html index 11e30200bd..90b5726f3c 100644 --- a/source/index.html +++ b/source/index.html @@ -19,15 +19,15 @@ <div id="TopLeft"> <table> <tr> - <td class="topmenu"><p onclick="displayResult('../source/text/scalc/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=calc','calc')">Calc</p></td> - <td class="topmenu"><p onclick="displayResult('../source/text/swriter/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=writer','writer')">Writer</p></td> - <td class="topmenu"><p onclick="displayResult('../source/text/simpress/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=simpress','impress')">Impress</p></td> - <td class="topmenu"><p onclick="displayResult('../source/text/sdraw/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=sdraw','draw')">Draw</p></td> - <td class="topmenu"><p onclick="displayResult('../source/text/schart/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=schart','chart')">Chart</p></td> - <td class="topmenu"><p onclick="displayResult('../source/text/sbasic/shared/main0001.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=sbasic','basic')">Basic</p></td> - <td class="topmenu"><p onclick="displayResult('../source/text/smath/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=smath','math')">Math</p></td> - <td class="topmenu"><p onclick="displayResult('../source/text/shared/explorer/database/main.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=shared','shared')">Base</p></td> - <td class="topmenu"><p onclick="displayResult('../source/text/shared/guide/main.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=shared','shared')">Guide</p></td> + <td class="topmenu"><p onclick="displayResult('text/scalc/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=calc','calc')">Calc</p></td> + <td class="topmenu"><p onclick="displayResult('text/swriter/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=writer','writer')">Writer</p></td> + <td class="topmenu"><p onclick="displayResult('text/simpress/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=simpress','impress')">Impress</p></td> + <td class="topmenu"><p onclick="displayResult('text/sdraw/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=sdraw','draw')">Draw</p></td> + <td class="topmenu"><p onclick="displayResult('text/schart/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=schart','chart')">Chart</p></td> + <td class="topmenu"><p onclick="displayResult('text/sbasic/shared/main0001.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=sbasic','basic')">Basic</p></td> + <td class="topmenu"><p onclick="displayResult('text/smath/main0000.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=smath','math')">Math</p></td> + <td class="topmenu"><p onclick="displayResult('text/shared/explorer/database/main.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=shared','shared')">Base</p></td> + <td class="topmenu"><p onclick="displayResult('text/shared/guide/main.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=shared','shared')">Guide</p></td> </tr> </table> </div> @@ -39,9 +39,9 @@ if (window.location.href.indexOf('?') && getParameterByName('page')) { var language = getParameterByName("Language"); var system = getParameterByName("System"); var usedb = getParameterByName("UseDB"); - displayResult('../source/text/' + getParameterByName('page') + '&DbPAR='+module+'&Language='+language+'&System='+system+'&UseDB='+usedb); + displayResult('text/' + getParameterByName('page') + '&DbPAR='+module+'&Language='+language+'&System='+system+'&UseDB='+usedb); } else { - displayResult('../source/text/shared/main0108.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=shared','shared'); + displayResult('text/shared/main0108.xhp?Language=en-US&System=WIN&UseDB=no&DbPAR=shared','shared'); } </script> </body> diff --git a/source/online_transform.xsl b/source/online_transform.xsl index 2d18765016..b5f11579c4 100644 --- a/source/online_transform.xsl +++ b/source/online_transform.xsl @@ -110,7 +110,7 @@ <!-- parts of help and image urls --> <!--<xsl:variable name="help_url_prefix" select="'vnd.sun.star.help://'"/>--> -<xsl:variable name="help_url_prefix" select="'/'"/> +<xsl:variable name="help_url_prefix" select="''"/> <xsl:variable name="img_url_prefix" select="concat('/media',$imgtheme,'/')"/> <!-- <xsl:variable name="img_url_prefix" select="concat('vnd.libreoffice.image://',$imgtheme,'/')"/> --> <!--<xsl:variable name="urlpost" select=""/>--> @@ -159,15 +159,15 @@ <div id="TopLeft" style="display:none; position: fixed;top: 5px;left: 5px;"> <table> <tr> - <td class="topmenu"><a href="/text/scalc/main0000.xhp">Calc</a></td> - <td class="topmenu"><a href="/text/swriter/main0000.xhp">Writer</a></td> - <td class="topmenu"><a href="/text/simpress/main0000.xhp">Impress</a></td> - <td class="topmenu"><a href="/text/sdraw/main0000.xhp">Draw</a></td> - <td class="topmenu"><a href="/text/schart/main0000.xhp">Chart</a></td> - <td class="topmenu"><a href="/text/sbasic/shared/main0601.xhp">Basic</a></td> - <td class="topmenu"><a href="/text/smath/main0000.xhp">Math</a></td> - <td class="topmenu"><a href="/text/shared/explorer/database/main.xhp">Base</a></td> - <td class="topmenu"><a href="/text/shared/guide/main.xhp">Guide</a></td> + <td class="topmenu"><a href="text/scalc/main0000.xhp">Calc</a></td> + <td class="topmenu"><a href="text/swriter/main0000.xhp">Writer</a></td> + <td class="topmenu"><a href="text/simpress/main0000.xhp">Impress</a></td> + <td class="topmenu"><a href="text/sdraw/main0000.xhp">Draw</a></td> + <td class="topmenu"><a href="text/schart/main0000.xhp">Chart</a></td> + <td class="topmenu"><a href="text/sbasic/shared/main0601.xhp">Basic</a></td> + <td class="topmenu"><a href="text/smath/main0000.xhp">Math</a></td> + <td class="topmenu"><a href="text/shared/explorer/database/main.xhp">Base</a></td> + <td class="topmenu"><a href="text/shared/guide/main.xhp">Guide</a></td> </tr> </table> <div id="xmfile"><p class="infopage">This page is: <xsl:value-of select="$filename"/></p></div> @@ -433,7 +433,6 @@ <xsl:when test="@id='relatedtopics'"> <div class="relatedtopics"> - <!--<xsl:variable name="href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>--> <xsl:variable name="href"><xsl:value-of select="concat($urlpre,'text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable> <xsl:variable name="anchor"><xsl:value-of select="'related'"/></xsl:variable> <xsl:variable name="doc" select="document($href)"/> @@ -613,7 +612,6 @@ <xsl:template name="insert_howtoget"> <xsl:param name="linkhref" /> <xsl:variable name="archive" select="'shared'"/> - <!--<xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'shared/text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable>--> <xsl:variable name="tmp_href"><xsl:value-of select="concat($urlpre,'text/shared/00/00000004.xhp',$urlpost)"/></xsl:variable> <xsl:variable name="tmp_doc" select="document($tmp_href)"/> <table class="howtoget" width="100%" border="1" cellpadding="3" cellspacing="0"> |