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

[whatwg] Web Forms 2.0 (WD 30 June 2004): 'separator' Attribute

From: Dave Hodder <dmh@dmh.org.uk>
Date: Thu, 01 Jul 2004 00:11:09 +0100
Message-ID: <40E3488D.4030502@dmh.org.uk>
Hello WHAT Task Force,

I would like to suggest an additional, optional attribute for the 'form' 
element, called 'separator'.  It would also be valid for 'input' 
elements with a 'type' attribute of either 'submit' or 'image'.

Example usage:

     <form action="process-form.py" method="get" separator=";">

'separator' accepts either a semicolon character or an ampersand 
character (the default).

The attribute changes the behaviour of forms sent with the 
application/x-www-form-urlencoded content type.  When 'separator' is set 
to ';', a semicolon character rather than an ampersand character is used 
to separate name/value pairs as described in Web Forms 2.0 (WD 30 June 
2004) Section 5.3, point 5.

In the case where a 'separator' attribute is missing from a submit 
button (<input type="submit"> or <input type="image">), then the 
equivalent attribute on the form is used instead.

It has no effect on forms submitted by content types other than 
application/x-www-form-urlencoded.

The 'separator' attribute is similiar to the 'separator' attribute of 
the XForms 1.0 'submission' element, except for the different default 
value.  (The difference is to ensure backwards compatibility with HTML 
forms.)  The existence of this attribute would hopefully ease migration 
from Web Forms 2.0 to XForms when the time is right.

Here's a fragment of XSchema for it:

     <xsd:attribute name="separator" use="optional" default="&amp;">
       <xsd:simpleType>
         <xsd:restriction base="xsd:string">
           <xsd:enumeration value=";"/>
           <xsd:enumeration value="&amp;"/>
         </xsd:restriction>
       </xsd:simpleType>
     </xsd:attribute>

Thank you,

Dave
Received on Wednesday, 30 June 2004 16:11:09 UTC

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