OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Subject: Re: DOCBOOK-APPS: About EBNF


Norman Walsh wrote:
> Jeffrey Franks wrote:
> | However, I'm able to express the bnf, but I can't figure out how to
> | connect
> | the description (several line paragraph) to the right-hand side.
> 
> Can you provide an example of what you'd like to be able to do?

Yes, there's a doodle at end of this message based on <table> that comes
close to the expression I would like to see. I've rendered to HTML via
xtchunk.xsl and you can get a flavor of what my requirement looks like.
I have been unable to use EBNF because of those interspersed
descriptions.
Target must be rendered in PDF and HTML, so that any HTML tricks with
links
would not be of much use on printed page.

The description paragraphs beg to be interspersed with the EBNF in
various
places.

NOTE: the "doodle" has markup in it to make it "look right" that ought
to
	be handled else where.

> 
> | Also, the example has a <nonterminal def="xxxx"> where xxxx ends up as a
> | a *hard* file link. How do I use that? Rendered output might be HTML or
> | PDF,
> | so how would we know filename at this point? Or is that a style sheet
> | issue?
> 
> What do you mean by a hard file link?

Ah, rendered to HTML and viewing with browser, the link tries to resolve
by looking for the file named xxxx specified in the nonterminal
statement. How can that be right? What am I missing? Clicking the link
brings an error message in browser that it can't find xxxx file.

> 
> | The paragraphs in my requirements example were interspersed with each
> | bnf rhs definition. How can I retain that clarity for the reader
> | such that each element definition is associated with a particular
> | bnf term? Breakup the equation into multiple <productionset> with
> | interspersed <para> ?
> 
> That sounds like one option.

Maybe, however the numbering of equation parts probably restarts at [1]
instead of sequncing 1 through n,
and I'm looking to intersperse paragraphs between sections of <rhs>.

~~~~~~~~~~~ Here's is an example based on <table> that's close to what
I'm after.
~~~~~~~~~~~ The EBNF goes on for a few more pages, which I have not
gotten to yet.

<?xml version="1.0" encoding="utf-8"?>

<!DOCTYPE article PUBLIC "-//Arbortext//DTD DocBk XML V4.1.2//EN"
"file:////home/jlf/docbook/docbkx41/docbookx.dtd" []>

<article><?dbhtml filename="table2.html"?>
  <informaltable frame="none">
    <tgroup cols="3" align="left" colsep="0" rowsep="0">
      <colspec colname="c1"/>
      <colspec align="right" colname="c2"/>
      <colspec colname="c3"/>
      <colspec colname="c4"/>
      <tbody>
	<row>
	  <entry>[1]&nbsp;</entry>
	  <entry align="right">menu::=</entry>
	  <entry namest="c3" nameend="c4">
	    [ <emphasis>item</emphasis> ]
	  </entry>
	</row>
	<row>
	  <entry></entry><entry></entry>
	  <entry namest="c3" nameend="c4">
	    <para>
	      A menu specification is zero or more item specifications.
	    </para>
	    <para></para>
	  </entry>
	</row>
	<row valign="top">
	  <entry>[2]&nbsp;</entry>
	  <entry align="right">item::=</entry>
	  <entry namest="c3" nameend="c4">
	    <literal>
[<emphasis>name</emphasis>][<emphasis>type</emphasis>][<emphasis>flags</emphasis>][<emphasis>label</emphasis>][<emphasis>accelerator</emphasis>][<emphasis>submenu</emphasis>][<emphasis>symbol</emphasis>]
;
[<emphasis>name</emphasis>][<emphasis>type</emphasis>][<emphasis>flags</emphasis>][<emphasis>label</emphasis>][<emphasis>accelerator</emphasis>][<emphasis>submenu</emphasis>][<emphasis>symbol</emphasis>]
<emphasis>callbacks</emphasis>
	    </literal>
	  </entry>
	</row>
	<row>
	  <entry></entry><entry></entry>
	  <entry namest="c3" nameend="c4">
	    <para>
	      A menu item has an optional name, type, label,
	      accelerator, submenu name, symbol name, and callback
	      specifications.  It also can have any number of flags
	      set.  If no callback or callbacks are specified for the
	      menu item, then the item specification must be followed
	      by a semicolon.  When callbacks are specified the
	      semicolons following the callback calls themselves are
	      sufficient.
	    </para>
	    <para></para>
	  </entry>
	</row>
	<row>
	  <entry></entry>
	  <entry></entry>
	  <entry namest="c3" nameend="c4">
	    <literal>
