[xep-support] <PRE> tag like behavior?

G. Ken Holman gkholman at CraneSoftwrights.com
Wed Jun 2 07:53:31 PDT 2004


At 2004-06-02 10:37 -0400, Chris Cosentino wrote:
>Is there an easy (relatively) way to use XEP to create <PRE>-like
>formatted text?

XSL-FO has many properties for a block that will help to get this output.

>We currently have an inline element called <examplecode>. When
>rendered through XEP the data is output in monospace bold font.
>
>If line breaks were required, we would wrap it in para tags.

Not sure what you mean there.

>The problem we have is that we want to render example code with proper
>indentation. The simple solution

... is to have the stylesheet not collapse the white space and to preserve 
the linefeeds that it finds:

   <block linefeed-treatment="preserve"
          white-space-treatment="preserve"
          white-space-collapse="false">
  .... indented program text ...

Then decide if you want long lines clipped or wrapped using wrap-option=.

I hope this helps.

........................ Ken


--
Public courses: Spring 2004 world tour of hands-on XSL instruction
Next: 3-day XSLT/XPath; 2-day XSL-FO - Birmingham, UK June 14,2004

World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman at CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list