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

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