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

Ben Meadowcroft ben at benmeadowcroft.com
Sat Jul 10 16:37:31 PDT 2004

I guess that the W3c validator is the only one that doesn't have a problem
with the &! All the others I tried including IE and firefox reported
errors, I guess the [] is easier to stick with than doing &{...} in
xhtml documents after all!


-----Original Message-----
From: whatwg-whatwg.org-bounces at lists.whatwg.org
[mailto:whatwg-whatwg.org-bounces at lists.whatwg.org] On Behalf Of Ben
Sent: 10 July 2004 20:06
To: whatwg at whatwg.org
Subject: [whatwg] WEB_FORMS 2.0 comment, repetition model,using reserved
macro scripting syntax

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"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Repeating validation test</title> </head> <body> <table>
   <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/20040711/75e287c1/attachment-0001.bin>

More information about the whatwg mailing list