You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Ralph Churchill <mr...@yahoo.com> on 2004/04/16 20:31:27 UTC
XHTML
I noticed that while, with the expection of 'jwcid',
the XHTML I create is valid XHTML, the "output" from
Tapestry is not. Now, am I correct in understanding
that this is due the markup writer? Does an XHTML
markup writer exist? It seems like a waste to spend
time creating valid XHTML, only to have it lost after
running it through Tapestry...
RMC
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: XHTML
Posted by Robert <ca...@linuxmail.org>.
prajna2@prajnait.com wrote:
> My first guess is whether you've set the property for the html headers
> that declare it xhtml vs. html 4.0. This can be set in the
> .application file It's only a guess, but it might be that's the only
> thing keeping your page from being validated (if you're using an
> automatic validator).
>
> == Ezra e.
>
What do you put in the .application file to get XHTML instead of HTML? I
cannot find it in the docs.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: XHTML
Posted by pr...@prajnait.com.
My first guess is whether you've set the property for the html headers
that declare it xhtml vs. html 4.0. This can be set in the
.application file It's only a guess, but it might be that's the only
thing keeping your page from being validated (if you're using an
automatic validator).
== Ezra e.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: XHTML
Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
With all due respect, I think that would lead to some very complicated code.
Having to check which DOCTYPE to use each time you'd like to emit an
attribute (or similar) would also be very inconvenient. I think the Tapestry
Community should make a statement and exclude all non-XHTML-compliant code
from the framework. I am aware, though, that this change may not be welcomed
by all developers, but sooner or later we'll all have to go XHTML anyway, so
gradually removing non-XHTML-compliant tags and attributes would, as far as
I'm concerned, be a huge favour to us all. After all, browsers support more
and more CSS-properties, and few attributes exist in (X)HTML that does not
have CSS counterparts. But, as always, that's just my $0.02.
-----Original Message-----
From: Steve Luzynski [mailto:sluzynsk@mac.com]
Sent: Tuesday, April 20, 2004 3:39 AM
To: Tapestry users
Subject: Re: XHTML
...
I've not looked deeply into Tapestry's source code yet (still trying to
learn how to use it well before I start poking at it), but might it be
possible for a component to check the DOCTYPE set by the page it's part
of and adjust itself accordingly? I.e, if the DOCTYPE is XHTML 1.0
Strict, default to not providing any attributes not part of that
doctype; if it's HTML 3.2, go hog wild. :)
...
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: XHTML
Posted by Steve Luzynski <sl...@mac.com>.
On Apr 19, 2004, at 6:41 AM, Howard M. Lewis Ship wrote:
>>
>> I have found a few more instances of this sort of thing
>> (Image creates
>> a border='0' attribute, for example). Do you want bugs on all
>> of them?
>> I assume that the intent is to get Tapestry to emit only semantic
>> (X)HTML so that the resultant output can be styled via CSS
>> instead... I
>> know that would be a big positive in my book; as the app developer I
>> could more or less ignore the looks of the pages as long as I provide
>> an ID or class on every element so my web designer can pretty them up.
>>
>
> That's a problematic example there; I think its very important for
> Image to emit the border for
> compliance with browsers (that otherwise default to an ugly border
> that no-one ever wants). So in
> that specific case, I'd like to see more discussion. Given Tapestry's
> ability to use informal
> parameters, this may no longer be such a big deal.
I agree with the assertion that no one wants borders around their
images 100% - they are hideous and logically shouldn't even be there
unless the image is inside an <a> element (and even then I don't know
many designers who actually want it there).
Two problems, though:
1. border is not a valid attribute for the <img> element in XHTML 1.0 -
it was deprecated in HTML 4.0.
2. The XHTML 1.0 spec states explicitly that XHTML compliant user
agents must ignore any attributes and values they encounter that the UA
does not recognize (Sec 3.2, li #5).
#1 is important to many developers, although it is admittedly at this
point largely philosophical - no UA that I'm aware of actually
validates XHTML at this point (and a border attribute will validate
with the XHTML 1.0 Transitional DTD anyway). #2, though means that a
fully compliant UA will ignore the attribute in the first place and
therefore not solve the problem in the intended fashion.
I've not looked deeply into Tapestry's source code yet (still trying to
learn how to use it well before I start poking at it), but might it be
possible for a component to check the DOCTYPE set by the page it's part
of and adjust itself accordingly? I.e, if the DOCTYPE is XHTML 1.0
Strict, default to not providing any attributes not part of that
doctype; if it's HTML 3.2, go hog wild. :)
Just something to discuss at this point - I'm just starting this
application anyway and can well afford to use the transitional DTD. I'm
afraid that the browser used by 98% of the world still doesn't much
care about standards anyway; as a dedicated Safari & Firefox user I'm
somewhat more aware of the importance of getting the world to a place
where every browser actually works the same.
Thanks,
Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: XHTML
Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
Well, I'm not Eric Meyer, but as far as I know
input[type="checkbox"]
is the only available out-of-the-box option - and, alas, belongs to the CSS2
specification, which few browsers fully support. My choice is usually to
have something like this
input.checkbox, input.radio { border-width:0; }
in my stylesheet and then use these as CSS-classes in my layout. Of course,
special checkboxes/radios must have another style, but then I just add the
border-width:0; in those rules, too. The same thing applies to buttons not
created with the <button>-element.
My guess is, though, that our problems regarding CSS will disappear
eventually, but it might take a while, just as it did for the browser
vendors to implement "proper" CSS1-support.
-Filip S. Adamsen
-----Original Message-----
From: Drew Davidson [mailto:drew@ognl.org]
Sent: Tuesday, April 20, 2004 6:46 PM
To: Tapestry users
Subject: Re: XHTML
...
Now if you could tell me how to turn off the border around checkboxes and
radio buttons I'd be really impressed!
input, select, textarea
{
font-family: verdana,helvetica,arial,sans-serif;
font-size: 0.85em;
border: solid #666699 1px;
}
This produces the desired thin border around textfields, textareas, select
boxes but has the detrimetal side effect of making a thin border around
checkboxes which must be turned off by
<input type="checkbox" style="border: none;" />
Mozilla supports
input[type="checkbox"]
{
border: none;
}
But no one else does :-(
- Drew
--
+---------------------------------+
< Drew Davidson | OGNL Technology >
+---------------------------------+
| Email: drew@ognl.org /
| Web: http://www.ognl.org /
| Vox: (520) 531-1966 <
| Fax: (520) 531-1965 \
| Mobile: (520) 405-2967 \
+---------------------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: XHTML
Posted by Drew Davidson <dr...@ognl.org>.
Filip S. Adamsen wrote:
> Alternatively, the border can be turned of for all images using
>
> img { border-width:0; }
>
> in a global stylesheet. But that's just my $0.02.
Good tip Filip!
Now if you could tell me how to turn off the border around checkboxes and radio buttons I'd be
really impressed!
input, select, textarea
{
font-family: verdana,helvetica,arial,sans-serif;
font-size: 0.85em;
border: solid #666699 1px;
}
This produces the desired thin border around textfields, textareas, select boxes but has the
detrimetal side effect of making a thin border around checkboxes which must be turned off by
<input type="checkbox" style="border: none;" />
Mozilla supports
input[type="checkbox"]
{
border: none;
}
But no one else does :-(
- Drew
--
+---------------------------------+
< Drew Davidson | OGNL Technology >
+---------------------------------+
| Email: drew@ognl.org /
| Web: http://www.ognl.org /
| Vox: (520) 531-1966 <
| Fax: (520) 531-1965 \
| Mobile: (520) 405-2967 \
+---------------------------------+
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: XHTML
Posted by "Filip S. Adamsen" <fi...@stubkjaer-adamsen.dk>.
Alternatively, the border can be turned of for all images using
img { border-width:0; }
in a global stylesheet. But that's just my $0.02.
-Filip S. Adamsen
-----Original Message-----
From: Howard M. Lewis Ship [mailto:hlship@comcast.net]
Sent: Monday, April 19, 2004 1:41 PM
To: 'Tapestry users'
Subject: RE: XHTML
...
That's a problematic example there; I think its very important for Image to
emit the border for
compliance with browsers (that otherwise default to an ugly border that
no-one ever wants). So in
that specific case, I'd like to see more discussion. Given Tapestry's
ability to use informal
parameters, this may no longer be such a big deal.
...
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: XHTML
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
>
> I have found a few more instances of this sort of thing
> (Image creates
> a border='0' attribute, for example). Do you want bugs on all
> of them?
> I assume that the intent is to get Tapestry to emit only semantic
> (X)HTML so that the resultant output can be styled via CSS
> instead... I
> know that would be a big positive in my book; as the app developer I
> could more or less ignore the looks of the pages as long as I provide
> an ID or class on every element so my web designer can pretty them up.
>
That's a problematic example there; I think its very important for Image to emit the border for
compliance with browsers (that otherwise default to an ugly border that no-one ever wants). So in
that specific case, I'd like to see more discussion. Given Tapestry's ability to use informal
parameters, this may no longer be such a big deal.
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components
Creator, HiveMind
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: XHTML
Posted by Steve Luzynski <sl...@mac.com>.
On Apr 16, 2004, at 3:03 PM, Erik Hatcher wrote:
>
> On Apr 16, 2004, at 3:32 PM, Ralph Churchill wrote:
>> <table border=0 cellspacing=0 cellpadding=0
>> align="center">
>>
>> These are trivial errors to correct... should I file a
>> bug?? In the meantime, I can fix them for myself.
>
> Definitely file a bug. We actually should change it so all of these
> types of attributes come from CSS anyway, and not spelled out directly
> in the templates.
I have found a few more instances of this sort of thing (Image creates
a border='0' attribute, for example). Do you want bugs on all of them?
I assume that the intent is to get Tapestry to emit only semantic
(X)HTML so that the resultant output can be styled via CSS instead... I
know that would be a big positive in my book; as the app developer I
could more or less ignore the looks of the pages as long as I provide
an ID or class on every element so my web designer can pretty them up.
-Steve
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: XHTML
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
On Apr 16, 2004, at 3:32 PM, Ralph Churchill wrote:
> <table border=0 cellspacing=0 cellpadding=0
> align="center">
>
> These are trivial errors to correct... should I file a
> bug?? In the meantime, I can fix them for myself.
Definitely file a bug. We actually should change it so all of these
types of attributes come from CSS anyway, and not spelled out directly
in the templates.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: XHTML
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
Please add a bug. Output is only XHTML if the templates as XHTML and, alas, these are not.
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components
Creator, HiveMind
http://howardlewisship.com
> -----Original Message-----
> From: Ralph Churchill [mailto:mrchucho@yahoo.com]
> Sent: Friday, April 16, 2004 3:32 PM
> To: Tapestry users
> Subject: RE: XHTML
>
>
> > How is it not XHTML?
>
> It appears that the specific issues I was having are
> caused by HTML inserted from components in the contrib
> tree. In particular, SimpleTableColumnComponent and
> SimpleTableColumnFormComponent. Stuff like:
>
> <table border=0 cellspacing=0 cellpadding=0
> align="center">
>
> These are trivial errors to correct... should I file a
> bug?? In the meantime, I can fix them for myself.
>
> RMC
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: XHTML
Posted by Ralph Churchill <mr...@yahoo.com>.
> How is it not XHTML?
It appears that the specific issues I was having are
caused by HTML inserted from components in the contrib
tree. In particular, SimpleTableColumnComponent and
SimpleTableColumnFormComponent. Stuff like:
<table border=0 cellspacing=0 cellpadding=0
align="center">
These are trivial errors to correct... should I file a
bug?? In the meantime, I can fix them for myself.
RMC
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: XHTML
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
How is it now XHTML? I believe the default components (such as Shell and Body) follow XHTML
guidelines for element nestings, and attributes are quoted properly, and end tags are always output
(or the /> sequence is used for empty tags).
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components
Creator, HiveMind
http://howardlewisship.com
> -----Original Message-----
> From: Ralph Churchill [mailto:mrchucho@yahoo.com]
> Sent: Friday, April 16, 2004 2:31 PM
> To: tapestry-user@jakarta.apache.org
> Subject: XHTML
>
>
> I noticed that while, with the expection of 'jwcid',
> the XHTML I create is valid XHTML, the "output" from
> Tapestry is not. Now, am I correct in understanding
> that this is due the markup writer? Does an XHTML
> markup writer exist? It seems like a waste to spend
> time creating valid XHTML, only to have it lost after
> running it through Tapestry...
>
> RMC
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Tax Center - File online by April 15th
> http://taxes.yahoo.com/filing.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org