Anonymous avatar Anonymous committed f814296

Add example.

Comments (0)

Files changed (2)

perl/modules/XML-Grammar-Fiction/Changes

     * <blockquote> now supports xml:id and xml:lang.
     * Fiction-Text: a plus sign ( + ) at the starting line of the paragraph
     now indicates that the following tag is a style tag.
+    * lib/XML/Grammar/Fiction.pm - add a comprehensive example to the POD
+    itself.
 
 0.7.0       Wed May 25 12:47:13 IDT 2011
     * Add support for the lang="..." attribute of <body> in Fiction-Text which

perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Fiction.pm

 use warnings;
 use strict;
 
+=encoding utf8
+
 =head1 NAME
 
 XML::Grammar::Fiction - CPAN distribution implementing an XML grammar 
 
 =head2 EXAMPLES
 
+=head3 Examples Document.
+
+    <body id="index" lang="en-UK">
+
+    <title>David vs. Goliath - Part I</title>
+
+    <s id="top">
+
+    <title>The Top Section</title>
+
+    <!-- David has Green hair here -->
+
+    King <a href="http://en.wikipedia.org/wiki/David">David</a> and Goliath
+    were standing by each other.
+
+    David said unto Goliath: “I will shoot you. I <b>swear</b> I will”
+
+    <s id="goliath">
+
+    <title>Goliath's Response</title>
+
+    <!-- Goliath has to reply to that. -->
+
+    Goliath was not amused.
+
+    He said to David: “Oh, really. <i>David</i>, the red-headed!”.
+
+    </s>
+
+    </s>
+
+    </body>
+
+
+=head3 Other Examples
+
 Examples can be found in the C<t/data> directory, and here:
 
 =over 4
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.