You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jason Foster <ja...@engmail.uwaterloo.ca> on 2000/05/24 23:51:36 UTC

"Proper" Way to Generate Formatted HTML

Now that I've got Cocoon working (thanks to tips from the list!) I'm
starting to wonder how I should be generating my content.  The basic
notion of separating logic, content, and presentation makes good sense.
Where I start to have trouble is in deciding how to handle the details
of the presentation.

As it stands, my production chain now looks like this:

     Custom Producer (using JPython) --> in-memory XML  --> XSLT -->
HTML4 w/ tables

As I understand things in HTML 4.0, from the formatting point of view
tables are out and stylesheets (CSS2) are in.  Having used tables for
layout, this sounds like an improvement.

Lurking in the wings is the "other half" of XSL, which according to the
W3 is "an XML vocabulary for specifying formatting semantics."
Unfortunately all of the products I've seen (except FOP) implement the
transform half of the equation.  FOP generates PDF files, which I also
need, but doesn't handle the HTML side of things, and possibly nor
should it.  (Ideally it would generate secure PDF files as well, but
that's another wish).

Since XSL doesn't seem to be a possibility, it looks like I should be
using HTML4 and CSS2.  This means that I now have a separation that
looks like this:

     XML (semantic data) --> HTML4 (presentation data) + CSS2
(formatting data)

Based on this, it looks like the HTML4 doesn't really have any
significant value-add.  It provides the document structure (HEAD, BODY),
but that's all.  It may also be responsible for grouping the XML
information into "chunks" that the CSS2 will arrange on the display,
which would be of some value.

My web application explicitly requires that the user use a "modern"
browser, which I am defining as IE5.5, Mozilla, or Commuicator 4.7+.
According to the XSL home page...

    "CSS can be used with HTML and also with XML, provided that the XML
document has a reasonably linear structure."

...which makes it sound like I can cut the HTML transform out of the
sequence and rely on the browser to apply the CSS2 to the XML.  Somehow
I doubt that even these browsers will support the application of CSS2 to
XML (although I admit that I haven't tried)

So my question(s) for the list can be summed up as:

  1) Is this coverage of the options complete and correct (since I have
to explain this to others)?
  2) Do the modern browsers handle the direct application of CSS2 to
XML?
  3) Is the proper way to segment things...

     Custom Producer (using JPython) --> in-memory XML  (semantic) -->
          in-memory XML (presentation blocks) --> HTML4 (<head>, <body>,
etc.) +
              CSS2 (formatting) + CSS2 (layout)

where somewhere in the XSLT processing variables (cookies, session,
etc.) are used to link the HTML4 to the appropriate formatting and
layout stylesheets?

Thanks for your help.

Jason Foster


Re: "Proper" Way to Generate Formatted HTML

Posted by Ulrich Mayring <ul...@denic.de>.
Stefano Mazzocchi wrote:
> 
> Freedom is the ability to lock up or disclose some information, unlike
> the GPL which _forces_ you to release the stuff you have created, even
> if you don't want to.

I agree to all your points. I thought, however, that the Apache software
license is like the GPL. Obviously, I have to read it one day ;-)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

RE: List of cocoon-format directives

Posted by Ed Staub <es...@mediaone.net>.
It's hard to tell what you need... can you provide more info?
It sounds like you need info on XSLT.

See XSLT Programmer's Reference, by Michael Kay, published by Wrox press.
Or "Practical Transformation Using XSLT and XPath (XSL Transformations and
the XML Path Language)", by G. Ken Holman, available from Crane Softwrights:
http://www.cranesoftwrights.com/.
I find the Holman book very useful as a reference because it can be searched
electronically.
The index to the Kay book is not very good.

In addition, there are numerous online tutorials, etc, but none as
comprehensive, IMHO.

-Ed Staub



List of cocoon-format directives

Posted by adam moore <Ad...@nottingham.ac.uk>.
Can someone please point me to a list of  cocoon-format directives
 or any other means, so that I can produce unescaped xml and so on from my
xsl files, please?

Dr Adam Moore
adam.moore@nottingham.ac.uk
minbar@stayfree.co.uk
mobile: raist-bt@sms.genie.co.uk


Re: "Proper" Way to Generate Formatted HTML

Posted by Stefano Mazzocchi <st...@apache.org>.
Paul Derbyshire wrote:
> 
> At 05:51 PM 5/24/00 -0400, you wrote:
> >(Ideally [FOP] would generate secure PDF files as well, but that's another
> wish).
> 
> No, ideally it would shun "secure" PDF files.
> 
> Secure PDF files were invented by Adobe so that elitists could put
> information in a PDF file and then *restrict peoples' access to it*, and
> are diametrically against the Internet ideal of bringing information to
> people's fingers when they want it, for free (ignoring their connectivity
> costs that is). They are for people who want to *charge money* for mere
> *access to information*. They are a tool of repression. Shun "secure PDF".

