[Laszlo-checkins] r8573 - in openlaszlo/trunk/docs/src: . nav reference/navbuilder

dda@openlaszlo.org dda at openlaszlo.org
Sun Apr 6 11:18:03 PDT 2008


Author: dda
Date: 2008-04-06 11:17:56 -0700 (Sun, 06 Apr 2008)
New Revision: 8573

Modified:
   openlaszlo/trunk/docs/src/build.xml
   openlaszlo/trunk/docs/src/nav/classes.xml
   openlaszlo/trunk/docs/src/nav/tags.xml
   openlaszlo/trunk/docs/src/nav/toc.xml
   openlaszlo/trunk/docs/src/reference/navbuilder/navxmlbuilder.rb
   openlaszlo/trunk/docs/src/reference/navbuilder/toccheck.rb
Log:
Change 20080406-dda-2 by dda at lester.local on 2008-04-06 13:39:47 EDT
    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Update navigation, and automatically gen most of navigation

New Features:

Bugs Fixed: LPP-5698

Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: liorio (pending)

Documentation:

Release Notes:

Details:
    - Incorporated ruby scripts to generate and check links into doc build:
      Currently, classes.xml and tags.xml are automatically generated by
      navxmlbuilder.rb.  The 'table of contents', toc.xml is not auto-generated,
      since its layout is not generated from sources.  But broken links are
      checked (by checktoc.rb) and gives an error if docs/src/nav/toc.xml needs
      to be updated.

    - Updated navigation .xml files to match latest classes and *.html generated.
      In theory, we don't need classes.xml and tags.xml in svn anymore since they
      are autogenerated, but we're keeping them for now in case anyone is missing
      ruby and needs to skip the ruby steps.

Tests:



Modified: openlaszlo/trunk/docs/src/build.xml
===================================================================
--- openlaszlo/trunk/docs/src/build.xml	2008-04-06 18:17:32 UTC (rev 8572)
+++ openlaszlo/trunk/docs/src/build.xml	2008-04-06 18:17:56 UTC (rev 8573)
@@ -808,7 +808,18 @@
       <copy todir="${reference.output.dir}">
           <fileset dir="nav" includes="*.*"/>
       </copy>
-      
+      <exec executable="ruby" failonerror="true">
+        <arg value="${reference.src.dir}/navbuilder/navxmlbuilder.rb" />
+        <arg value="--inputdir" />
+        <arg value="${reference.output.dir}" />
+        <arg value="--outputdir" />
+        <arg value="${reference.output.dir}" />
+      </exec>
+      <exec executable="ruby" failonerror="true">
+        <arg value="${reference.src.dir}/navbuilder/toccheck.rb" />
+        <arg value="--inputdir" />
+        <arg value="${reference.output.dir}" />
+      </exec>
   </target>
   
   <target name="reference.html.disclaimer" depends="init"

Modified: openlaszlo/trunk/docs/src/nav/classes.xml
===================================================================
--- openlaszlo/trunk/docs/src/nav/classes.xml	2008-04-06 18:17:32 UTC (rev 8572)
+++ openlaszlo/trunk/docs/src/nav/classes.xml	2008-04-06 18:17:56 UTC (rev 8573)
@@ -15,29 +15,30 @@
     <item href="LzCursor+dhtml+j2me+svg+swf7+swf8.html" title="LzCursor (dhtml j2me svg swf7 swf8)" />
     <item href="LzCursorInterface+dhtml+j2me+svg+swf7+swf8.html" title="LzCursorInterface (dhtml j2me svg swf7 swf8)" />
     <item href="LzCursorService+dhtml+j2me+svg+swf7+swf8.html" title="LzCursorService (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDataElement+dhtml+j2me+svg+swf7+swf8.html" title="LzDataElement (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDataNode+dhtml+j2me+svg+swf7+swf8.html" title="LzDataNode (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDataNodeMixin+dhtml+j2me+svg+swf7+swf8.html" title="LzDataNodeMixin (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDatapath+dhtml+j2me+svg+swf7+swf8.html" title="LzDatapath (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDatapointer+dhtml+j2me+svg+swf7+swf8.html" title="LzDatapointer (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDataProvider+dhtml+j2me+svg+swf7+swf8.html" title="LzDataProvider (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDataRequest+dhtml+j2me+svg+swf7+swf8.html" title="LzDataRequest (dhtml j2me svg swf7 swf8)" />
