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:
</para>
<programlisting>
-/* example-begin helloworld.c */
-#include <gst/gst.h>
+<!-- example-begin helloworld.c a -->
+<![CDATA[
+#include <gst/gst.h>
int
main (int argc, char *argv[])
exit (0);
}
-/* example-end helloworld.c */
+]]>
+<!-- example-end helloworld.c a -->
</programlisting>
<para>
]]>
<!-- 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.
</para>
<programlisting>
-/* example-begin helloworld.c */
-#include <gst/gst.h>
+<!-- example-begin helloworld.c a -->
+<![CDATA[
+#include <gst/gst.h>
int
main (int argc, char *argv[])
exit (0);
}
-/* example-end helloworld.c */
+]]>
+<!-- example-end helloworld.c a -->
</programlisting>
<para>
# decodes xml by translating & < > back to what they should be
# and also ignore
-# <![CDATA[
-# and
-# ]]>
+# <![CDATA[ and ]]> and <!-- and -->
sub
xml_decode ($)
{
if ($input =~ /<!\[CDATA\[/) { $input = ""; }
if ($input =~ /]]>/) { $input = ""; }
+ if ($input =~ /<!--/) { $input = ""; }
+ if ($input =~ /-->/) { $input = ""; }
#print "Returning line $input";
return $input;
@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;
# decodes xml by translating & < > back to what they should be
# and also ignore
-# <![CDATA[
-# and
-# ]]>
+# <![CDATA[ and ]]> and <!-- and -->
sub
xml_decode ($)
{
if ($input =~ /<!\[CDATA\[/) { $input = ""; }
if ($input =~ /]]>/) { $input = ""; }
+ if ($input =~ /<!--/) { $input = ""; }
+ if ($input =~ /-->/) { $input = ""; }
#print "Returning line $input";
return $input;
@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;