I disagree.

In case you didn't notice, you are _NOT_ on a GNU project where such
weak arguments can make RMS-like people happy.

Freedom is the ability to lock up or disclose some information, unlike
the GPL which _forces_ you to release the stuff you have created, even
if you don't want to. 

If I am a e-book author I have to alternatives:

 1) lock up the PDF and sell it directly
 2) free it up and give it to everybody

If you are _wise_ enough and not famous, you take #2, but not because
you believe in this stupid thing of "information wants to be free" (in
fact, I did have to pay my dinners while writing the book).

Or, if you don't care and your micropayment architecture is good enough,
you make the people pay and make a very little price so that is _easier_
to buy the original PDF, rather than to OCR each of the screen pages to
bypass encryption.

It's not a matter of "freedom", but marketing wisdom.

If you could buy CDs for 1$, napster would be instantly killed. If you
could have a free player on Linux and have DVDs for 5$, piracy would be
wasted! Legally? no way, economically. The big copyright holders have to
understand that to beat piracy they have to lower the prices and make it
_easier_ for people to buy original than to buy pirated (or pirate it
yourself).

But, please, don't go around Apache saying "information wants to be
free", we don't believe in the GNU manifesto.

Apache is free because there we lowered our margins on software to null,
but this was the only way to keep control of the substrate where almost
everyone of us works and makes a living out of.

Yes, we do care about people but we also care about their revenues,
unlike people like RMS which always have big MIT-like institutions
behind their backs that pay their salaries.

It's easy to be a "revolutionist" without thinking at the large-scale
consequences of the actions (communism has, in fact, this problem at the
very core).

It's much harder to be an "evolutionist" and considering what little
changes in a system you can control can generates waves of changes that
make the overall system better for everyone.

Sorry for the noise, people, but I simply couln't help not replying.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: "Proper" Way to Generate Formatted HTML

Posted by Ian Abbott <ia...@cinesite.co.uk>.
on 5/24/00 11:37 PM, Paul Derbyshire at derbyshire@globalserve.net
wrote:
> Secure PDF files were invented by Adobe so that elitists could put
> information in a PDF file and then *restrict peoples' access to it*, and
> are diametrically against the Internet ideal of bringing information to
> people's fingers when they want it, for free (ignoring their connectivity
> costs that is). They are for people who want to *charge money* for mere
> *access to information*. They are a tool of repression. Shun "secure PDF".

That is so ridiculously paranoid and elitist in itself. For example, we
need secure PDF so that we can transmit confidential status reports over
an SSL extranet to our clients. Are you suggesting that we should have
our accounts and bidding requests open to the Internet as some kind of
free for all?

Ian

Re: "Proper" Way to Generate Formatted HTML

Posted by Mike Engelhart <me...@earthtrip.com>.
on 5/24/00 11:37 PM, Paul Derbyshire at derbyshire@globalserve.net wrote:

> Secure PDF files were invented by Adobe so that elitists could put
> information in a PDF file and then *restrict peoples' access to it*, and
> are diametrically against the Internet ideal of bringing information to
> people's fingers when they want it, for free (ignoring their connectivity
> costs that is). They are for people who want to *charge money* for mere
> *access to information*. They are a tool of repression. Shun "secure PDF".
Secure PDF was designed to allow secure transfer of confidential or
sensitive documents period. Your paranoid visions of the universe don't
apply to the development of Cocoon.

Mike


Re: "Proper" Way to Generate Formatted HTML

Posted by Paul Derbyshire <de...@globalserve.net>.
At 05:51 PM 5/24/00 -0400, you wrote:
>(Ideally [FOP] would generate secure PDF files as well, but that's another
wish).

No, ideally it would shun "secure" PDF files.

Secure PDF files were invented by Adobe so that elitists could put
information in a PDF file and then *restrict peoples' access to it*, and
are diametrically against the Internet ideal of bringing information to
people's fingers when they want it, for free (ignoring their connectivity
costs that is). They are for people who want to *charge money* for mere
*access to information*. They are a tool of repression. Shun "secure PDF".


-- 
   .*.  "Clouds are not spheres, mountains are not cones, coastlines are not
-()  <  circles, and bark is not smooth, nor does lightning travel in a
   `*'  straight line."    -------------------------------------------------
        -- B. Mandelbrot  |http://surf.to/pgd.net derbyshire@globalserve.net
_____________________ ____|________                          Paul Derbyshire
Programmer & Humanist|ICQ: 10423848|