AW: FO to RTF, Java Viewer: request for a systematic approach

2002-07-29 Thread J.U. Anderegg

Step 1: Specify what has to be done!

What are the requirements? What has to be supported? Which operating
environments? I'm afraid there is no common understanding, i.e. a fairly
precise specification in a few sentences, for these recent examples below.


Step 2: How can the specified requirements be implemented?

Look for and investigate candidate solutions!


Step 3: Which is the most reasonable candidate solution?

Evaluate candidate solutions and all their consequences! Select the most
appropriate one!


Step 4: Implementation

Contributors take over the job with a solid background.
_

RTF

1. Requirements:
- generate revisable documents from XML data, preferably RTF?
- support images, graphics, indices, TOC's, tables, viewing/printing?


2 Candidate solutions

2.1 FOP

2.2 XSLT


3. Evaluation

3.1 FOP

This is the RTF text of a very simple RTF document:

{\rtf1\ansi\ansicpg1252\deff0\deflang1031{\fonttbl{\f0\fswiss\fcharset0
Arial;}}
\viewkind4\uc1\pard\f0\fs20 paragraph 1 and text\par
\par
paragraph 2 and text\par
\par
\par
}

The first line is some declarations (character set, font f0), followed by
next lines containing the document text.

What is FOP supposed to do? The structure is fundamentally different from
XSL:FO without any kind of declarations ("style sheets"). We do not see any
page coordinates, pagination controls.

3.2 XSLT

RTF text can be generated by XSLT. An infrastructure organisation of "XSLT
stylesheets" is needed to generate "RTF stylesheets".

_

Java Viewer

1. Requirement
- Display XSL:FO documents in a Swing/AWT window? PDF?
- Support: view/print, images, graphics?


2 Candidate solutions

2.1 AWT Renderer

2.2 Acrobat Reader

2.3 Java PDF Viewer

2.4 Java SVG Viewer


3. Evaluation

3.1 AWT

What's wrong with the AWT renderer: are there just programming errors or
were system limitations hit?

3.2 Acrobat Reader

Acrobat Reader is THE full function PDF viewer. Is there a way to run
Acrobat Reader in a Java window: Mozilla, OLE by Java, ...?

3.3 Java PDF Viewer

Pretty hard to develop a full function viewer.

3.4 Java SVG Viewer

Is code available? If yes, image handling is to be solved.
_


These examples are just meant to explane my request. Similar considerations
apply to FOP extensions. Only a systematic approach will allow efficent
development and evolution of FOP.

_

Hansuli Anderegg



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




Re: AW: FO to RTF

2002-07-29 Thread Bertrand Delacretaz

Hi Peter,

>. . .
> The feasibility of an XSLT transform would
> be greatly influenced by the complexity of the mappings of properties
> into RTF structures.  

Yes, and in order to support the various "flavors" of RTF one has to take 
into account a number of (mostly dirty) tricks, which is probably easier in 
java. Not to mention images which usually need to be processed to be included 
in the RTF output.

> If the inheritance model of XSLFO had no ready
> parallel in RTF, that set of transformations would be a nightmare, I
> imagine.

There is some form of inheritance but we haven't been able to use it much in jfor - 
the lack of a clear structure in RTF (or our lack of 
understanding of it) makes it hard to take advantage of these features.

-Bertrand





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




Re: AW: FO to RTF

2002-07-29 Thread Peter B. West

Bertrand,

Thanks for clarifying that.  The feasibility of an XSLT transform would 
be greatly influenced by the complexity of the mappings of properties 
into RTF structures.  If the inheritance model of XSLFO had no ready 
parallel in RTF, that set of transformations would be a nightmare, I 
imagine.

Peter

Bertrand Delacretaz wrote:
> Hi Peter,
> 
> 
>>I tentatively suggested using XSLT to generate RTF a little while ago,
>>but I had no idea whether it was feasible.  The main question would seem
>>to be: is RTF a text-only format or a binary format?  Can anyone answer
>>that one for us?
> 
> 
> AFAIK, everything in RTF can be expressed with text-only characters, and it 
> would certainly be possible to convert XSL-FO to RTF using XSLT. 
> 
> Our choice to use java for the jfor converter was based on better 
> availability of programming and debugging tools.