+    <item href="LzDataElement.html" title="LzDataElement" />
+    <item href="LzDataNode.html" title="LzDataNode" />
+    <item href="LzDataNodeMixin.html" title="LzDataNodeMixin" />
+    <item href="LzDatapath.html" title="LzDatapath" />
+    <item href="LzDatapointer.html" title="LzDatapointer" />
+    <item href="LzDataProvider.html" title="LzDataProvider" />
+    <item href="LzDataRequest.html" title="LzDataRequest" />
     <item href="LzDataSelectionManager+dhtml+j2me+svg+swf7+swf8.html" title="LzDataSelectionManager (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDataset+dhtml+j2me+svg+swf7+swf8.html" title="LzDataset (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDatasource+dhtml+j2me+svg+swf7+swf8.html" title="LzDatasource (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDataText+dhtml+j2me+svg+swf7+swf8.html" title="LzDataText (dhtml j2me svg swf7 swf8)" />
+    <item href="LzDataset.html" title="LzDataset" />
+    <item href="LzDatasource.html" title="LzDatasource" />
+    <item href="LzDataText.html" title="LzDataText" />
     <item href="LzDelegate.html" title="LzDelegate" />
     <item href="LzEvent.html" title="LzEvent" />
-    <item href="LzFocus+dhtml+j2me+svg+swf7+swf8.html" title="LzFocus (dhtml j2me svg swf7 swf8)" />
+    <item href="LzFocus.html" title="LzFocus" />
+    <item href="LzFocusClass.html" title="LzFocusClass" />
     <item href="LzFont.html" title="LzFont" />
     <item href="LzFormatter+dhtml+j2me+svg+swf7+swf8.html" title="LzFormatter (dhtml j2me svg swf7 swf8)" />
     <item href="LzFormatter+swf9.html" title="LzFormatter (swf9)" />
     <item href="LzGlobalMouse.html" title="LzGlobalMouse" />
     <item href="LzHistory+dhtml.html" title="LzHistory (dhtml)" />
     <item href="LzHistory+swf7+swf8+swf9.html" title="LzHistory (swf)" />
-    <item href="LzHTTPDataProvider+dhtml+j2me+svg+swf7+swf8.html" title="LzHTTPDataProvider (dhtml j2me svg swf7 swf8)" />
-    <item href="LzHTTPDataRequest+dhtml+j2me+svg+swf7+swf8.html" title="LzHTTPDataRequest (dhtml j2me svg swf7 swf8)" />
-    <item href="LzHTTPDatasource+dhtml+j2me+svg+swf7+swf8.html" title="LzHTTPDatasource (dhtml j2me svg swf7 swf8)" />
+    <item href="LzHTTPDataProvider.html" title="LzHTTPDataProvider" />
+    <item href="LzHTTPDataRequest.html" title="LzHTTPDataRequest" />
+    <item href="LzHTTPDatasource.html" title="LzHTTPDatasource" />
     <item href="LzIdle+swf9.html" title="LzIdle (swf9)" />
     <item href="LzIdleClass+dhtml+j2me+svg+swf7+swf8.html" title="LzIdleClass (dhtml j2me svg swf7 swf8)" />
     <item href="LzIdleClass+swf9.html" title="LzIdleClass (swf9)" />
@@ -47,20 +48,15 @@
     <item href="LzKeys+dhtml.html" title="LzKeys (dhtml)" />
     <item href="LzKeys+swf7+swf8+swf9.html" title="LzKeys (swf)" />
     <item href="LzKeys+swf9.html" title="LzKeys (swf9)" />
-    <item href="LzKeysClass+swf9.html" title="LzKeysClass (swf9)" />
     <item href="LzLayout.html" title="LzLayout" />
