Welcome to Dream.In.Code
Getting Help is Easy!

Join 117,283 Programmers for FREE! Ask your question and get quick answers from experts. There are 2,207 online right now! We've got more than 500 tutorials and 2,000 snippets. Join and find out why Dream.In.Code is the #1 programming help community on the internet! Registration is fast and FREE... Join Now!



XHTML 1.0 Strict Validation warning on cfquery SELECT statement

 
Reply to this topicStart new topic

XHTML 1.0 Strict Validation warning on cfquery SELECT statement, Moderator - duplicate post - delete this one!

bpb
post 23 May, 2008 - 04:42 PM
Post #1


New D.I.C Head

*
Joined: 2 May, 2008
Posts: 14



Thanked 1 times
My Contributions


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!):
CODE
    <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:

CODE
<!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?

This post has been edited by bpb: 23 May, 2008 - 05:38 PM
User is offlineProfile CardPM

Go to the top of the page

Fast ReplyReply to this topicStart new topic
Time is now: 10/6/08 10:50PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month