[Laszlo-checkins] r9747 - in openlaszlo/trunk/docs/src: reference xsl
dda@openlaszlo.org
dda at openlaszlo.org
Tue Jun 17 19:44:00 PDT 2008
Author: dda
Date: 2008-06-17 19:43:55 -0700 (Tue, 17 Jun 2008)
New Revision: 9747
Modified:
openlaszlo/trunk/docs/src/reference/postprocess.rb
openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl
Log:
Change 20080617-dda-w by dda at 33.sub-75-193-82.myvzw.com on 2008-06-17 21:26:35 EDT
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc4
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Add links from attribute category types to info-attributes.html
New Features:
Bugs Fixed: LPP-6088
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: liorio (pending)
Documentation:
Release Notes:
Details:
The standard ways to link appear to only link to
anchors within the same file, or to another file but
at the top. A workaround found on the web requires docbook 5,
which we're not ready to go to yet. So this change uses the
ruby postprocess hook to insert the <a> entry.
Tests:
rebuilt doc and checked links for various attributes
for example, see the Category column for
attributes in <node> and <view>.
Modified: openlaszlo/trunk/docs/src/reference/postprocess.rb
===================================================================
--- openlaszlo/trunk/docs/src/reference/postprocess.rb 2008-06-18 02:43:40 UTC (rev 9746)
+++ openlaszlo/trunk/docs/src/reference/postprocess.rb 2008-06-18 02:43:55 UTC (rev 9747)
@@ -81,6 +81,10 @@
outf.write('<hr/>')
line.gsub!(/<p class="postprocess-method-end([^>]*)>/, '')
line.gsub!(/<\/p>/, '')
+ elsif (pptagname =~ /^xlink-/)
+ # Create an external link to an anchor
+ line.gsub!(/<p class="postprocess-xlink-/, '<a href="')
+ line.gsub!(/<\/p>/, '</a>')
else
foundthis = false
end
Modified: openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl 2008-06-18 02:43:40 UTC (rev 9746)
+++ openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl 2008-06-18 02:43:55 UTC (rev 9747)
@@ -1523,11 +1523,24 @@
[bshine 2007.11.04]
-->
<entry role="attrcat">
+ <!-- Want the equivalent of:
+ <a href="${reference}info-attributes.html#readonly">readonly</a>
+ but this is not recognized (need to run xref.xsl templates?)
+ Nor do xlink or olink solve this, so we'll postprocess it.
+ -->
<xsl:choose>
- <xsl:when test="&final; and ($isinstancevar or $isinitarg)">initialize-only</xsl:when>
- <xsl:when test="&readonly;">readonly</xsl:when>
- <xsl:when test="not(&unwritable;) and $isinstancevar">read/write</xsl:when>
- <xsl:when test="not(&unwritable;) and &virtual;">read/write (virtual)</xsl:when>
+ <xsl:when test="&final; and ($isinstancevar or $isinitarg)">
+ <para role="postprocess-xlink-info-attributes.html#final">initialize-only</para>
+ </xsl:when>
+ <xsl:when test="&readonly;">
+ <para role="postprocess-xlink-info-attributes.html#readonly">readonly</para>
+ </xsl:when>
+ <xsl:when test="not(&unwritable;) and $isinstancevar">
+ <para role="postprocess-xlink-info-attributes.html#setter">read/write</para>
+ </xsl:when>
+ <xsl:when test="not(&unwritable;) and &virtual;">
+ <para role="postprocess-xlink-info-attributes.html#setter">read/write (virtual)</para>
+ </xsl:when>
<xsl:when test="not(&unwritable;) and not($isinstancevar) and not($issetter)">
<!-- happens when an old style class is encountered -->
<xsl:message>
@@ -1546,8 +1559,12 @@
<xsl:message>
Unknown attribute category (otherwise) for <xsl:value-of select="ancestor-or-self::property//@id" /> : <xsl:value-of select="@name" />
</xsl:message>
- <xsl:if test="&final;">final</xsl:if>
- <xsl:if test="&readonly;">readonly</xsl:if>
+ <xsl:if test="&final;">
+ <para role="postprocess-xlink-info-attributes.html#readonly">final</para>
+ </xsl:if>
+ <xsl:if test="&readonly;">
+ <para role="postprocess-xlink-info-attributes.html#readonly">readonly</para>
+ </xsl:if>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="&isevent;">
More information about the Laszlo-checkins
mailing list