-    <item href="LzLazyReplicationManager+dhtml+j2me+svg+swf7+swf8.html" title="LzLazyReplicationManager (dhtml j2me svg swf7 swf8)" />
-    <item href="LzMiniNode+dhtml+j2me+svg+swf7+swf8.html" title="LzMiniNode (dhtml j2me svg swf7 swf8)" />
-    <item href="LzMiniNode_DataNode+dhtml+j2me+svg+swf7+swf8.html" title="LzMiniNode_DataNode (dhtml j2me svg swf7 swf8)" />
-    <item href="LzMiniNode_DataNode_DOM+dhtml+j2me+svg+swf7+swf8.html" title="LzMiniNode_DataNode_DOM (dhtml j2me svg swf7 swf8)" />
+    <item href="LzLazyReplicationManager.html" title="LzLazyReplicationManager" />
+    <item href="LzMiniNode.html" title="LzMiniNode" />
     <item href="LzModeManager+dhtml+j2me+svg+swf7+swf8.html" title="LzModeManager (dhtml j2me svg swf7 swf8)" />
     <item href="LzModeManager+swf9.html" title="LzModeManager (swf9)" />
     <item href="LzNode.html" title="LzNode" />
-    <item href="LzNode_DataNode+dhtml+j2me+svg+swf7+swf8.html" title="LzNode_DataNode (dhtml j2me svg swf7 swf8)" />
-    <item href="LzNode_DataNode_DOM+dhtml+j2me+svg+swf7+swf8.html" title="LzNode_DataNode_DOM (dhtml j2me svg swf7 swf8)" />
-    <item href="LzParam+dhtml+j2me+svg+swf7+swf8.html" title="LzParam (dhtml j2me svg swf7 swf8)" />
-    <item href="LzReplicationManager+dhtml+j2me+svg+swf7+swf8.html" title="LzReplicationManager (dhtml j2me svg swf7 swf8)" />
-    <item href="LzResizeReplicationManager+dhtml+j2me+svg+swf7+swf8.html" title="LzResizeReplicationManager (dhtml j2me svg swf7 swf8)" />
+    <item href="LzParam.html" title="LzParam" />
+    <item href="LzReplicationManager.html" title="LzReplicationManager" />
+    <item href="LzResizeReplicationManager.html" title="LzResizeReplicationManager" />
     <item href="LzScript.html" title="LzScript" />
     <item href="LzSelectionManager+dhtml+j2me+svg+swf7+swf8.html" title="LzSelectionManager (dhtml j2me svg swf7 swf8)" />
     <item href="LzState.html" title="LzState" />

Modified: openlaszlo/trunk/docs/src/nav/tags.xml
===================================================================
--- openlaszlo/trunk/docs/src/nav/tags.xml	2008-04-06 18:17:32 UTC (rev 8572)
+++ openlaszlo/trunk/docs/src/nav/tags.xml	2008-04-06 18:17:56 UTC (rev 8573)
@@ -62,13 +62,13 @@
     <item href="lz.datacombobox.html" title="datacombobox" />
     <item href="lz.datalabel.html" title="datalabel" />
     <item href="lz.datamarker.html" title="datamarker" />
-    <item href="LzDatapath+dhtml+j2me+svg+swf7+swf8.html" title="datapath (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDatapointer+dhtml+j2me+svg+swf7+swf8.html" title="datapointer (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDataProvider+dhtml+j2me+svg+swf7+swf8.html" title="dataprovider (dhtml j2me svg swf7 swf8)" />
-    <item href="LzDataRequest+dhtml+j2me+svg+swf7+swf8.html" title="datarequest (dhtml j2me svg swf7 swf8)" />
+    <item href="LzDatapath.html" title="datapath" />
+    <item href="LzDatapointer.html" title="datapointer" />
+    <item href="LzDataProvider.html" title="dataprovider" />
+    <item href="LzDataRequest.html" title="datarequest" />
     <item href="lz.dataseries.html" title="dataseries" />
-    <item href="LzDataset+dhtml+j2me+svg+swf7+swf8.html" title="dataset (dhtml j2me svg swf7 swf8)" />
-    <item href="LzHTTPDatasource+dhtml+j2me+svg+swf7+swf8.html" title="datasource (dhtml j2me svg swf7 swf8)" />
+    <item href="LzDataset.html" title="dataset" />
+    <item href="LzHTTPDatasource.html" title="datasource" />
     <item href="lz.datastyle.html" title="datastyle" />
     <item href="lz.datastylelist.html" title="datastylelist" />
     <item href="lz.datatip.html" title="datatip" />
