[Laszlo-checkins] r11120 - in openlaszlo/trunk/docs/src: . reference reference/navbuilder xsl
dda@openlaszlo.org
dda at openlaszlo.org
Sun Sep 21 20:21:55 PDT 2008
Author: dda
Date: 2008-09-21 20:21:52 -0700 (Sun, 21 Sep 2008)
New Revision: 11120
Modified:
openlaszlo/trunk/docs/src/build.xml
openlaszlo/trunk/docs/src/reference/navbuilder/navxmlbuilder.rb
openlaszlo/trunk/docs/src/reference/postprocess.rb
openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl
Log:
Change 20080921-dda-E by dda at lester.local on 2008-09-21 23:10:01 EDT
in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc5
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Fix remaining refguide navbar issue - variables appearing in Class tab.
New Features:
Bugs Fixed: LPP-6588
Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: liorio (pending)
Documentation:
Release Notes:
Details:
LzCSSStyle and LzDeclaredEvent are global variables, not classes,
so they should not show up in the Classes tab.
The generation of classes.xml is done by post-processing the .html files.
There wasn't really a convenient way to identify class .html files from
variable .html files, so I added marker that is postprocessed by
the existing postprocess.rb script. To get this to fully work, some
fixes/changes needed to be made:
- generation of the marker.
- the postprocessing script must run before the navxmlbuilder.rb script
- postprocessing script now correctly converts <p class="postprocess-info-....">
into a stylized comment
- recognition of the stylized comment by navxmlbuilder.rb
Tests:
Rebuilt all of doc, and saw that LzCSSStyle and LzDeclaredEvent no longer show up.
Modified: openlaszlo/trunk/docs/src/build.xml
===================================================================
--- openlaszlo/trunk/docs/src/build.xml 2008-09-22 03:21:30 UTC (rev 11119)
+++ openlaszlo/trunk/docs/src/build.xml 2008-09-22 03:21:52 UTC (rev 11120)
@@ -847,6 +847,11 @@
<fileset dir="nav" includes="*.*"/>
</copy>
<exec executable="ruby" failonerror="true">
+ <arg value="${reference.src.dir}/postprocess.rb" />
+ <arg value="--inputdir" />
+ <arg value="${reference.output.dir}" />
+ </exec>
+ <exec executable="ruby" failonerror="true">
<arg value="${reference.src.dir}/navbuilder/navxmlbuilder.rb" />
<arg value="--inputdir" />
<arg value="${reference.output.dir}" />
@@ -858,11 +863,6 @@
<arg value="--inputdir" />
<arg value="${reference.output.dir}" />
</exec>
- <exec executable="ruby" failonerror="true">
- <arg value="${reference.src.dir}/postprocess.rb" />
- <arg value="--inputdir" />
- <arg value="${reference.output.dir}" />
- </exec>
</target>
<target name="reference.html.disclaimer" depends="init"
Modified: openlaszlo/trunk/docs/src/reference/navbuilder/navxmlbuilder.rb
===================================================================
--- openlaszlo/trunk/docs/src/reference/navbuilder/navxmlbuilder.rb 2008-09-22 03:21:30 UTC (rev 11119)
+++ openlaszlo/trunk/docs/src/reference/navbuilder/navxmlbuilder.rb 2008-09-22 03:21:52 UTC (rev 11120)
@@ -90,19 +90,30 @@
tag
end
+# items that are classes are marked by an 'info comment'
+# marker
+def is_marked_as_class(filename)
+ result = nil
+ open(filename) {|f|
+ f.each_line { |line|
+ line.chomp!
+ if (line =~ /@@ info is-class=/) then
+ result = true
+ break
+ end
+ }
+ }
+ result
+end
+
def javascriptname_for(filename)
js = nil;
open(filename) {|f|
f.each_line { |line|
line.chomp!
- if (line =~ /postprocess/) then
- end
- if (line =~ /@@.*original javascript name.*@@/) then
- js = line.sub(/.*@@.*= */, '').sub(/ *@@/, '')
+ if (line =~ /@@ info jsname=.*@@/) then
+ js = line.sub(/.*@@.*= */, '').sub(/ *@@ *-->/, '')
break
- elsif (line =~ /<p class="postprocess-info-jsname">/) then
- js = line.sub(/.*postprocess-info-jsname">/, '').sub(/<.*/, '')
- break
end
}
}
@@ -166,13 +177,15 @@
}
generate_index("{lz.*,Lz*,Debug*}.html", $outdir + "/classes.xml", "index") { | file,fullname |
name = nil
- jsname = javascriptname_for(fullname);
- if (jsname && jsname != "") then
- name = tagname_for(fullname);
- if (name) then
- name = 'lz.' + name;
- else
- name = jsname.sub(/\$lzc\$class_/, 'lz.').sub(/^Lz/, 'lz.');
+ if (is_marked_as_class(fullname)) then
+ jsname = javascriptname_for(fullname);
+ if (jsname && jsname != "") then
+ name = tagname_for(fullname);
+ if (name) then
+ name = 'lz.' + name;
+ else
+ name = jsname.sub(/\$lzc\$class_/, 'lz.').sub(/^Lz/, 'lz.');
+ end
end
end
name
Modified: openlaszlo/trunk/docs/src/reference/postprocess.rb
===================================================================
--- openlaszlo/trunk/docs/src/reference/postprocess.rb 2008-09-22 03:21:30 UTC (rev 11119)
+++ openlaszlo/trunk/docs/src/reference/postprocess.rb 2008-09-22 03:21:52 UTC (rev 11120)
@@ -81,10 +81,8 @@
outf.write('<hr/>')
line.gsub!(/<p class="postprocess-method-end([^>]*)>/, '')
line.gsub!(/<\/p>/, '')
- elsif (pptagname =~ /^info-$/)
- outf.write('<!-- @@ info ')
- line.gsub!(/<p class="postprocess-info-/, '')
- line.gsub!(/<\/p>/, ' @@ -->')
+ elsif (pptagname =~ /^info-/)
+ line.gsub!(/<p class="postprocess-info-([^"]*)">([^<]*)<\/p>/, '<!-- @@ info \1=\2 @@ -->')
elsif (pptagname =~ /^xlink-/)
# Create an external link to an anchor
line.gsub!(/<p class="postprocess-xlink-/, '<a href="')
Modified: openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl
===================================================================
--- openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl 2008-09-22 03:21:30 UTC (rev 11119)
+++ openlaszlo/trunk/docs/src/xsl/js2doc2dbk.xsl 2008-09-22 03:21:52 UTC (rev 11120)
@@ -194,6 +194,10 @@
<para role="postprocess-info-jsname">
<xsl:value-of select="$jsname"/>
</para>
+ <xsl:variable name="classcontents" select="class"/>
+ <xsl:if test="$classcontents">
+ <para role="postprocess-info-is-class"/>
+ </xsl:if>
<xsl:if test="$lzxname"><anchor id="{concat('tag.',$lzxname)}"/></xsl:if>
<xsl:processing-instruction name="dbhtml">
<xsl:text>filename="</xsl:text><xsl:value-of select="$filebase-for-output"/><xsl:text>.html"</xsl:text>
@@ -298,6 +302,7 @@
<xsl:variable name="events" select="&objectvalue;/property[@name='__ivars__' or @name='prototype']/object/property[doc/tag[@name='lzxtype']/text = 'event' and &isvisible;]" />
<xsl:variable name="initargs" select="class/initarg[not(contains(@access, 'private'))]" />
+
<!-- Initialization Arguments -->
<xsl:if test="$show.init.args">
<xsl:call-template name="describe-members">
More information about the Laszlo-checkins
mailing list