[<emphasis>name</emphasis>] - { - } ;
	    </literal>
	  </entry>
	</row>
	<row>
	  <entry></entry><entry></entry>
	  <entry namest="c3" nameend="c4">
	    <para>
	      One or more hyphens, with a name optionally specified is
	      a special syntax for a single line separator menu item.
	      The hyphens must be followed by a terminating semicolon.
	      </para>
	    <para></para>
	  </entry>
	</row>
	<row>
	  <entry></entry>
	  <entry></entry>
	  <entry namest="c3" nameend="c4">
	    <literal>
[<emphasis>name</emphasis>] = { = } ;
	    </literal>
	  </entry>
	</row>
	<row>
	  <entry></entry><entry></entry>
	  <entry namest="c3" nameend="c4">
	    <para>
	      One or more equal signs, with a name optionally
	      specified is a special syntax for a double line
	      separator menu item.  The equal signs must be followed
	      by a terminating semicolon.
	    </para>
	    <para></para>
	  </entry>
	</row>
	<row>
	  <entry>[3]&nbsp;</entry>
	  <entry align="right">name::=</entry>
	  <entry namest="c3" nameend="c4">
	    <emphasis>ident</emphasis> :
	  </entry>
	</row>
	<row>
	  <entry></entry><entry></entry>
	  <entry namest="c3" nameend="c4">
	    <para>
	      The name of a menu item is specified as an identifier
	      followed by a colon.  Any legal C variable name is a
	      legal identifier; identifiers do not appear within
	      quotes.
	    </para>
	    <para></para>
	  </entry>
	</row>
	<row valign="top">
	  <entry>[4]&nbsp;</entry>
	  <entry align="right">type::=</entry>
	  <entry namest="c3" nameend="c4">
	    <literallayout>
<literal>Title       </literal>the item is a label, or a title for the
menu.
<literal>Button      </literal>the item is a push button.
<literal>Toggle      </literal>the item is a toggle button.
<literal>Submenu     </literal>the item is a cascade button, with a
submenu to be attached.
<literal>Line        </literal>the item is a separator.
<literal>DoubleLine  </literal>the item is a double-line separator.
	    </literallayout>
	  </entry>
	</row>
	<row>
	  <entry></entry><entry></entry>
	  <entry namest="c3" nameend="c4">
	    <para>
	      These keywords explicitly specify the type of a menu
	      item.  The type of most items can be determined from
	      other parts of the grammar, however, and so these
	      keywords are not often necessary.  An item is assumed,
	      by default, to be a push button.  If the "On" or "Off"
	      flags appear, then it is assumed to be a toggle button.
	      If a submenu name specification appears, then it is
	      assumed to be a cascade button.  There are special
	      syntaxes for specifying separators (see above), and so
	      the <classname>Title</classname> keyword is the only one
	      generally needed.  It is used to specify a
	      non-selectable XmLabel item, usually used as the title
	      for a popup menu pane.
	    </para>
	    <para></para>
	  </entry>
	</row>
	<row>
	  <entry>[5]&nbsp;</entry>
	  <entry align="right">menu::=</entry>
	  <entry namest="c3" nameend="c4">
	    <literal>On</literal>
	  </entry>
	</row>
	<row>
	  <entry></entry><entry></entry>
	  <entry namest="c3" nameend="c4">
	    <para>
	      Specifies that this item is a toggle button, and that
	      its initial state is on.
	    </para>
	    <para></para>
	  </entry>
	</row>
	<row>
	  <entry></entry>
	  <entry></entry>
	  <entry namest="c3" nameend="c4">
	    <literal>Off</literal>
	  </entry>
	</row>
	<row>
	  <entry></entry><entry></entry>
	  <entry namest="c3" nameend="c4">
	    <para>
	      Specifies that this item is a toggle button, and that
	      its initial state is off.
	    </para>
	    <para></para>
	  </entry>
	</row>
      </tbody>
    </tgroup>
  </informaltable>
</article>

<!-- 
Local Variables:
mode: xae
sgml-indent-step:2
sgml-indent-data:t
sgml-set-face: t
sgml-insert-missing-element-comment: nil
sgml-omittag:nil
sgml-shorttag:t
sgml-namecase-general:nil
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-parent-document:nil
sgml-default-dtd-file:"table2.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
--> 

-- 
Jeffrey L. Franks  (Web)  http://www.motiftools.org
                   (Mail) jfranks@quik.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]


Powered by eList eXpress LLC