-- 
Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"


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




Re: AW: FO to RTF

2002-07-29 Thread Bertrand Delacretaz

Hi Peter,

> I tentatively suggested using XSLT to generate RTF a little while ago,
> but I had no idea whether it was feasible.  The main question would seem
> to be: is RTF a text-only format or a binary format?  Can anyone answer
> that one for us?

AFAIK, everything in RTF can be expressed with text-only characters, and it 
would certainly be possible to convert XSL-FO to RTF using XSLT. 

Our choice to use java for the jfor converter was based on better 
availability of programming and debugging tools.

-Bertrand

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




Re: AW: FO to RTF

2002-07-28 Thread Oleg Tkachenko

Peter B. West wrote:

> I tentatively suggested using XSLT to generate RTF a little while ago, 
> but I had no idea whether it was feasible.  The main question would seem 
> to be: is RTF a text-only format or a binary format?  Can anyone answer 
> that one for us?
I believe it's feasible, I even heard some people acomplished 
proprietary-xml2rtf transformation using xslt, but not in generic way and not 
using xsl-fo. Probably property refinement and shortcut resolution can be a 
little problematic though.

-- 
Oleg Tkachenko
Multiconn International, Israel


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




RE: AW: FO to RTF

2002-07-27 Thread Victor Mote

Peter B. West wrote:

<- Start ->
I tentatively suggested using XSLT to generate RTF a little while ago, but I
had no idea whether it was feasible.  The main question would seem to be: is
RTF a text-only format or a binary format?  Can anyone answer that one for
us?
<- End ->

I am no expert on RTF, but by opening a few, it appears to be a text-only
format. However, I did see some examples of graphics being embedded in the
files using 7-bit characters. Handling this would certainly seem to be
outside the scope of XSLT.

Victor Mote (mailto:[EMAIL PROTECTED])
Enterprise Outfitters (www.outfitr.com)
2025 Eddington Way
Colorado Springs, Colorado 80916
Voice 719-622-0650, Fax 720-293-0044


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




Re: AW: FO to RTF

2002-07-27 Thread Peter B. West

Hansuli,

I tentatively suggested using XSLT to generate RTF a little while ago, 
but I had no idea whether it was feasible.  The main question would seem 
to be: is RTF a text-only format or a binary format?  Can anyone answer 
that one for us?

Peter

J.U. Anderegg wrote:
> Document formats can be layered very roughly like this:
> 
> 1. Structured documents: marked up, tagged CONTENT - document elements like
> "heading", "index entry" and even "customer address" in a specific
> application:
>   - presentation, pagination controlled by style sheets/macros, perhaps
> depending on output device/target
>   - examples: HTML, Word with templates
> 
> 2. Document formats controlling pagination
>   - examples: WordPad, XSL:FO
> 
> 3. Device dependent, paginated output streams
>   - examples: PCL, PostScript
> 
> An other view is: revisable vs. final formats
> 
> RTF at layer 1) and 2): a text generator outputs RTF. A transform from XML
> data can be implemented with XSLT. A conversion from XSL:FO might be
> realized at layer 2), but probably fail because of incompatible
> concepts/details.
> 
> RTF is the format of yesterday: better generate MicroSoft Office XML or Open
> Office XML.
> ___
> 
> PDF Java Viewer: who can do much better than Adobe? If no Acrobat Reader is
> available, output PostScript and use GhostView instead of AWT.

-- 
Peter B. West  [EMAIL PROTECTED]  http://powerup.com.au/~pbwest
"Lord, to whom shall we go?"


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




AW: FO to RTF

2002-07-24 Thread J.U. Anderegg

Rendering RTF from the FOP area tree will produce a document edited without
template (.dot).

RTF is a revisable format - not a formatted document format. XSL:FO is an
extensive formatting language without any kind document elements (like
Adobe's e-Book), macros or stylesheets in the original meaning. Have a look
at Microsoft's Office XML and you will  see incompatible concepts. RTF
generation has to happen at the XSLT layer.

Hansuli Anderegg, Zurich





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