fix last example. Add example of adding code blocks that are not shown in docbook output.

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.
This commit is contained in:
Thomas Vander Stichele 2004-12-15 11:54:26 +00:00
parent c1ab023379
commit 5ebd92789b
6 changed files with 32 additions and 14 deletions

View file

@ -1,3 +1,11 @@
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:

View 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>

View 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.

View 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>

View file

@ -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;

View file

@ -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;