- From: Autumn Cuellar <a.cuellar@auckland.ac.nz>
- Date: Thu, 31 Jan 2002 20:07:21 -0500 (EST)
- To: xmlschema-dev@w3.org
Here's a snippet from an XML Schema I'm coding up: <xsd:attribute ref="cellml:name" use="required" /> <xsd:simpleType> <xsd:restriction base="cellml:CellMLidentifier"> <xsd:pattern value="^(ampere)^(becquerel)" /> </xsd:restriction> </xsd:simpleType> </xsd:attribute> In explanation (should you need one), the cellml:name attribute is a global att. with type="cellml:CellMLidentifier" (which restricts the string datatype to just letters, digits, and underscores). In this instance I want to further restrict the value so that it cannot be certain words, e.g. the value of the name attribute cannot be "ampere" nor "becquerel". Two questions: 1)Is this a valid way to further restrict the type of the global attribute? 2)Is using the <pattern> element the way I've used it valid, and does it convey what I intended? (ok, maybe that was 3 questions...) Thanks! -- Autumn A. Cuellar Bioengineering Institute The University of Auckland New Zealand
Received on Friday, 1 February 2002 11:19:57 UTC