@@ -93,8 +93,8 @@
     <item href="lz.horizontalaxis.html" title="horizontalaxis" />
     <item href="lz.hscrollbar.html" title="hscrollbar" />
     <item href="lz.html.html" title="html" />
-    <item href="LzHTTPDataProvider+dhtml+j2me+svg+swf7+swf8.html" title="httpdataprovider (dhtml j2me svg swf7 swf8)" />
-    <item href="LzHTTPDataRequest+dhtml+j2me+svg+swf7+swf8.html" title="httpdatarequest (dhtml j2me svg swf7 swf8)" />
+    <item href="LzHTTPDataProvider.html" title="httpdataprovider" />
+    <item href="LzHTTPDataRequest.html" title="httpdatarequest" />
     <item href="tag-i.html" title="i" />
     <item href="lz.image.html" title="image" />
     <item href="tag-img.html" title="img" />
@@ -131,7 +131,7 @@
     <item href="LzNode.html" title="node" />
     <item href="tag-p.html" title="p" />
     <item href="lz.param.html" title="param" />
-    <item href="LzParam+dhtml+j2me+svg+swf7+swf8.html" title="params (dhtml j2me svg swf7 swf8)" />
+    <item href="LzParam.html" title="params" />
     <item href="lz.piechart.html" title="piechart" />
     <item href="lz.piechartplotarea.html" title="piechartplotarea" />
     <item href="lz.plainfloatinglist.html" title="plainfloatinglist" />

Modified: openlaszlo/trunk/docs/src/nav/toc.xml
===================================================================
--- openlaszlo/trunk/docs/src/nav/toc.xml	2008-04-06 18:17:32 UTC (rev 8572)
+++ openlaszlo/trunk/docs/src/nav/toc.xml	2008-04-06 18:17:56 UTC (rev 8573)
@@ -129,22 +129,22 @@
     </category>
     
     <category title="Data">
-        <item title="datapath (LzDatapath)" href="LzDatapath+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="datapointer (LzDatapointer)" href="LzDatapointer+dhtml+j2me+svg+swf7+swf8.html" />
+        <item title="datapath (LzDatapath)" href="LzDatapath.html" />
+        <item title="datapointer (LzDatapointer)" href="LzDatapointer.html" />
         <item title="dataselectionmanager (LzDataSelectionManager)" href="LzDataSelectionManager+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="dataset (LzDataset)" href="LzDataset+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="datasource (LzDatasource)" href="LzDatasource+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="defaultdataprovider" href="defaultdataprovider+dhtml+j2me+svg+swf7+swf8.html" />        
-        <item title="httpdataprovider" href="httpdataprovider+dhtml+j2me+svg+swf7+swf8.html" />
+        <item title="dataset (LzDataset)" href="LzDataset.html" />
+        <item title="datasource (LzDatasource)" href="LzDatasource.html" />
+        <item title="defaultdataprovider" href="defaultdataprovider.html" />        
+        <item title="httpdataprovider" href="httpdataprovider.html" />
    <!--     <item title="LzConnectionDatasource" href="LzConnectionDatasource.html" />     -->
-        <item title="LzDataElement" href="LzDataElement+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="LzDataNode" href="LzDataNode+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="LzDataProvider" href="LzDataProvider+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="LzDataRequest" href="LzDataRequest+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="LzDataText" href="LzDataText+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="LzHTTPDataProvider" href="LzHTTPDataProvider+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="LzHTTPDataRequest" href="LzHTTPDataRequest+dhtml+j2me+svg+swf7+swf8.html" />
-        <item title="LzHTTPDatasource" href="LzHTTPDatasource+dhtml+j2me+svg+swf7+swf8.html" />        
+        <item title="LzDataElement" href="LzDataElement.html" />
+        <item title="LzDataNode" href="LzDataNode.html" />
+        <item title="LzDataProvider" href="LzDataProvider.html" />
+        <item title="LzDataRequest" href="LzDataRequest.html" />
+        <item title="LzDataText" href="LzDataText.html" />
+        <item title="LzHTTPDataProvider" href="LzHTTPDataProvider.html" />
+        <item title="LzHTTPDataRequest" href="LzHTTPDataRequest.html" />
+        <item title="LzHTTPDatasource" href="LzHTTPDatasource.html" />        
     </category>
     
     <category title="Scripting">
