1
RVirtue
Netquery XHTML Compliance - Guru Question
  • 2005/2/2 14:48

  • RVirtue

  • Quite a regular

  • Posts: 246

  • Since: 2004/8/4 9


As noted here in an earlier thread, I've been working on making the next release of the Netquery module fully compliant with XML/XSL standards -- or at least consistent with current XOOPS core compliance with XHTML 1.0 Transitional. For anyone interested, a v2.2 pre-release test installation can be seen by clicking the XOOPS Demo button athttp://www.virtech.org/tools/

I've been able to resolve most W3C validation issues, but precise information on the use of tables together with forms seems a bit hard to pin down and I'd be very grateful for any input from you XML gurus out there.

Here's what I think I've discovered so far.

It seems that there are only two ways to get pages fully XML/XHTML validated when using forms together with tables. The first "acceptable" way is to place the whole form entirely within a single cell of the table -- which kinda defeats the entire purpose of using a table in the first place. The second way is to put the table entirely within the form as follows: the initial <form> tag is placed before the <table> tag, then every form <input> (incuding hidden inputs) must be placed within a table cell, and then the </table> and </form> must be closed in that order.

Is that right, or have my searches missed something somewhere that I should have found?

2
ackbarr
Re: Netquery XHTML Compliance - Guru Question

those are your two basic options, though the reason isn't just for xhtml compliance. HTML documents should nest elements properly, meaning this is incorrect:
<form><table><tr><td></td></tr></form></table>

But this is:
<form><table><tr><td></td></tr></table></form>

The first example is incorrect because the form element is closed before its nested element, table is closed. The second example closes table first, so the elements are nested properly.

3
RVirtue
Re: Netquery XHTML Compliance - Guru Question
  • 2005/2/2 15:18

  • RVirtue

  • Quite a regular

  • Posts: 246

  • Since: 2004/8/4 9


Thanks, ackbarr. Actually, nesting wasn't the key issue as such. I knew that tags must always be nested correctly in all cases.

In this particular case, however, it appears that the layout order has to be <form> <table> </table> </form>. From what I've been able to discover, the <table> <form> </form> </table> order, even 'tho it is also correctly nested, is not valid unless the entire form is contained within a single cell of the table.

Am I missing some different approach with XHTML compliance?

4
studioC
Re: Netquery XHTML Compliance - Guru Question
  • 2005/2/2 15:43

  • studioC

  • Friend of XOOPS

  • Posts: 922

  • Since: 2003/12/7


hello richard,

clicking at the link:
http://xoops.virtech.org/tools/


gave me a 404

visiting:
http://xoops.virtech.org/modules/netquery/


and browsing through the module netquery, i can not find validate errors at first view.

and i see you're using the form within a div without any problem. Solved?

btw. is it a problem for you to add the option
<option value=".de">.de</option> and querry german domains for your german friends ?

michael

5
jmass
Re: Netquery XHTML Compliance - Guru Question
  • 2005/2/2 15:44

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


<table> <form> <form> </table>.........

I assume you meant: <table> <form> </form> </table>

I believe that the reason is that the table itself is an element. So is the form. So it is invalid because you have two elements that overlap, which is not allowed.

No overlapping elements... That is why it is called STRICT XHTML not LAX XHTML

6
RVirtue
Re: Netquery XHTML Compliance - Guru Question
  • 2005/2/2 17:05

  • RVirtue

  • Quite a regular

  • Posts: 246

  • Since: 2004/8/4 9


Jeez, two mistakes in one thread. I promise that my code isn't as sloppy as my messages.

@StudioC: Sorry, but the .de whois server is very "secretive" and doesn't seem to cooperate with direct queries on port 43. I haven't yet been able to figure out a workaround myself. If you have downloaded your own copy of netquery and have discovered a way to make that server respond with anything more than a "connect" message, I'd be grateful for your solution.

@JMass: Actually, XOOPS only goes to the XHTML 1.0 Transitional validator. So it's not strictly STRICT. But never mind.

Anyhow, you're right about the tags. (Message error corrected.) I agree that both tables and forms are elements. What puzzles me is that W3C happily validates a table inside a form, but it spits at a form inside a table in most cases.

Oh well, as Michael has noted, I think I've managed to get around the issue in another way. Thanks.

7
jmass
Re: Netquery XHTML Compliance - Guru Question
  • 2005/2/2 21:29

  • jmass

  • Friend of XOOPS

  • Posts: 524

  • Since: 2003/12/18


The validator said something about inline vs absolute elements. Form and table must be different types of elements. on can be inside of the other but not vice versa.

Login

Who's Online

174 user(s) are online (91 user(s) are browsing Support Forums)


Members: 0


Guests: 174


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits