Web Forms 2.0 Test Case 5: Repetition Index in Attributes

This test case demonstrates functionality of the Web Forms 2.0 specification and tests the compliance of this cross-browser Web Forms 2.0 implementation.

For all attributes in a block, template name is to be replaced with the block's current repetition index. The first section below is a test case taken from: <http://simon.html5.org/test/webforms2/repetition/addition/001.htm>; the second section contains a more thorough test case. It demonstrates Opera bug #230280 and this implementation's issue #7. The specification defines the correct behavior in 3.6.1. Addition:

...any occurrences of a string consisting of an opening square bracket (U+005B, "[") or a modifier letter half triangular colon (U+02D1, "ˑ"), the template's name, and a closing square bracket (U+005D, "]") or a middle dot (U+00B7, "·"), are replaced by the new repetition block's index. This is performed regardless of the types, names, or namespaces of attributes, and is done to all descendants, even those inside nested forms, nested repetition templates, and so forth.

←  | Test Suite Index |  →

Test Case from simon.html5.org

TEST

The above should be exactly equivalent to the following:

TEST
TEST

Extensive Attribute Test

Whereas every attribute which contains "[j]" should be replaced with the repetition index (0), it is likely, due to Opera bug #230280 and my issue #7, the specified behavior will fail in style and non-CDATA attributes (note that a '1' is also included as "1[j]" so the value of "10" should appear in each attribute):

T
(This field has access key set to 1[j])

Image 1[j] test
rowspan colspan
q
test
test

Test results

Attribute Value of attribute (should contain '10')

Test result: working...

  1. working...

Web Forms 2.0 implementation
Version: 0.5.2 (2007-11-29) changelog
Weston Ruter