[dbdoclet] Re: Constant field values revisited - appendix vs chapter?

Hi Michael,

If you are looking at constant field values code could you also take a
look at escaping entities in the constant values?  For example, we have
tools that build SQL expressions interactively and have definitions like
the following:

  public final static String OPER_GREATER_THAN           = ">";
  public final static String OPER_GREATER_THAN_OR_EQUALS = ">=";
  public final static String OPER_LESS_THAN              = "<";
  public final static String OPER_LESS_THAN_OR_EQUALS    = "<=";

When processed, dbdoclet creates constructs like:

  <row>
    <entry><para>OPER_GREATER_THAN</para></entry>
    <entry><para>></para></entry>
  </row>
  <row>
    <entry><para>OPER_GREATER_THAN_OR_EQUALS</para></entry>
    <entry><para>>=</para></entry>
  </row>
  <row>
    <entry><para>OPER_LESS_THAN</para></entry>
    <entry><para><</para></entry>
  </row>
  <row>
    <entry><para>OPER_LESS_THAN_OR_EQUALS</para></entry>
    <entry><para><=</para></entry>
  </row>

which fails on OPER_LESS_THAN when it finds two consecutive left angle
brackets. My current (simplistic) solution is to change our source code
to

  public final static String OPER_GREATER_THAN           = "&gt;";
  public final static String OPER_GREATER_THAN_OR_EQUALS = "&gt;=";
  public final static String OPER_LESS_THAN              = "&lt;";
  public final static String OPER_LESS_THAN_OR_EQUALS    = "&lt;=";

before processing with dbdoclet. Perhaps other people have seen the same
problem. 

--
Thanks for the great tool!
Clifton

Clifton L. McLellan
Senior Software Engineer
Predicate Logic, Inc.
 

-----Original Message-----
From: dbdoclet-bounce@xxxxxxxxxxxxx
[mailto:dbdoclet-bounce@xxxxxxxxxxxxx] On Behalf Of Michael Fuchs
Sent: Wednesday, March 16, 2005 12:49 PM
To: dbdoclet@xxxxxxxxxxxxx; Jere.Kapyaho@xxxxxxxxx
Subject: [dbdoclet] Re: Constant field values revisited - appendix vs
chapter?


Hello Jere,

I will make this configurable in the next release 0.64.

Regards
Michael

Jere.Kapyaho@xxxxxxxxx schrieb:

>Hi,
>
>some time ago Michael implemented the list of constant field values. = 
>Currently it is an appendix element, as that was what seemed sensible =

>then. However, that caused a problem in a project where we have a = 
>structure like this:
>
>Book
>    Part I. Overview
>    Part II. Reference  <-- the only part created by dbdoclet
>       Chapter: Package X
>       Chapter: Package Y
>       Appendix: Constant field values
>    An Appendix=20
>    Another appendix
>    Index
>
>Now what happens is that if you have one or more appendices at the book

>= level, the labeling starts at 'B' since the constant values appendix 
>= already takes up the first 'A' label...=20
>
>I am thinking maybe the constant field values section would be better 
>as = a chapter instead of an appendix. What do you think? Could/should 
>this = be made configurable?
>
>--Jere
>
>--=20
>Jere K=E4pyaho (jere U+002E kapyaho U+0040 nokia U+002E com) Senior 
>Design Engineer, Java Platform Standardization Technology Platforms
>Nokia Corporation
>
>
>
>  
>






Other related posts: