W3C home > Mailing lists > Public > public-html@w3.org > January 2010

Re: [Bug 8611] Consider adding a full schema to H:TML

From: Thomas Broyer <t.broyer@ltgt.net>
Date: Tue, 5 Jan 2010 23:54:20 +0100
Message-ID: <a9699fd21001051454g40a2d550ib43616e8c176b5f5@mail.gmail.com>
To: Joe D Williams <joedwil@earthlink.net>
Cc: bugzilla@wiggum.w3.org, public-html@w3.org
On Tue, Jan 5, 2010 at 9:08 PM, Joe D Williams <joedwil@earthlink.net> wrote:
> I don't see how to define a boolean attribute (absence or presence
> effectively gives boolean value) in XML schema.

As an optional attribute whose value can only be the empty string or
the same as the attribute's name?

Something like:
<xs:attribute name="checked">
   <xs:simpleType>
      <xs:restriction base="xs:string">
         <whiteSpace value="collapse" />
         <xs:enumeration value="" />
         <xs:enumeration value="checked" />
      </xs:restriction>
   </xs:simpleType>
</xs:attribute>

But there are things that are waaaay more difficult to implement in
XML Schema (and I believe some are just impossible to represent in XML
Schema)

-- 
Thomas Broyer
/tɔ.ma.bʁwa.je/
Received on Tuesday, 5 January 2010 22:54:54 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:12 UTC