@@ -221,7 +221,7 @@
     </category>
     
     <category title="Services">
-        <item title="LzFocus" href="LzFocus+dhtml+j2me+svg+swf7+swf8.html" />    
+        <item title="LzFocus" href="LzFocus.html" />    
     </category>
     
     <category title="Charts and Graphs">

Modified: openlaszlo/trunk/docs/src/reference/navbuilder/navxmlbuilder.rb
===================================================================
--- openlaszlo/trunk/docs/src/reference/navbuilder/navxmlbuilder.rb	2008-04-06 18:17:32 UTC (rev 8572)
+++ openlaszlo/trunk/docs/src/reference/navbuilder/navxmlbuilder.rb	2008-04-06 18:17:56 UTC (rev 8573)
@@ -14,30 +14,37 @@
 # Copyright 2007-2008 Laszlo Systems. Use according to license terms. 
 
 require 'date'
+require 'getoptlong'
+require 'rdoc/usage'
+
 YEAR = Date::today().year.to_s
-DEBUGLEVEL = 0
 
+$debuglevel = 0
+$indir = '../../../reference/'   # always terminated by slash
+$outdir = '.'
+
 def debug ( lev, str )
-  if (lev <= DEBUGLEVEL) then
+  if (lev <= $debuglevel) then
      $stdout.puts str + "\n"
   end
 end
-# only appears if DEBUGLEVEL set to 1 or higher
-debug(1, "debug level is set to " + DEBUGLEVEL.to_s)
   
 def generate_index ( filepat, outfilename, roottag="index" )
   debug(1, "generate " + outfilename + " using file pattern " + filepat);
   f = File.new(outfilename, "w")
   f.puts "<#{roottag}>"
   f.puts "    <!-- DO NOT EDIT: generated by navxmlbuilder.rb -->\n"
