XHTML 1.0 Strict Validation warning on cfquery SELECT statement

This is code I inherited, and have a minor question on XHTML validatio

Page 1 of 1

0 Replies - 2187 Views - Last Post: 23 May 2008 - 04:42 PM Rate Topic: -----

#1 bpb   User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 17
  • Joined: 02-May 08

XHTML 1.0 Strict Validation warning on cfquery SELECT statement

Post icon  Posted 23 May 2008 - 04:42 PM

I've "inherited" a site that was developed circa 1999/2000 and it's pretty buggy at this point. My goal is to redo the site in XHTML Strict and so I'm validating my pages as I go. Here is the code I've got (datasource name changed to protect the embarassed!):
	<cfquery datasource="database" name="qryNext3Events">
		SELECT TOP 3 EventName, EventDesc, StartDate FROM EventsCalendar WHERE (((EventsCalendar.StartDate)>#Now()#));
		</cfquery>
		<cfif qryNext3Events.recordcount gt 0>
		<cfoutput query="qryNext3Events">
			<br>
			#EventName#   #dateformat(StartDate,'d-mmm-yyyy')#<!--<br>
			#EventDesc# --><br>
		</cfoutput>
		</cfif>


Now this does work, and here is the page DOCTYPE info:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />


etc. Now for my question: when I validate the page containing this cfquery it does validate, but gives a warning about a greater than sign being found between tags and suggests using the XHTML for greater than which, if I do, breaks the code. The greater than sign in question is the one on line 2 above in the "SELECT" statement right after (((EventsCalendar.StartDate) and right before #Now()#)); in the cfml code above.

So what's the warning all about? I thought the greater than sign was a valid operator in the syntax between the cfml tags that shouldn't throw a warning when validating the xhtml. Am I wrong on that, or is the cfquery not done correctly? The page does validate, so it isn't crucial, but I thought your code syntax wasn't checked the same as the XHTML. Any insight into something obvious I'm missing here?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1