RE: How to make directives look better? Customizing/defining elements and formatting...

2006-10-19 Thread Kai Mutz
I think your problem is that the table below is defined to have 1 column but
has two. Try this:

table frame=box rules=all
  captionFTPPASVaddr/caption
  col align=center/
  col align=center/
  thead
tr align=center
  thDirective/th

  thFTPPASVaddr/th
/tr
  /thead

  tbody
tr
  tdDescription/td

  tdThis directive allows you to specify a different
IP
  address to be sent on replies to codePASV/code
requests.
  You will find this useful when the Covalent Enterprise
FTP
  Server is behind a firewall./td
/tr
..

  /tbody
/table


In docbook documents I would define tables like this:

table
  title

  /title
  tgroup
colspec colname=col1 /
colspec colname=col2 /
thead
  row
entry colname=col1
  ...
/entry
entry colname=col2
   ...
/entry
  /row
/thead
tbody
  row
entry colname=col1
  ...
/entry
entry colname=col2
   
/entry
  /row
/tbody
  /tgroup
/table

For customizing the docbook DTD see:
http://www.docbook.org/tdg/en/html/ch05.html
Bu you have to customize the docbook stylesheets as well if you add an
directivesynopsis element.

Kai

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]
 Behalf Of Dan Carwin
 Sent: Thursday, October 19, 2006 1:29 AM
 To: fop-users@xmlgraphics.apache.org
 Subject: RE: How to make directives look better? Customizing/defining
 elements and formatting...


 Thanks again Jay,

 I'm not currently using anything custom, just the basic set of
 pre-defined DocBook elements available in the DocBook editor I'm using.
 Because I am just using these basic tags, my doc looks basic and not
 polished.  When I looked at the Apache docs I saw many element tags in
 use like directivesynopsis which are not available to me and I
 wondered where they came from and how I could make use of them to make
 my doc more readable (and convert to PDF better as well.)  I have not
 written any custom transforms yet.

 Here's what I use to define a directive:

 Example of my directive definition using basic elements:
 
 table frame=box rules=all
   captionFTPPASVaddr/caption

   col align=center span=1 /

   thead
 tr align=center
   thDirective/th

   thFTPPASVaddr/th
 /tr
   /thead

   tbody
 tr
   thDescription/th

   tdThis directive allows you to specify a different
 IP
   address to be sent on replies to codePASV/code
 requests.
   You will find this useful when the Covalent Enterprise
 FTP
   Server is behind a firewall./td
 /tr

 tr
   thSyntax/th

   tdcodeFTPPASVaddr IP address/code/td
 /tr

 tr
   thExample/th

   tdcodeFTPPASVaddr 64.84.21.111/code/td
 /tr

 tr
   thContext/th

   tdServer Config, Virtual Host/td
 /tr

 tr
   thNote/th

   tdThis directive is *not* inherited from the global
   configuration file./td
 /tr
   /tbody
 /table


 Here's what an ASF directive definition looks like:
 ===
 directivesynopsis
 nameBS2000Account/name
 descriptionDefine the non-privileged account on BS2000
 machines/description
 syntaxBS2000Account varaccount/var/syntax
 contextlistcontextserver config/context/contextlist
 modulelistmoduleperchild/modulemoduleprefork/module/modulelis
 t
 compatibilityOnly available for BS2000 machines/compatibility

 usage
 pThe directiveBS2000Account/directive directive is available
 for
 BS2000 hosts only. It must be used to define the account number for
 the non-privileged apache server user (which was configured using
 the
 directive module=mpm_commonUser/directive directive). This is
 required by the BS2000 POSIX subsystem (to change the underlying
 BS2000
 task environment by performing a sub-LOGON) to prevent CGI scripts
 from accessing resources of the privileged account which started the
 server, usually codeSYSROOT/code./p

 notetitleNote/title
   pOnly one codeBS2000Account/code directive can be used./p
 /note
 /usage
 seealsoa href=../platform/ebcdic.htmlApache EBCDIC
 port/a/seealso
 /directivesynopsis


 fyi my first link

Re: How to make directives look better? Customizing/defining elements and formatting...

2006-10-19 Thread Jay Bryant

Hi, Dan,

That's either not DocBook or it's a customization of it.

You can achieve the same look by writing a transform that turns those 
elements into standard Docbook and then styling the DocBook output 
accordingly.


For now, remember that DocBook contains content. You'll do the styling when 
you run the DocBook XSL stylesheets to generate FO content for FOP. So, once 
you have the content in DocBook, you want to look at customizing the styling 
layer.


THE book on the subject is Bob Stayton's DocBook XSL.

Keep asking questions and showing us your code.

Jay Bryant
Bryant Communication Services

- Original Message - 
From: Dan Carwin [EMAIL PROTECTED]

To: fop-users@xmlgraphics.apache.org
Sent: Wednesday, October 18, 2006 6:28 PM
Subject: RE: How to make directives look better? Customizing/defining 
elements and formatting...



Thanks again Jay,

I'm not currently using anything custom, just the basic set of
pre-defined DocBook elements available in the DocBook editor I'm using.
Because I am just using these basic tags, my doc looks basic and not
polished.  When I looked at the Apache docs I saw many element tags in
use like directivesynopsis which are not available to me and I
wondered where they came from and how I could make use of them to make
my doc more readable (and convert to PDF better as well.)  I have not
written any custom transforms yet.

Here's what I use to define a directive:

