You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Diwaker Gupta <di...@gmail.com> on 2004/07/23 22:22:52 UTC
XHTML, CSS and Javascript
Hi everyone,
I try to avoid Javascript as much as possible in my webpages -- not
that I have anything against JS, but I just like to stick to XHTML and
CSS as far as possible. Having said that, there are 2 things in
particular in Forrest that seem to rely on Javascript, but need not
be:
o First is the "Last published" timestamp that gets printed in some of
the skins. Given that forrest uses such powerful technologies as Java,
XML and XSLT, it should be pretty trivial to automagically generate
the last modified timestamp for skins that want to use it. I gather
that there is no direct way of doing this in XSLT as yet -- v2.0 is
going to have timestamping built it. But for now people resort to XSLT
extensions which in turn use JS or Java. Anyways, my point is can't we
do this without using Javascript?
o Secondly, since we already have the complete sitemap in site.xml,
why do we need a Javascript to generate the breadcrumbs trail? It
should be easy to simply use site.xml to statically put the code for
the trail in the generated HTML.
Diwaker
--
Diwaker Gupta
http://resolute.ucsd.edu/diwaker
Re: XHTML, CSS and Javascript
Posted by David Crossley <cr...@apache.org>.
Diwaker Gupta wrote:
> Thorsten Scherler wrote:
> > ....but since it works in any browser and it small I do not see the need
> > to change that yet. Like you said in xslt v2.0 it will be build in, I
> > rather wait for that. What is the advantage to drop the javascript?
>
> There are several reasons I avoid Javascript for:
> o it *does not* work in all browsers(text based browsers like w3m and elinks)
> o AFAIK its not endorsed or standardized by any standards body. Its
> maintained and developed by Netscape, and I'd rather use a w3c
> alternative instead
> o though the scipts forrest uses are trivial, they nevertheless run on
> the client side. I want to avoid client-side code as much as possible.
I agree with those and have an additional one:
* Many government agencies have mandates that say developers
cannot use javascript unless they also provide similar functionality
using other means. Some agencies even switch off javascript.
> Just because something IS possible in Javascript doesn't really mean
> thats the best way to do it. IMHO using Cocoon/XSLT is a much neater
> solution.
Absolutely. It would be great if you can help us to achieve that.
> But then again, all these reasons are sort of personal; like I said
> earlier I have nothing against Javascript per se.
There are some situations where we do need it, so we won't
be banning its use :-)
--
David Crossley
Re: XHTML, CSS and Javascript
Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi escribió:
>
>
> We know that the way Javascript is used in Forrest ATM is not correct,
> but it was done just because it was faster to implement.
>
> Patches to change this and hace it done serverside are welcome :-)
>
>> But then again, all these reasons are sort of personal; like I said
>> earlier I have nothing against Javascript per se.
>
>
There is already a bug for this, maybe we need to put more info on the
bug report so people is able to come up with a patch.
http://issues.cocoondev.org/jira/secure/ViewIssue.jspa?key=FOR-134
Re: XHTML, CSS and Javascript
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Diwaker Gupta wrote:
> On Fri, 23 Jul 2004 23:02:08 +0200, Thorsten Scherler
> <th...@apache.org> wrote:
>
>>....but since it works in any browser and it small I do not see the need
>>to change that yet. Like you said in xslt v2.0 it will be build in, I
>>rather wait for that. What is the advantage to drop the javascript?
>
> There are several reasons I avoid Javascript for:
> o it *does not* work in all browsers(text based browsers like w3m and elinks)
> o AFAIK its not endorsed or standardized by any standards body.
> Its maintained and developed by Netscape, and I'd rather use a w3c
> alternative instead
@see ECMAscript
> o though the scipts forrest uses are trivial, they nevertheless run on
> the client side. I want to avoid client-side code as much as possible.
>
> Just because something IS possible in Javascript doesn't really mean
> thats the best way to do it. IMHO using Cocoon/XSLT is a much neater
> solution.
We know that the way Javascript is used in Forrest ATM is not correct,
but it was done just because it was faster to implement.
Patches to change this and hace it done serverside are welcome :-)
> But then again, all these reasons are sort of personal; like I said
> earlier I have nothing against Javascript per se.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: XHTML, CSS and Javascript
Posted by Diwaker Gupta <di...@gmail.com>.
On Fri, 23 Jul 2004 23:02:08 +0200, Thorsten Scherler
<th...@apache.org> wrote:
> ....but since it works in any browser and it small I do not see the need
> to change that yet. Like you said in xslt v2.0 it will be build in, I
> rather wait for that. What is the advantage to drop the javascript?
There are several reasons I avoid Javascript for:
o it *does not* work in all browsers(text based browsers like w3m and elinks)
o AFAIK its not endorsed or standardized by any standards body. Its
maintained and developed by Netscape, and I'd rather use a w3c
alternative instead
o though the scipts forrest uses are trivial, they nevertheless run on
the client side. I want to avoid client-side code as much as possible.
Just because something IS possible in Javascript doesn't really mean
thats the best way to do it. IMHO using Cocoon/XSLT is a much neater
solution.
But then again, all these reasons are sort of personal; like I said
earlier I have nothing against Javascript per se.
--
Diwaker Gupta
http://resolute.ucsd.edu/diwaker
Re: XHTML, CSS and Javascript
Posted by Thorsten Scherler <th...@apache.org>.
Diwaker Gupta wrote:
> Hi everyone,
>
> I try to avoid Javascript as much as possible in my webpages -- not
> that I have anything against JS, but I just like to stick to XHTML and
> CSS as far as possible. Having said that, there are 2 things in
> particular in Forrest that seem to rely on Javascript, but need not
> be:
>
> o First is the "Last published" timestamp that gets printed in some of
> the skins. Given that forrest uses such powerful technologies as Java,
> XML and XSLT, it should be pretty trivial to automagically generate
> the last modified timestamp for skins that want to use it. I gather
> that there is no direct way of doing this in XSLT as yet -- v2.0 is
> going to have timestamping built it. But for now people resort to XSLT
> extensions which in turn use JS or Java. Anyways, my point is can't we
> do this without using Javascript?
>
I am working on a new skin if you send a patch I will try it out!
...but since it works in any browser and it small I do not see the need
to change that yet. Like you said in xslt v2.0 it will be build in, I
rather wait for that. What is the advantage to drop the javascript?
> o Secondly, since we already have the complete sitemap in site.xml,
> why do we need a Javascript to generate the breadcrumbs trail? It
> should be easy to simply use site.xml to statically put the code for
> the trail in the generated HTML.
>
The thing is that it takes the path of the final destination in to
count. It will look for the URL and add folder to he breadline. Again it
is working fine and I do not see the need to change that.
King regards
thorsten
--
<thorsten>
<name>Thorsten Scherler</name>
<country>Spain</country>
<@m...@mail>
<@cocoon-WIKI>
http://wiki.apache.org/cocoon/Scherler
</...@cocoon-WIKI>
<acronymfinder>
http://www.acronymfinder.com/af-query.asp?String=exact&Find=Find&Acronym=
</acronymfinder>
<motto>
"My task which I am trying to achieve is,
by the power of the written word,
[...] to make you see."
*Joseph Conrad (1857-1924)*
</motto>
</thorsten>
Re: XHTML, CSS and Javascript
Posted by Jason Lane <ja...@root10.net>.
On 23 Jul 2004, at 21:22, Diwaker Gupta wrote:
> Hi everyone,
>
> I try to avoid Javascript as much as possible in my webpages -- not
> that I have anything against JS, but I just like to stick to XHTML and
> CSS as far as possible. Having said that, there are 2 things in
> particular in Forrest that seem to rely on Javascript, but need not
> be:
>
> o First is the "Last published" timestamp that gets printed in some of
> the skins. Given that forrest uses such powerful technologies as Java,
> XML and XSLT, it should be pretty trivial to automagically generate
> the last modified timestamp for skins that want to use it. I gather
> that there is no direct way of doing this in XSLT as yet -- v2.0 is
> going to have timestamping built it. But for now people resort to XSLT
> extensions which in turn use JS or Java. Anyways, my point is can't we
> do this without using Javascript?
For this need to look at input modules in Cocoon:
http://cocoon.apache.org/2.1/userdocs/concepts/modules-ref.html
>
> o Secondly, since we already have the complete sitemap in site.xml,
> why do we need a Javascript to generate the breadcrumbs trail? It
> should be easy to simply use site.xml to statically put the code for
> the trail in the generated HTML.
>
> Diwaker
> --
> Diwaker Gupta
> http://resolute.ucsd.edu/diwaker
>
>
Jason Lane
Developer
Root10 developments
http://www.root10.net
no need to Cc dev list (Was: XHTML, CSS and Javascript)
Posted by David Crossley <cr...@apache.org>.
Diwaker Gupta wrote:
> Hi everyone,
Thanks for your feedback. However there is no need to
send Cc to the dev list, as developers are probably
subscribed to both lists. Discuss on whichever list
that you feel is appropriate, but don't bother with
sending copies, as that tends to fragment the discussion.
--
David Crossley