Valid XHTML in template file

Thy, Kristian Kristian.Thy at ATKINSGLOBAL.COM
Tue Aug 15 11:23:45 EDT 2006


Hi List,

I'm trying to make a template file that's valid XHTML. All is well and
fine, except for the zoom direction. I have three radio buttons, "zoom
in", "pan" and "zoom out". The template mechanism gives me the
[zoomdir_-1|0|1_check|select] substitution that is then set as
[zoomdir_1_check], [zoomdir_0_check] and [zoomdir_-1_check]
respectively.

Problem is that in order to make valid XHTML Transitional, the checked
element needs to have the attribute checked="checked", while the others
need to have no such attribute. If I make the three radio buttons like
this:

	<input type="radio" name="zoomdir" value="1" [zoomdir_1_check]
/>
	<input type="radio" name="zoomdir" value="0" [zoomdir_0_check]
/>
	<input type="radio" name="zoomdir" value="-1" [zoomdir_-1_check]
/>

the selected element will get the shorthand attribute checked (with no
value set) which is valid for HTML4. If I do it the XHTML way:

	<input type="radio" name="zoomdir" value="1"
checked="[zoomdir_1_check]" />
	<input type="radio" name="zoomdir" value="0"
checked="[zoomdir_0_check]" />
	<input type="radio" name="zoomdir" value="-1"
checked="[zoomdir_-1_check]" />

the selected zoom direction will get checked="checked", which is good,
but the other two will get checked="", which is illegal. Is there no way
to create valid XHTML like this with the template file mechanism?


thanks in advance,
Kristian Thy
Atkins Denmark


This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding.



More information about the mapserver-users mailing list