W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2004

[whatwg] WEB_FORMS 2.0 comment, repetition model, using reserved macro scripting syntax

From: Ben Meadowcroft <ben@benmeadowcroft.com>
Date: Sat, 10 Jul 2004 20:06:00 +0100
Message-ID: <001b01c466b0$f40f09c0$63fc68d5@BensPC>
I have a comment on
ingFormControls why not use the script macro syntax &{identifier} rather
than the square brackets []?

The script syntax has been reserved for future use in HTML 4.01, and is
mentioned in Appendix B.

"This specification reserves syntax for the future support of script
macros in HTML CDATA attributes. The intention is to allow attributes to
be set depending on the properties of objects that appear earlier on the
page." -

This sounds like it could be a good fit for the repetition template and
would be developing HTML in a way explicitly provided for in a previous

A template could be defined as:

<tr id="order" repeat="template" repeat-start="3">
    <td><input type="text" name="row&{order}.product"  value=""></td>
    <td><input type="text" name="row&{order}.quantity" value="1"></td>

I created a simple test page to check if it would throw up any errors when
validating for XHTML (due to XML specific stuff) and it didn't throw any
errors (it did raise a couple of warnings though!), obviously I took out
the repeat-start attribute as well to make it validate.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Repeating validation test</title>
   <tr id="order">
    <td><input type="text" name="row&{order}.product" value="" /></td>
    <td><input type="text" name="row&{order}.quantity" value="1" /></td>

I think this is a better way forward than using []'s which I have to be
honest I don't like that much, I hope this is a useful point and hasn't
already been covered and dismissed (I did a quick search on the archives).
Any comments?

Ben Meadowcroft
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3034 bytes
Desc: not available
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20040710/243adee0/attachment.bin>
Received on Saturday, 10 July 2004 12:06:00 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:35 UTC