Example of my directive definition using basic elements:

table frame=box rules=all
 captionFTPPASVaddr/caption

 col align=center span=1 /

 thead
   tr align=center
 thDirective/th

 thFTPPASVaddr/th
   /tr
 /thead

 tbody
   tr
 thDescription/th

 tdThis directive allows you to specify a different
IP
 address to be sent on replies to codePASV/code
requests.
 You will find this useful when the Covalent Enterprise
FTP
 Server is behind a firewall./td
   /tr

   tr
 thSyntax/th

 tdcodeFTPPASVaddr IP address/code/td
   /tr

   tr
 thExample/th

 tdcodeFTPPASVaddr 64.84.21.111/code/td
   /tr

   tr
 thContext/th

 tdServer Config, Virtual Host/td
   /tr

   tr
 thNote/th

 tdThis directive is *not* inherited from the global
 configuration file./td
   /tr
 /tbody
   /table


Here's what an ASF directive definition looks like:
===
directivesynopsis
nameBS2000Account/name
descriptionDefine the non-privileged account on BS2000
machines/description
syntaxBS2000Account varaccount/var/syntax
contextlistcontextserver config/context/contextlist
modulelistmoduleperchild/modulemoduleprefork/module/modulelis
t
compatibilityOnly available for BS2000 machines/compatibility

usage
   pThe directiveBS2000Account/directive directive is available
for
   BS2000 hosts only. It must be used to define the account number for
   the non-privileged apache server user (which was configured using
the
   directive module=mpm_commonUser/directive directive). This is
   required by the BS2000 POSIX subsystem (to change the underlying
BS2000
   task environment by performing a sub-LOGON) to prevent CGI scripts
   from accessing resources of the privileged account which started the
   server, usually codeSYSROOT/code./p

   notetitleNote/title
 pOnly one codeBS2000Account/code directive can be used./p
   /note
/usage
seealsoa href=../platform/ebcdic.htmlApache EBCDIC
port/a/seealso
/directivesynopsis


fyi my first link is to an ASF doc page, and my second link is to a
static jpg.

Thanks,
Dan


-Original Message-
From: Jay Bryant [mailto:[EMAIL PROTECTED]
Sent: Wednesday, October 18, 2006 4:14 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: How to make directives look better? Customizing/defining
elements and formatting...


Hi, Dan,

You don't need to add formatting objects for FOP to handle (and that's a
bad
idea anyway). The thing to do is to write a transform that produces the
necessary formatting objects. It sounds like you did that and are having

trouble adjusting the layout to suit your needs. From what you say, your

string-breaking issue is the heart of the problem.

Try posting a sample of your problem, so that folks on the list can look
at
what you're trying to do and make concrete suggestions.

IMHO, it's better to paste small but complete examples into the body of
the
message than it is to attach files or links. I don't know how other
folks
work, but I generally ignore attachments and links, even though I have
anti-virus

Re: How to make directives look better? Customizing/defining elements and formatting...

2006-10-19 Thread Glen Mazza

Jay Bryant wrote:


Hi, Dan,

That's either not DocBook or it's a customization of it.

You can achieve the same look by writing a transform that turns those 
elements into standard Docbook and then styling the DocBook output 
accordingly.


For now, remember that DocBook contains content. You'll do the styling 
when you run the DocBook XSL stylesheets to generate FO content for 
FOP. So, once you have the content in DocBook, you want to look at 
customizing the styling layer.


THE book on the subject is Bob Stayton's DocBook XSL.



Here's a link to it:  http://www.sagehill.net/docbookxsl/index.html

Glen


Keep asking questions and showing us your code.

Jay Bryant
Bryant Communication Services




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to make directives look better? Customizing/defining elements and formatting...

2006-10-18 Thread Dan Carwin
This is another newb question, and please forgive me as I fear it is off
topic for this list. 
(please point me in the right direction)

Quick version:
==
Where and how do I define new element types?  (How) Can I import
existing ones I like from the ASF?


Explanation
===
I am writing technical documentation and need to document Apache HTTPD
conf file directives.

Example:
http://httpd.apache.org/docs/2.0/mod/mpm_common.html#acceptmutex

In the Apache docs (linked above) there is a really nice format for a
directive which encapsulates the directive in a box and formats the
header elements of the directive in bold, etc.  

I am currently using a table to format my directives, and they look
like crap. :)  Especially when converted to PDF, as the first column of
the table takes up 80% of the page width and the second column is right
off the page:

Example: http://www.sonic.net/dcarwin/images/directive-example.jpg

Thus the question is how can I make my directive definitions look like
the ASF's?

Best I can tell I have to define or import new custom elements, such as
directivesynopsis which are used in the ASF docs, which are not
defined currently in the list of element types I have access to.  These
new element definitions also have to include instructions to FOP on how
to format them when converted to PDF. (right?)

Environment notes:
==
I use XML Mind Editor 3.2 to edit the docs.

Here is an example of the command I am using to convert into PDF (direct
from XML).

C:\Program Files\apacheFOP\fop-0.92beta\fop.bat -xml
E:\data\covalentDocumentation\new-xml-docs\ERS-3.1.0-Release_Notes.xml
-xsl E:\data\docbook\docbook-xsl-1.70.1\fo\docbook.xsl -pdf
E:\data\covalentDocumentation\new-xml-docs\ERS-3.1.0-Release_Notes.xml.p
df


Thanks,
Dan Carwin
[EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]