[Laszlo-checkins] r10064 - in openlaszlo/trunk: docs/src/xsl lps/components/base
dda@openlaszlo.org
dda at openlaszlo.org
Fri Jun 27 10:20:44 PDT 2008
Author: dda
Date: 2008-06-27 10:20:38 -0700 (Fri, 27 Jun 2008)
New Revision: 10064
Modified:
openlaszlo/trunk/docs/src/xsl/js2doc-comment2dbk.xsl
openlaszlo/trunk/lps/components/base/basetabs.lzx
Log:
Change 20080627-dda-j by dda at lester.local on 2008-06-27 13:02:42 EDT
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc4
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: extend syntax for internal <a> links that are navigated without opening frame.
New Features:
Bugs Fixed: html generated from lzx files: target attribute of <a> tag not handled correctly by doctools
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: liorio (pending)
Documentation:
Release Notes:
Details:
Apparently by design, <a> entries have two forms:
<a href="url">
and
<a href="#id">
target=.... is ignored in both of these forms (!)
The first of these forms always opens a new window, the
second of these forms navigates within the frame.
This is apparently done this way because the <a> is converted
to a <ulink> or <link> tag known by docbook, and that does
not seem to have a target= or equivalent.
So the answer is to use the second form, but by itself, this
did not work (href="basetabpane" tries to find a nonexistant ID Components.basetabpane).
I extended the syntax so that if id contains a '.', it is considered the complete ID.
So <a href="#lz.basetabpane> should do it.
Test:
Changed <basetabsbar> class to use this form (included in this change), rebuilt, and tried it out.
Modified: openlaszlo/trunk/docs/src/xsl/js2doc-comment2dbk.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/js2doc-comment2dbk.xsl 2008-06-27 17:19:33 UTC (rev 10063)
+++ openlaszlo/trunk/docs/src/xsl/js2doc-comment2dbk.xsl 2008-06-27 17:20:38 UTC (rev 10064)
@@ -162,11 +162,20 @@
<xsl:apply-templates mode="html2dbk"/>
</xsl:template>
- <!-- internal link -->
+ <!-- internal link, e.g. href="#lz.basetab" or href="#name" -->
<xsl:template match="a[starts-with(@href, '#') and not(@onclick)]" mode="html2dbk">
- <link linkend="{$docid}.{substring-after(@href, '#')}">
- <xsl:apply-templates mode="html2dbk"/>
- </link>
+ <xsl:choose>
+ <xsl:when test="contains(@href, '.')">
+ <link linkend="{substring-after(@href, '#')}">
+ <xsl:apply-templates mode="html2dbk"/>
+ </link>
+ </xsl:when>
+ <xsl:otherwise>
+ <link linkend="{$docid}.{substring-after(@href, '#')}">
+ <xsl:apply-templates mode="html2dbk"/>
+ </link>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:template>
<!-- external link -->
Modified: openlaszlo/trunk/lps/components/base/basetabs.lzx
===================================================================
--- openlaszlo/trunk/lps/components/base/basetabs.lzx 2008-06-27 17:19:33 UTC (rev 10063)
+++ openlaszlo/trunk/lps/components/base/basetabs.lzx 2008-06-27 17:20:38 UTC (rev 10064)
@@ -235,8 +235,8 @@
<p><b>See Also:</b></p>
<ul>
<li>
- <a href="lz.basetab.html" target="_self"><basetab></a>,
- and <a href="lz.basetabs.html" target="_self"><basetabs></a>
+ <a href="#lz.basetab"><basetab></a>,
+ and <a href="#lz.basetabs"><basetabs></a>
</li>
</ul>
</text>
More information about the Laszlo-checkins
mailing list