fix last example. Add example of adding code blocks that are not shown in docbook...
authorThomas Vander Stichele <thomas@apestaart.org>
Wed, 15 Dec 2004 11:54:26 +0000 (11:54 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Wed, 15 Dec 2004 11:54:26 +0000 (11:54 +0000)
Original commit message from CVS:

* docs/manual/elements-api.xml:
* docs/manual/helloworld.xml:
* examples/manual/extract.pl:
fix last example.  Add example of adding code blocks that are not
shown in docbook output.

ChangeLog
docs/manual/basics-helloworld.xml
docs/manual/elements-api.xml
docs/manual/helloworld.xml
examples/manual/extract.pl
tests/old/examples/manual/extract.pl

index b111d5d..576a9a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2004-12-15  Thomas Vander Stichele  <thomas at apestaart dot org>
 
+       * docs/manual/elements-api.xml:
+       * docs/manual/helloworld.xml:
+       * examples/manual/extract.pl:
+         fix last example.  Add example of adding code blocks that are not
+         shown in docbook output.
+
+2004-12-15  Thomas Vander Stichele  <thomas at apestaart dot org>
+
        * docs/manual/dynamic.xml:
        * docs/manual/elements-api.xml:
        * docs/manual/gnome.xml:
index 68611b4..0678a17 100644 (file)
@@ -16,8 +16,9 @@
     </para>
 
     <programlisting>
-/* example-begin helloworld.c */      
-#include &lt;gst/gst.h&gt;
+<!-- example-begin helloworld.c a -->
+<![CDATA[
+#include <gst/gst.h>
 
 int 
 main (int argc, char *argv[]) 
@@ -64,7 +65,8 @@ main (int argc, char *argv[])
 
   exit (0);
 }
-/* example-end helloworld.c */      
+]]>
+<!-- example-end helloworld.c a -->
     </programlisting>
 
     <para>
index 236e6d8..7526d2c 100644 (file)
@@ -60,6 +60,12 @@ main (int argc, char *argv[])
 ]]>
 <!-- example-end elementmake.c b -->
     </programlisting>
+<!-- example-begin elementmake.c c -->
+<!--
+  /* Hi Ronald.  Block c is an example of a piece of code that will end up
+   * in the extracted code file, but is not shown in the docbook output */
+-->
+<!-- example-end elementmake.c c -->
     <para> 
 <function>gst_element_factory_make</function> is actually a shorthand
 for a combination of two functions.
index 68611b4..0678a17 100644 (file)
@@ -16,8 +16,9 @@
     </para>
 
     <programlisting>
-/* example-begin helloworld.c */      
-#include &lt;gst/gst.h&gt;
+<!-- example-begin helloworld.c a -->
+<![CDATA[
+#include <gst/gst.h>
 
 int 
 main (int argc, char *argv[]) 
@@ -64,7 +65,8 @@ main (int argc, char *argv[])
 
   exit (0);
 }
-/* example-end helloworld.c */      
+]]>
+<!-- example-end helloworld.c a -->
     </programlisting>
 
     <para>
index 3a0a9af..ee7ca9c 100755 (executable)
@@ -8,9 +8,7 @@
 
 # decodes xml by translating &amp; &lt; &gt; back to what they should be
 # and also ignore
-# <![CDATA[
-# and
-# ]]>
+# <![CDATA[ and ]]> and <!-- and -->
 sub
 xml_decode ($)
 {
@@ -22,6 +20,8 @@ xml_decode ($)
 
   if ($input =~ /<!\[CDATA\[/) { $input = ""; }
   if ($input =~ /]]>/) { $input = ""; }
+  if ($input =~ /<!--/) { $input = ""; }
+  if ($input =~ /-->/) { $input = ""; }
 
   #print "Returning line $input";
   return $input;
@@ -72,7 +72,7 @@ open OUTPUT, ">$output";
 @block_ids = keys %blocks;
 foreach $block_id (sort @block_ids)
 {
-  print "Writing block with id $block_id\n";
+  print "Writing $output block $block_id\n";
   print OUTPUT $blocks{$block_id};
 }
 close OUTPUT;
index 3a0a9af..ee7ca9c 100755 (executable)
@@ -8,9 +8,7 @@
 
 # decodes xml by translating &amp; &lt; &gt; back to what they should be
 # and also ignore
-# <![CDATA[
-# and
-# ]]>
+# <![CDATA[ and ]]> and <!-- and -->
 sub
 xml_decode ($)
 {
@@ -22,6 +20,8 @@ xml_decode ($)
 
   if ($input =~ /<!\[CDATA\[/) { $input = ""; }
   if ($input =~ /]]>/) { $input = ""; }
+  if ($input =~ /<!--/) { $input = ""; }
+  if ($input =~ /-->/) { $input = ""; }
 
   #print "Returning line $input";
   return $input;
@@ -72,7 +72,7 @@ open OUTPUT, ">$output";
 @block_ids = keys %blocks;
 foreach $block_id (sort @block_ids)
 {
-  print "Writing block with id $block_id\n";
+  print "Writing $output block $block_id\n";
   print OUTPUT $blocks{$block_id};
 }
 close OUTPUT;