-  file_filter = '../../../reference/' + filepat
+  file_filter = $indir + filepat
   lz_topics = Dir.glob(file_filter).sort
   h = Hash::new();
   lz_topics.each { |fullname| 
       ftype = File::ftype(fullname)
       if (ftype != "directory") then
           debug(2, "process " + fullname);
-          file = fullname.sub(/..\/..\/..\/reference\//, '')
+          file = fullname
+          if (fullname[0, $indir.length] == $indir)
+             file = fullname[$indir.length..fullname.length]
+          end
           lz_name = yield file, fullname
           if (lz_name) then
             h[lz_name] = file
@@ -83,14 +90,36 @@
   tag
 end
 
+opts = GetoptLong.new(
+  [ '--help', GetoptLong::NO_ARGUMENT ],
+  [ '--inputdir', GetoptLong::REQUIRED_ARGUMENT ],
+  [ '--outputdir', GetoptLong::REQUIRED_ARGUMENT ],
+  [ '--debug', GetoptLong::REQUIRED_ARGUMENT ]
+)
+
+opts.each do |opt, arg|
+  case opt
+    when '--help'
+      RDoc::usage
+    when '--inputdir'
+      $indir = arg + '/';
+    when '--outputdir'
+      $outdir = arg
+    when '--debug'
+      $debuglevel = arg.to_i
+  end
+end
+# only appears if $debuglevel set to 1 or higher
+debug(1, "debug level is set to " + $debuglevel.to_s)
+
 # Filenames are like lz.alert, LzAnimator.html, tag.attribute.html, tag-br.html
 # The file pattern for Lz/lz should work around any file case issues
 # on Windows vs. Unix/Linux.
 
-generate_index("{[Ll]z,tag}*.html", "tags.xml", "index") { | file,fullname |
+generate_index("{[Ll]z,tag}*.html", $outdir + "/tags.xml", "index") { | file,fullname |
     tagname_for(fullname);
  }
-generate_index("Lz*.html", "classes.xml", "index") { | file,ignored | 
+generate_index("Lz*.html", $outdir + "/classes.xml", "index") { | file,ignored | 
    file.sub(/\.html/, '').sub(/([^+]*)\+(.*)/, '\1 (\2)').gsub(/\+/, ' ').
         sub('swf7 swf8 swf9', 'swf');
 }

Modified: openlaszlo/trunk/docs/src/reference/navbuilder/toccheck.rb
===================================================================
--- openlaszlo/trunk/docs/src/reference/navbuilder/toccheck.rb	2008-04-06 18:17:32 UTC (rev 8572)
+++ openlaszlo/trunk/docs/src/reference/navbuilder/toccheck.rb	2008-04-06 18:17:56 UTC (rev 8573)
@@ -6,17 +6,17 @@
 # built on OSX 10.4 with ruby 1.8.6
 # Copyright 2008 Laszlo Systems. Use according to license terms. 
 
-DEBUGLEVEL = 0
+require 'getoptlong'
+require 'rdoc/usage'
 
-REFDOC_DIR = '../../../reference'
+$debuglevel = 0
+$indir = '../../../reference/'   # always terminated by slash
 
 def debug ( lev, str )
-  if (lev <= DEBUGLEVEL) then
+  if (lev <= $debuglevel) then
      $stdout.puts str + "\n"
   end
 end
-# only appears if DEBUGLEVEL set to 1 or higher
-debug(1, "debug level is set to " + DEBUGLEVEL.to_s)
   
 def for_line(filename)
   tag = nil;
@@ -29,18 +29,41 @@
 end
 
 def check_link(fromname, refname)
-  if (!File.exist?(REFDOC_DIR + '/' + refname)) then
-    $stderr.puts(refname + ": referenced from " + fromname + " does not exist")
+  result = true
+  if (!File.exist?($indir + refname)) then
+    $stderr.puts("Error: broken link in doc navigation: " + refname + " referenced from " + fromname + " does not exist")
     basename = refname.sub(/[.][^.]*/,'').sub(/[+].*/,'')
-    Dir.glob(REFDOC_DIR + '/' + basename + '*' ).sort.each { |altname|
-      altname = altname.sub(REFDOC_DIR + '/', '')
-      $stderr.puts('    ' + altname + '?')
+    Dir.glob($indir + basename + '*' ).sort.each { |altname|
+      altname = altname.sub($indir, '')
+      $stderr.puts('    maybe use ' + altname + '?')
+      result = false
     }
   end
+  return result
 end
 
+opts = GetoptLong.new(
+  [ '--help', GetoptLong::NO_ARGUMENT ],
+  [ '--inputdir', GetoptLong::REQUIRED_ARGUMENT ],
+  [ '--debug', GetoptLong::REQUIRED_ARGUMENT ]
+)
+
+opts.each do |opt, arg|
+  case opt
+    when '--help'
+      RDoc::usage
+    when '--inputdir'
+      $indir = arg + '/';
+    when '--debug'
+      $debuglevel = arg.to_i
+  end
+end
+# only appears if $debuglevel set to 1 or higher
+debug(1, "debug level is set to " + $debuglevel.to_s)
+
 todo_count = 0
-for_line(REFDOC_DIR + '/toc.xml') { | line |
+ecode = true
+for_line($indir + 'toc.xml') { | line |
    if (line =~ /TODO/) then
       todo_count = todo_count + 1
    end
@@ -49,10 +72,17 @@
    end
    if (line =~ /<item.*href=/) then
       filename = line.sub(/^.*href="([^"]*)".*$/, '\1')
-      check_link('toc.xml', filename)
+      if (!check_link('toc.xml', filename))
+         ecode = false
+      end
    end
 }
 
 if (todo_count != 0) then
   $stderr.puts('' + todo_count.to_s + ' TODOs found in toc.xml')
 end
+
+if (!ecode) then
+   $stderr.puts('Error: docs/src/nav/toc.xml is out of date, see broken link messages above')
+   exit(1)
+end



More information about the Laszlo-checkins mailing list