You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hugh Field-Richards <hs...@megan.demon.co.uk> on 2006/08/03 20:27:42 UTC
Cocoon written in PHP
Hi
Thought I would post on this group about a Cocoon system that I have
done using PHP5 and see if anyone is interested. I know that there
have been one or two enquiries on the news groups and some other
offerings do exist, such as Krysalis and Papoon. However I did not
think another would be too unwelcome.
Paloose is a simplified version of Cocoon using PHP5. It resulted
from scratching a long standing personal itch: that there are very
few ISPs who will support Java/Tomcat for web sites, other than as a
very expensive "professional" addition. Almost all will support PHP5
(sorry, Paloose does not use PHP4) and so I decided to write my own
version of a simple, cut-down Cocoon in PHP5, having used Cocoon for
several years professionally before I retired.
I would much prefer to use Cocoon but the ISP expense was a problem,
so Paloose was born. I use it on two sites that I maintain (as well,
obviously, as the Paloose site).
Try http://www.paloose.org/
Hugh Field-Richards
www.hopvine-music.com
www.paloose.org
Re: Cocoon written in PHP
Posted by Hugh Field-Richards <hs...@megan.demon.co.uk>.
I haven't come across Smarty before so I will need to look at it,
thanks for the link. Currently I am having to sort out my new music
publishing venture so nothing will be happening overnight. However I
should be able to look at it during August and see what what can be
done.
Thanks to everyone for all the interest though.
Hugh
On 4 Aug 2006, at 09:12, Bertrand Delacretaz wrote:
> On 8/4/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
>> ....If you have a link to point me towards a site describing
>> what you are referring to, I will have a look....
>
> I was thinking of templating systems like Smarty,
> http://smarty.php.net/ - AFAIK there are several such templating
> systems that are popular in PHP circles (but I know little about PHP
> in practice).
>
> What I'd find interesting would be an example of how people could get
> data via an HTTP/XML interface, process it with Paloose if needed, and
> at the end of the pipeline generate the final presentation using such
> templating systems.
>
> My use-case is a Cocoon--based CMS where "junior" people currently
> write presentation layers using sitemaps and XSLT. Having a
> well-integrated PHP-based solution that does not require the use of
> XSLT would be an interesting alternative.
>
> -Bertrand
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
Re: [OT] Abuse of div and span
Posted by "spam2006@meeque.de" <sp...@meeque.de>.
> We must agree to differ - a pet peeve of mine is that people use HTML as
> a data structure language rather than as a page mark up language (cf
> TeX) :-) . HTML has absolutely nothing to do with data structuring [...]
-1 (to follow Mark's notation :-)
> The problem is that while HTML undoubtedly has some structural
> information such as paras, headings, lists etc., these are about the
> only ones it has.
Not to forget tables, when they are used to represent tabular data. (Of
course, more often they are used for style purposes only.) Then there
are also structural inline elements, like strong, em, cite, code, etc...
> It also mixes in pure style constructs such as italic
> (which tell you nothing about the structure and why they are italic).
This is not true for modern HTML versions (HTML 4.0 strict, XHTML 1.0
strict, XHTML 1.1), which do not contain style constructs like italic or
bold. And I guess Jason wouldn't suggest to use i or b?
> To be really useful we need to have extra structural tags in the HTML
> such as author, date, version, footnote, inline note, citation ...
Of course, many of those things would be useful in some situations. But
why should the lack of those elements prevent you using the structural
elements which actually exist? I guess for most typical web pages, those
existing structural are virtually sufficient to write good structural
markup.
> [...]
>
> btw I did look at Firefox output with no style and it looked fine. I
> agree you could not see the headings (they looked like paras) but it
> certainly was not unreadable.
Ok, that's good for you. But with no additional effort, you could make
headings, lists, etc visible in this view. Such structural markup would
also carry its meaning, if viewed in Lynx or on a mobile device without
CSS capabilities. And it'd definitely increase accessibility.
A good example of using structural markup, is implementing menus as
nested lists of hyperlinks. With no additional CSS, or when viewed in
Lynx, they simply appear as a textual list of items. But with a few
lines of CSS and maybe two Java-Script statements you can make them
appear as nice drop-down menus. (I used to have a link to a site where
this is demonstrated, but it appears to be broken.)
Sorry, for intervening in this off-topic discussion. But I do have an
opinion on this one, and I feel compelled to share it.
Regards,
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [OT] Abuse of div and span (was: Cocoon written in PHP)
Posted by Hugh Field-Richards <hs...@megan.demon.co.uk>.
No need to apologise - just a figure of speech :-)
But it is a very interesting thought all of this and good to hear.
On 7 Aug 2006, at 19:23, Jason Johnston wrote:
>> I think we are probably having a heated agreement on this one. Point
>> taken - as I said I am not going to lay down my life on this one. I
>> can easily change my generated HTML and probably will after due
>> thought :-)
>
> I apologize, I didn't think it was very heated! But glad that it's an
> "agreement". :-)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
=================================
Dr H.S. Field-Richards
MIEE MIEEE CEng BSc PhD
hsfr@hsfr.org.uk
www.hopvine-music.com
Re: [OT] Abuse of div and span (was: Cocoon written in PHP)
Posted by Jason Johnston <co...@lojjic.net>.
> I think we are probably having a heated agreement on this one. Point
> taken - as I said I am not going to lay down my life on this one. I
> can easily change my generated HTML and probably will after due
> thought :-)
I apologize, I didn't think it was very heated! But glad that it's an
"agreement". :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [OT] Abuse of div and span (was: Cocoon written in PHP)
Posted by Hugh Field-Richards <hs...@megan.demon.co.uk>.
I think we are probably having a heated agreement on this one. Point
taken - as I said I am not going to lay down my life on this one. I
can easily change my generated HTML and probably will after due
thought :-)
Hugh
On 7 Aug 2006, at 18:39, Jason Johnston wrote:
> I don't think we disagree on most of your points. I've never
> suggested
> that HTML can or should be able to mark up any and all types of
> structures; as you rightly point out that is the job of various XML
> vocabularies. And granted there are stylistic elements that have
> crept
> into HTML over time (mostly due to the lack of stylesheets in the
> early
> days), which I'm of course not recommending you use.
>
> HTML is, however, good at marking up the basic content structures you
> identified: headings, paragraphs, lists etc. And of course its
> greatest
> strength is that it is widely understood by all types of user
> agents. So
> since you *are* using HTML after all, is there any harm in using the
> vocabulary it provides that will allow your content to be widely
> understood? That way when a blind user comes across your site and
> their
> screen reader encounters a <h2> element it can "present" it to the
> user in
> a meaningful way, or perhaps a user agent can automatically
> generate an
> outline of the document by inspecting the heading levels. All
> sorts of
> possibilities that a document made entirely of meaningless <div>
> elements
> does not provide.
>
> In my opinion you are underestimating the usefulness of the semantics
> associated with these structural HTML elements, and are throwing
> away *too
> much* information in the pipeline. Surely there's no advantage to
> throwing away that information, is there?
>
> Anyway, gotta get off my soapbox and back to work. ;-) I won't
> spend more
> time on this thread.
> --Jason
>
>
>> We must agree to differ - a pet peeve of mine is that people use HTML
>> as a data structure language rather than as a page mark up language
>> (cf TeX) :-) . HTML has absolutely nothing to do with data
>> structuring - it (with CSS) only determines what goes where on a
>> page. We are trying to use a language which is neither XML
>> (structural) or PostScript (true page mark up) which is why it needs
>> XML and CSS.
>>
>> The problem is that while HTML undoubtedly has some structural
>> information such as paras, headings, lists etc., these are about the
>> only ones it has. It also mixes in pure style constructs such as
>> italic (which tell you nothing about the structure and why they are
>> italic).
>>
>> To be really useful we need to have extra structural tags in the HTML
>> such as author, date, version, footnote, inline note, citation ... -
>> the list is obviously not insubstantial depending on the structure
>> you are representing. Since HTML is not extendable (that was why XML
>> was done) we have a problem. Not until XML + sensible style sheets
>> are used instead of HTML will there be a solution that satisfies both
>> of us.
>>
>> This is why Cocoon is so important - it is all a question of
>> information flow (or some might say, entropy). I can take too much
>> information (in XML) and deliver it in a variety of formats (HTML,
>> PDF etc) by losing information that I do not want. But I cannot go
>> the other way around. For example start with HTML or PDF and produce
>> XML that is the structure that the author intended. Although by
>> clever use of classes etc. you might end up with sufficient XML
>> granularity to achieve this, butI believe that this is against the
>> spirit of the whole thing.
>>
>> So, the question is, does it matter about divs and spans? I believe
>> not because I would not dream of taking HTML and try and do something
>> useful with it (screen scrapping for example) other than displaying
>> it on a browser. If required to interpret the data it is best to
>> deliver it in a form that is amenable to this: raw or processed XML.
>>
>> btw I did look at Firefox output with no style and it looked fine. I
>> agree you could not see the headings (they looked like paras) but it
>> certainly was not unreadable. I would totally agree with you if I had
>> used positional information for the flow, rather than simple vertical
>> stacking. Previous sites that I used Cocoon for always had a facility
>> to output the data for a variety of browsers including Lynx which is
>> styleless.
>>
>> Ultimately it is all a question of how you view HTML. There probably
>> is no "correct" answer to this (cf the big-endian, little-endian holy
>> wars of processor and bus design in the 1980s). Let us hope that XML
>> comes sooner rather than later to the Web. My opinion is that since
>> we are using HTML as page markup it does not really matter using divs
>> and spans, because we get very little other benefit from using <p>
>> and <h1> etc. However it is not something I would stake my life on.
>> It is all a m,atter of personal preference I guess.
>>
>> Thanks for the appreciation of the software though.
>>
>> - Hugh
>>
>> On 7 Aug 2006, at 16:45, Jason Johnston wrote:
>>
>>>> <t:p>Paloose is a simplified (much simplified) version of ... </
>>>> t:p>
>>>>
>>>> There is nothing here that indicates the final look (obviously).
>>>> The
>>>> relevant template
>>>>
>>>> <xsl:template match="t:p" mode="inline-text">
>>>> <xsl:element name="div">
>>>> <xsl:attribute name="class">normalPara</xsl:attribute>
>>>> <xsl:apply-templates mode="inline-text"/>
>>>> </xsl:element>
>>>> </xsl:template>
>>>>
>>>> translates this into a simple HTML div
>>>>
>>>> <div class="normalPara">Paloose is a simplified (much simplified)
>>>> version of ... </div>
>>>
>>> Argh! This is a particular pet peeve of mine. HTML provides the <p>
>>> element specifically for marking up paragraphs. By using a <div>
>>> you've
>>> removed any semantic meaning from the markup! It might as well
>>> not be
>>> HTML at all. You can apply the same CSS styles to any HTML
>>> element, so
>>> why not use something that carries a well-known semantic meaning
>>> that can
>>> be interpreted equally well by non-visual means, and that has a
>>> useful
>>> default styling for when your CSS isn't applied? Same goes for
>>> headings:
>>> <h1>, <h2>, etc. are much more appropriate than divs with special
>>> classes.
>>>
>>> I always find it a good exercise when building a site to view it
>>> without
>>> any CSS applied (in Firefox: View->Page Style->No Style), and if
>>> I can
>>> still clearly see the structure of the page's content (heading
>>> hierarchy,
>>> paragraphs, lists, etc.) then it's good. If on the other hand
>>> all the
>>> paragraphs and headings run together without any visual clues to
>>> their
>>> meaning (as happens with the Paloose site!) then I've probably got
>>> some
>>> work to do.
>>>
>>> Sorry to get off-topic, just hate to see <div> and <span> over-
>>> used in
>>> place of perfectly good semantic HTML.
>>>
>>> Nice software though! I look forward to giving it a try. :-)
>>>
>>> --Jason
>>>
>>>
>>>
>>>
>>> --------------------------------------------------------------------
>>> -
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>
>> =================================
>> Dr H.S. Field-Richards
>> MIEE MIEEE CEng BSc PhD
>> hsfr@hsfr.org.uk
>> www.hopvine-music.com
>>
>>
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
=================================
Dr H.S. Field-Richards
MIEE MIEEE CEng BSc PhD
hsfr@hsfr.org.uk
www.hopvine-music.com
RE: [OT] Abuse of div and span (was: Cocoon written in PHP)
Posted by Geert Josten <ge...@daidalos.nl>.
> In my opinion you are underestimating the usefulness of the
> semantics associated with these structural HTML elements, and
> are throwing away *too
> much* information in the pipeline. Surely there's no
> advantage to throwing away that information, is there?
Just to add my 2 cents.. ;-)
By using headings, paragraphs, etc, instead of div and span for
everything, you give search engines the opportunity to distinguish them
and give more importance to headings over paragraph text.
:-)
Kind regards,
Geert
Drs. G.P.H. Josten
Consultant
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [OT] Abuse of div and span (was: Cocoon written in PHP)
Posted by Jason Johnston <co...@lojjic.net>.
I don't think we disagree on most of your points. I've never suggested
that HTML can or should be able to mark up any and all types of
structures; as you rightly point out that is the job of various XML
vocabularies. And granted there are stylistic elements that have crept
into HTML over time (mostly due to the lack of stylesheets in the early
days), which I'm of course not recommending you use.
HTML is, however, good at marking up the basic content structures you
identified: headings, paragraphs, lists etc. And of course its greatest
strength is that it is widely understood by all types of user agents. So
since you *are* using HTML after all, is there any harm in using the
vocabulary it provides that will allow your content to be widely
understood? That way when a blind user comes across your site and their
screen reader encounters a <h2> element it can "present" it to the user in
a meaningful way, or perhaps a user agent can automatically generate an
outline of the document by inspecting the heading levels. All sorts of
possibilities that a document made entirely of meaningless <div> elements
does not provide.
In my opinion you are underestimating the usefulness of the semantics
associated with these structural HTML elements, and are throwing away *too
much* information in the pipeline. Surely there's no advantage to
throwing away that information, is there?
Anyway, gotta get off my soapbox and back to work. ;-) I won't spend more
time on this thread.
--Jason
> We must agree to differ - a pet peeve of mine is that people use HTML
> as a data structure language rather than as a page mark up language
> (cf TeX) :-) . HTML has absolutely nothing to do with data
> structuring - it (with CSS) only determines what goes where on a
> page. We are trying to use a language which is neither XML
> (structural) or PostScript (true page mark up) which is why it needs
> XML and CSS.
>
> The problem is that while HTML undoubtedly has some structural
> information such as paras, headings, lists etc., these are about the
> only ones it has. It also mixes in pure style constructs such as
> italic (which tell you nothing about the structure and why they are
> italic).
>
> To be really useful we need to have extra structural tags in the HTML
> such as author, date, version, footnote, inline note, citation ... -
> the list is obviously not insubstantial depending on the structure
> you are representing. Since HTML is not extendable (that was why XML
> was done) we have a problem. Not until XML + sensible style sheets
> are used instead of HTML will there be a solution that satisfies both
> of us.
>
> This is why Cocoon is so important - it is all a question of
> information flow (or some might say, entropy). I can take too much
> information (in XML) and deliver it in a variety of formats (HTML,
> PDF etc) by losing information that I do not want. But I cannot go
> the other way around. For example start with HTML or PDF and produce
> XML that is the structure that the author intended. Although by
> clever use of classes etc. you might end up with sufficient XML
> granularity to achieve this, butI believe that this is against the
> spirit of the whole thing.
>
> So, the question is, does it matter about divs and spans? I believe
> not because I would not dream of taking HTML and try and do something
> useful with it (screen scrapping for example) other than displaying
> it on a browser. If required to interpret the data it is best to
> deliver it in a form that is amenable to this: raw or processed XML.
>
> btw I did look at Firefox output with no style and it looked fine. I
> agree you could not see the headings (they looked like paras) but it
> certainly was not unreadable. I would totally agree with you if I had
> used positional information for the flow, rather than simple vertical
> stacking. Previous sites that I used Cocoon for always had a facility
> to output the data for a variety of browsers including Lynx which is
> styleless.
>
> Ultimately it is all a question of how you view HTML. There probably
> is no "correct" answer to this (cf the big-endian, little-endian holy
> wars of processor and bus design in the 1980s). Let us hope that XML
> comes sooner rather than later to the Web. My opinion is that since
> we are using HTML as page markup it does not really matter using divs
> and spans, because we get very little other benefit from using <p>
> and <h1> etc. However it is not something I would stake my life on.
> It is all a m,atter of personal preference I guess.
>
> Thanks for the appreciation of the software though.
>
> - Hugh
>
> On 7 Aug 2006, at 16:45, Jason Johnston wrote:
>
>>> <t:p>Paloose is a simplified (much simplified) version of ... </t:p>
>>>
>>> There is nothing here that indicates the final look (obviously). The
>>> relevant template
>>>
>>> <xsl:template match="t:p" mode="inline-text">
>>> <xsl:element name="div">
>>> <xsl:attribute name="class">normalPara</xsl:attribute>
>>> <xsl:apply-templates mode="inline-text"/>
>>> </xsl:element>
>>> </xsl:template>
>>>
>>> translates this into a simple HTML div
>>>
>>> <div class="normalPara">Paloose is a simplified (much simplified)
>>> version of ... </div>
>>
>> Argh! This is a particular pet peeve of mine. HTML provides the <p>
>> element specifically for marking up paragraphs. By using a <div>
>> you've
>> removed any semantic meaning from the markup! It might as well not be
>> HTML at all. You can apply the same CSS styles to any HTML
>> element, so
>> why not use something that carries a well-known semantic meaning
>> that can
>> be interpreted equally well by non-visual means, and that has a useful
>> default styling for when your CSS isn't applied? Same goes for
>> headings:
>> <h1>, <h2>, etc. are much more appropriate than divs with special
>> classes.
>>
>> I always find it a good exercise when building a site to view it
>> without
>> any CSS applied (in Firefox: View->Page Style->No Style), and if I can
>> still clearly see the structure of the page's content (heading
>> hierarchy,
>> paragraphs, lists, etc.) then it's good. If on the other hand all the
>> paragraphs and headings run together without any visual clues to their
>> meaning (as happens with the Paloose site!) then I've probably got
>> some
>> work to do.
>>
>> Sorry to get off-topic, just hate to see <div> and <span> over-used in
>> place of perfectly good semantic HTML.
>>
>> Nice software though! I look forward to giving it a try. :-)
>>
>> --Jason
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>
> =================================
> Dr H.S. Field-Richards
> MIEE MIEEE CEng BSc PhD
> hsfr@hsfr.org.uk
> www.hopvine-music.com
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: [OT] Abuse of div and span (was: Cocoon written in PHP)
Posted by Hugh Field-Richards <hs...@megan.demon.co.uk>.
We must agree to differ - a pet peeve of mine is that people use HTML
as a data structure language rather than as a page mark up language
(cf TeX) :-) . HTML has absolutely nothing to do with data
structuring - it (with CSS) only determines what goes where on a
page. We are trying to use a language which is neither XML
(structural) or PostScript (true page mark up) which is why it needs
XML and CSS.
The problem is that while HTML undoubtedly has some structural
information such as paras, headings, lists etc., these are about the
only ones it has. It also mixes in pure style constructs such as
italic (which tell you nothing about the structure and why they are
italic).
To be really useful we need to have extra structural tags in the HTML
such as author, date, version, footnote, inline note, citation ... -
the list is obviously not insubstantial depending on the structure
you are representing. Since HTML is not extendable (that was why XML
was done) we have a problem. Not until XML + sensible style sheets
are used instead of HTML will there be a solution that satisfies both
of us.
This is why Cocoon is so important - it is all a question of
information flow (or some might say, entropy). I can take too much
information (in XML) and deliver it in a variety of formats (HTML,
PDF etc) by losing information that I do not want. But I cannot go
the other way around. For example start with HTML or PDF and produce
XML that is the structure that the author intended. Although by
clever use of classes etc. you might end up with sufficient XML
granularity to achieve this, butI believe that this is against the
spirit of the whole thing.
So, the question is, does it matter about divs and spans? I believe
not because I would not dream of taking HTML and try and do something
useful with it (screen scrapping for example) other than displaying
it on a browser. If required to interpret the data it is best to
deliver it in a form that is amenable to this: raw or processed XML.
btw I did look at Firefox output with no style and it looked fine. I
agree you could not see the headings (they looked like paras) but it
certainly was not unreadable. I would totally agree with you if I had
used positional information for the flow, rather than simple vertical
stacking. Previous sites that I used Cocoon for always had a facility
to output the data for a variety of browsers including Lynx which is
styleless.
Ultimately it is all a question of how you view HTML. There probably
is no "correct" answer to this (cf the big-endian, little-endian holy
wars of processor and bus design in the 1980s). Let us hope that XML
comes sooner rather than later to the Web. My opinion is that since
we are using HTML as page markup it does not really matter using divs
and spans, because we get very little other benefit from using <p>
and <h1> etc. However it is not something I would stake my life on.
It is all a m,atter of personal preference I guess.
Thanks for the appreciation of the software though.
- Hugh
On 7 Aug 2006, at 16:45, Jason Johnston wrote:
>> <t:p>Paloose is a simplified (much simplified) version of ... </t:p>
>>
>> There is nothing here that indicates the final look (obviously). The
>> relevant template
>>
>> <xsl:template match="t:p" mode="inline-text">
>> <xsl:element name="div">
>> <xsl:attribute name="class">normalPara</xsl:attribute>
>> <xsl:apply-templates mode="inline-text"/>
>> </xsl:element>
>> </xsl:template>
>>
>> translates this into a simple HTML div
>>
>> <div class="normalPara">Paloose is a simplified (much simplified)
>> version of ... </div>
>
> Argh! This is a particular pet peeve of mine. HTML provides the <p>
> element specifically for marking up paragraphs. By using a <div>
> you've
> removed any semantic meaning from the markup! It might as well not be
> HTML at all. You can apply the same CSS styles to any HTML
> element, so
> why not use something that carries a well-known semantic meaning
> that can
> be interpreted equally well by non-visual means, and that has a useful
> default styling for when your CSS isn't applied? Same goes for
> headings:
> <h1>, <h2>, etc. are much more appropriate than divs with special
> classes.
>
> I always find it a good exercise when building a site to view it
> without
> any CSS applied (in Firefox: View->Page Style->No Style), and if I can
> still clearly see the structure of the page's content (heading
> hierarchy,
> paragraphs, lists, etc.) then it's good. If on the other hand all the
> paragraphs and headings run together without any visual clues to their
> meaning (as happens with the Paloose site!) then I've probably got
> some
> work to do.
>
> Sorry to get off-topic, just hate to see <div> and <span> over-used in
> place of perfectly good semantic HTML.
>
> Nice software though! I look forward to giving it a try. :-)
>
> --Jason
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
=================================
Dr H.S. Field-Richards
MIEE MIEEE CEng BSc PhD
hsfr@hsfr.org.uk
www.hopvine-music.com
Re: [OT] Abuse of div and span (was: Cocoon written in PHP)
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Aug 7, 2006, at 8:45 AM, Jason Johnston wrote:
>>
>> <div class="normalPara">Paloose is a simplified (much simplified)
>> version of ... </div>
>
> Argh! This is a particular pet peeve of mine. HTML provides the <p>
> element specifically for marking up paragraphs. By using a <div>
> you've
> removed any semantic meaning from the markup!
+1 :-)
—ml—
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
[OT] Abuse of div and span (was: Cocoon written in PHP)
Posted by Jason Johnston <co...@lojjic.net>.
> <t:p>Paloose is a simplified (much simplified) version of ... </t:p>
>
> There is nothing here that indicates the final look (obviously). The
> relevant template
>
> <xsl:template match="t:p" mode="inline-text">
> <xsl:element name="div">
> <xsl:attribute name="class">normalPara</xsl:attribute>
> <xsl:apply-templates mode="inline-text"/>
> </xsl:element>
> </xsl:template>
>
> translates this into a simple HTML div
>
> <div class="normalPara">Paloose is a simplified (much simplified)
> version of ... </div>
Argh! This is a particular pet peeve of mine. HTML provides the <p>
element specifically for marking up paragraphs. By using a <div> you've
removed any semantic meaning from the markup! It might as well not be
HTML at all. You can apply the same CSS styles to any HTML element, so
why not use something that carries a well-known semantic meaning that can
be interpreted equally well by non-visual means, and that has a useful
default styling for when your CSS isn't applied? Same goes for headings:
<h1>, <h2>, etc. are much more appropriate than divs with special classes.
I always find it a good exercise when building a site to view it without
any CSS applied (in Firefox: View->Page Style->No Style), and if I can
still clearly see the structure of the page's content (heading hierarchy,
paragraphs, lists, etc.) then it's good. If on the other hand all the
paragraphs and headings run together without any visual clues to their
meaning (as happens with the Paloose site!) then I've probably got some
work to do.
Sorry to get off-topic, just hate to see <div> and <span> over-used in
place of perfectly good semantic HTML.
Nice software though! I look forward to giving it a try. :-)
--Jason
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon written in PHP
Posted by Hugh Field-Richards <hs...@megan.demon.co.uk>.
Thanks for the links. Most of the Paloose site is very orthogonal as
far as content, structure and style is concerned. I make heavy use of
div and span. I intend to put a how2 written with my son (a graphic
designer responsible for my other sites, and a good few others, as
well as being a DeviantArt member) on the whole process of using
Paloose in this way.
One problem is the differing behaviour of all the browsers,
especially flavours of IE :-( . For example IE can have strange
problems with divs and it is better to use tables for the layout
structure. Not ideal, but we have been both caught like this before.
Divs are certainly great but must be used with care. Please be
patient while I put the how2 together.
Looking at the two articles you sent me was interesting. Keeping the
syle, structure and content is easily done in Paloose or Cocoon. I
keep the XML strictly describing the content with concepts such as
paragraphs, headings, lists, links, quotations, foreign words etc.
To take an example of the paragraph in my content:
<t:p>Paloose is a simplified (much simplified) version of ... </t:p>
There is nothing here that indicates the final look (obviously). The
relevant template
<xsl:template match="t:p" mode="inline-text">
<xsl:element name="div">
<xsl:attribute name="class">normalPara</xsl:attribute>
<xsl:apply-templates mode="inline-text"/>
</xsl:element>
</xsl:template>
translates this into a simple HTML div
<div class="normalPara">Paloose is a simplified (much simplified)
version of ... </div>
Again no style information yet - only a structure which may be placed
on the page. The final bit is the CSS file which defines how
paragraphs should look and, if necessary their position, for example
.normalPara {
background-color: #d2cab5;
color: #66766d;
font-family:Verdana, Arial, Helvetica, sans-serif;
padding: 10px 0px 0px 0px;
font-size: 11px;
line-height: 18px;
}
Sorry if all this is stating the obvious but it does illustrate the
orthogonal approach that I use for all my sites. The only problem is
when different bits of structure appear on different pages. This can
only be done with the XSLT which has the necessary functionality. Not
a problem as it is still considered structure. Different houses uses
different bricks but not what colour they are, if you see what I
mean. Having said all this I have a small confession to make on the
Paloose site :-) that in one place I do not currently do it like this
(emphasized text), although it will be changed shortly.
This approach has always been a good way for my son to concentrate on
just the style issues and he only concerns himself with the CSS file
which he can create/edit using other tools.
Regards
Hugh
On 6 Aug 2006, at 00:50, Antony Quinn wrote:
> On the subject of templating, I've recently been experimenting with
> "style-free stylesheets" as pioneered by Eric van der Vlist
> [http://tinyurl.com/kk6on]. Andreas Hartmann wrote a good article
> about
> using the technique in Cocoon
> [http://www.cocooncenter.org/articles/stylefree.html].
>
> Style-free stylesheets are a good way to separate HTML from XSLT,
> and so
> are ideal for working with graphic designers who don't know or don't
> want to know about XSLT.
>
> Cheers,
>
> Antony
>
> Bertrand Delacretaz wrote:
>> On 8/4/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>>> ....If you have a link to point me towards a site describing
>>> what you are referring to, I will have a look....
>> I was thinking of templating systems like Smarty,
>> http://smarty.php.net/ - AFAIK there are several such templating
>> systems that are popular in PHP circles (but I know little about PHP
>> in practice).
>> What I'd find interesting would be an example of how people could get
>> data via an HTTP/XML interface, process it with Paloose if needed,
>> and
>> at the end of the pipeline generate the final presentation using such
>> templating systems.
>> My use-case is a Cocoon--based CMS where "junior" people currently
>> write presentation layers using sitemaps and XSLT. Having a
>> well-integrated PHP-based solution that does not require the use of
>> XSLT would be an interesting alternative.
>> -Bertrand
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
=================================
Dr H.S. Field-Richards
MIEE MIEEE CEng BSc PhD
hsfr@hsfr.org.uk
www.hopvine-music.com
Re: Cocoon written in PHP
Posted by Antony Quinn <aq...@ebi.ac.uk>.
On the subject of templating, I've recently been experimenting with
"style-free stylesheets" as pioneered by Eric van der Vlist
[http://tinyurl.com/kk6on]. Andreas Hartmann wrote a good article about
using the technique in Cocoon
[http://www.cocooncenter.org/articles/stylefree.html].
Style-free stylesheets are a good way to separate HTML from XSLT, and so
are ideal for working with graphic designers who don't know or don't
want to know about XSLT.
Cheers,
Antony
Bertrand Delacretaz wrote:
> On 8/4/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
>> ....If you have a link to point me towards a site describing
>> what you are referring to, I will have a look....
>
> I was thinking of templating systems like Smarty,
> http://smarty.php.net/ - AFAIK there are several such templating
> systems that are popular in PHP circles (but I know little about PHP
> in practice).
>
> What I'd find interesting would be an example of how people could get
> data via an HTTP/XML interface, process it with Paloose if needed, and
> at the end of the pipeline generate the final presentation using such
> templating systems.
>
> My use-case is a Cocoon--based CMS where "junior" people currently
> write presentation layers using sitemaps and XSLT. Having a
> well-integrated PHP-based solution that does not require the use of
> XSLT would be an interesting alternative.
>
> -Bertrand
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Re: Cocoon written in PHP
Posted by Bertrand Delacretaz <bd...@apache.org>.
On 8/4/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
> ....If you have a link to point me towards a site describing
> what you are referring to, I will have a look....
I was thinking of templating systems like Smarty,
http://smarty.php.net/ - AFAIK there are several such templating
systems that are popular in PHP circles (but I know little about PHP
in practice).
What I'd find interesting would be an example of how people could get
data via an HTTP/XML interface, process it with Paloose if needed, and
at the end of the pipeline generate the final presentation using such
templating systems.
My use-case is a Cocoon--based CMS where "junior" people currently
write presentation layers using sitemaps and XSLT. Having a
well-integrated PHP-based solution that does not require the use of
XSLT would be an interesting alternative.
-Bertrand
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon written in PHP
Posted by Hugh Field-Richards <hs...@megan.demon.co.uk>.
I have not looked at anything else but XSL transforms because of my
background with Cocoon itself. I also wanted to be able to port
whatever I did in Paloose back to Cocoon with the minimum of change
(and effort). If people are interested then I might have a look at
other methods of transformation. If you have a link to point me
towards a site describing what you are referring to, I will have a look.
Hugh
On 4 Aug 2006, at 08:08, Bertrand Delacretaz wrote:
> Hi Hugh,
>
> On 8/3/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
>> ... Thought I would post on this group about a Cocoon system that
>> I have done
>> using PHP5 and see if anyone is interested...
>
> Thanks for sharing this, it is interesting indeed!
>
> IIUC, currently you're using XSLT to transform your data to HTML -
> does Paloose also allow one to use the "standard" PHP-based templating
> systems to generate the final presentation? I'm sure it is possible,
> but if you have examples of how this fits together I'd be interested.
>
> -Bertrand
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
=================================
H.S. Field-Richards
hsfr@hsfr.org.uk
www.paloose.org
www.hopvine-music.com
Re: Cocoon written in PHP
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi Hugh,
On 8/3/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>... Thought I would post on this group about a Cocoon system that I have done
> using PHP5 and see if anyone is interested...
Thanks for sharing this, it is interesting indeed!
IIUC, currently you're using XSLT to transform your data to HTML -
does Paloose also allow one to use the "standard" PHP-based templating
systems to generate the final presentation? I'm sure it is possible,
but if you have examples of how this fits together I'd be interested.
-Bertrand
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon written in PHP
Posted by Jonas Lundberg <my...@gmail.com>.
This looks truly excellent! Thank's for sharing it.
Regards
Hans
On 8/3/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
>
> Hi
>
> Thought I would post on this group about a Cocoon system that I have done
> using PHP5 and see if anyone is interested. I know that there have been one
> or two enquiries on the news groups and some other offerings do exist, such
> as Krysalis and Papoon. However I did not think another would be too
> unwelcome
>.
> ...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Paloose Tidy Generator ( was Re: Cocoon written in PHP)
Posted by Jonas Lundberg <my...@gmail.com>.
That sounds good! I atttach a typical file.
Hans
On 8/9/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
> Hi Hans
>
> Could you give me an example of a typical file you would like to process
> so I can test the tidy/generator mechanism in Paloose.I have done one
> but I would like to check it first :-)
>
> Thanks
>
> Hugh
>
>
>
> On 7 Aug 2006, at 14:29, Jonas Lundberg wrote:
>
> Yes, exactly. I want to tidy the word html file before doing other
> transformations. That would be very useful. I expect that it will then
> be easy to create a small CMS, with limited functionality, based on
> that.
>
> Regards
> Hans
>
>
>
> On 8/7/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
> I will have a look at tidy as soon as I can. I tried building my PHP5 with
> tidy included but I am getting errors. I will keep trying ...
>
> I am assuming that you want to input a Word file (formatted as HTML) and
> "tidy" it before sending down the Paloose pipe before other
> transformations. If you only want to generate tidied code from existing XML
> transformed into HTML then tidy is not really needed as the results from the
> serialize component in the pipeline already effectively does a tidy
> function: well formed HTML etc.
>
> Is this what you want to do ?
>
> Regards
>
> Hugh
>
>
> On 7 Aug 2006, at 10:14, Jonas Lundberg wrote:
>
>
> Would it be possible / easy (?) to include a html tidy generator in
> paloose, do you think?
> Something like: http://www.coggeshall.org/oss/tidy/
> (I am not an expert on PHP, so this might be a very basic question...
> maybe even a stupid one...)
> I'd like to use Tidy, because then Word (saved as html) can be used as
> a simple front-end for authoring content.
>
> Regards
> Hans
>
> On 8/3/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
>
> Hi
>
> Thought I would post on this group about a Cocoon system that I have done
> using PHP5 and see if anyone is interested. I know that there have been one
> or two enquiries on the news groups and some other offerings do exist, such
> as Krysalis and Papoon. However I did not think another would be too
> unwelcome.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
Paloose Tidy Generator ( was Re: Cocoon written in PHP)
Posted by Hugh Field-Richards <hs...@megan.demon.co.uk>.
Hi Hans
Could you give me an example of a typical file you would like to process
so I can test the tidy/generator mechanism in Paloose.I have done one
but I would like to check it first :-)
Thanks
Hugh
On 7 Aug 2006, at 14:29, Jonas Lundberg wrote:
> Yes, exactly. I want to tidy the word html file before doing other
> transformations. That would be very useful. I expect that it will then
> be easy to create a small CMS, with limited functionality, based on
> that.
>
> Regards
> Hans
>
>
>
> On 8/7/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>>
>> I will have a look at tidy as soon as I can. I tried building my
>> PHP5 with
>> tidy included but I am getting errors. I will keep trying ...
>>
>> I am assuming that you want to input a Word file (formatted as
>> HTML) and
>> "tidy" it before sending down the Paloose pipe before other
>> transformations. If you only want to generate tidied code from
>> existing XML
>> transformed into HTML then tidy is not really needed as the
>> results from the
>> serialize component in the pipeline already effectively does a tidy
>> function: well formed HTML etc.
>>
>> Is this what you want to do ?
>>
>> Regards
>>
>> Hugh
>>
>>
>> On 7 Aug 2006, at 10:14, Jonas Lundberg wrote:
>>
>>
>> Would it be possible / easy (?) to include a html tidy generator in
>> paloose, do you think?
>> Something like: http://www.coggeshall.org/oss/tidy/
>> (I am not an expert on PHP, so this might be a very basic question...
>> maybe even a stupid one...)
>> I'd like to use Tidy, because then Word (saved as html) can be
>> used as
>> a simple front-end for authoring content.
>>
>> Regards
>> Hans
>>
>> On 8/3/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>>
>>
>> Hi
>>
>> Thought I would post on this group about a Cocoon system that I
>> have done
>> using PHP5 and see if anyone is interested. I know that there have
>> been one
>> or two enquiries on the news groups and some other offerings do
>> exist, such
>> as Krysalis and Papoon. However I did not think another would be too
>> unwelcome.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>>
>>
>>
>>
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
Re: Cocoon written in PHP
Posted by Jonas Lundberg <my...@gmail.com>.
Yes, exactly. I want to tidy the word html file before doing other
transformations. That would be very useful. I expect that it will then
be easy to create a small CMS, with limited functionality, based on
that.
Regards
Hans
On 8/7/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
> I will have a look at tidy as soon as I can. I tried building my PHP5 with
> tidy included but I am getting errors. I will keep trying ...
>
> I am assuming that you want to input a Word file (formatted as HTML) and
> "tidy" it before sending down the Paloose pipe before other
> transformations. If you only want to generate tidied code from existing XML
> transformed into HTML then tidy is not really needed as the results from the
> serialize component in the pipeline already effectively does a tidy
> function: well formed HTML etc.
>
> Is this what you want to do ?
>
> Regards
>
> Hugh
>
>
> On 7 Aug 2006, at 10:14, Jonas Lundberg wrote:
>
>
> Would it be possible / easy (?) to include a html tidy generator in
> paloose, do you think?
> Something like: http://www.coggeshall.org/oss/tidy/
> (I am not an expert on PHP, so this might be a very basic question...
> maybe even a stupid one...)
> I'd like to use Tidy, because then Word (saved as html) can be used as
> a simple front-end for authoring content.
>
> Regards
> Hans
>
> On 8/3/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
>
> Hi
>
> Thought I would post on this group about a Cocoon system that I have done
> using PHP5 and see if anyone is interested. I know that there have been one
> or two enquiries on the news groups and some other offerings do exist, such
> as Krysalis and Papoon. However I did not think another would be too
> unwelcome.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
> =================================
> Dr H.S. Field-Richards
> MIEE MIEEE CEng BSc PhD
> hsfr@hsfr.org.uk
> www.hopvine-music.com
>
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon written in PHP
Posted by Hugh Field-Richards <hs...@megan.demon.co.uk>.
I will have a look at tidy as soon as I can. I tried building my PHP5
with tidy included but I am getting errors. I will keep trying ...
I am assuming that you want to input a Word file (formatted as HTML)
and "tidy" it before sending down the Paloose pipe before other
transformations. If you only want to generate tidied code from
existing XML transformed into HTML then tidy is not really needed as
the results from the serialize component in the pipeline already
effectively does a tidy function: well formed HTML etc.
Is this what you want to do ?
Regards
Hugh
On 7 Aug 2006, at 10:14, Jonas Lundberg wrote:
> Would it be possible / easy (?) to include a html tidy generator in
> paloose, do you think?
> Something like: http://www.coggeshall.org/oss/tidy/
> (I am not an expert on PHP, so this might be a very basic question...
> maybe even a stupid one...)
> I'd like to use Tidy, because then Word (saved as html) can be used as
> a simple front-end for authoring content.
>
> Regards
> Hans
>
> On 8/3/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>>
>>
>> Hi
>>
>> Thought I would post on this group about a Cocoon system that I
>> have done
>> using PHP5 and see if anyone is interested. I know that there have
>> been one
>> or two enquiries on the news groups and some other offerings do
>> exist, such
>> as Krysalis and Papoon. However I did not think another would be too
>> unwelcome.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
=================================
Dr H.S. Field-Richards
MIEE MIEEE CEng BSc PhD
hsfr@hsfr.org.uk
www.hopvine-music.com
Re: Cocoon written in PHP
Posted by Jonas Lundberg <my...@gmail.com>.
Would it be possible / easy (?) to include a html tidy generator in
paloose, do you think?
Something like: http://www.coggeshall.org/oss/tidy/
(I am not an expert on PHP, so this might be a very basic question...
maybe even a stupid one...)
I'd like to use Tidy, because then Word (saved as html) can be used as
a simple front-end for authoring content.
Regards
Hans
On 8/3/06, Hugh Field-Richards <hs...@megan.demon.co.uk> wrote:
>
>
> Hi
>
> Thought I would post on this group about a Cocoon system that I have done
> using PHP5 and see if anyone is interested. I know that there have been one
> or two enquiries on the news groups and some other offerings do exist, such
> as Krysalis and Papoon. However I did not think another would be too
> unwelcome.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org