About Facet Types for simpleTypes

Table 72 provides a brief description of what you should specify as the value of a facet for a new simpleType. You should consult the XML Schema Recommendation for a complete definition of each facet and its allowable values.

Facet
Value
enumeration
One allowable value. Add an enumeration facet for each allowable value. For example:
<xsd:simpleType name="USState"> 
  <xsd:restriction base="xsd:string"> 
    <xsd:enumeration value="AK"/> 
    <xsd:enumeration value="AL"/> 
    <xsd:enumeration value="AR"/> 
    <!-- and so on ... --> 
  </xsd:restriction> 
</xsd:simpleType>
fractionDigits
The maximum number of digits that are allowed in the fractional portion of values of simpleTypes that are derived from xsd:decimal.
length
The number of units of length. Units vary according to the base type. The simpleType must be this number of units of length. For example, if xsd:string is the base type, you might specify 5 as the length if you know that each value will be a code that always has five characters.
maxExclusive
The exclusive upper bound of the range of values allowed for this simpleType. The value of the simpleType must be less than the value of maxExclusive.
maxInclusive
The inclusive upper bound of the range of values allowed for this simpleType. The value of the simpleType must be less than or equal to the value of maxInclusive.
maxLength
The maximum number of units of length. Units vary according to the base type. The length of the instances of this simpleType must be less than or equal to this number of lengths.
minExclusive
The exclusive lower bound of the range of values allowed for this simpleType. The value of the simpleType must be more than the value of minExclusive.
minInclusive
The inclusive lower bound of the range of values allowed for this simpleType. The value of the simpleType must be equal to or more than the value of minInclusive.
minLength
The minimum number of units of length. Units vary according to the base type. The length of the instances of this simpleType must be equal to or more than this number of lengths.
pattern
A regular expression. The values of the simpleType must be literals that match this regular expression.
totalDigits
The maximum number of digits that are allowed in values of simpleTypes that are derived from xsd:decimal.
whiteSpace
Specify one of the following values:
Table 72. Facet Values for simpleTypes

Energy Companies That Use Stylus Studio

Forget red bull! Many energy companies are using Stylus Studio 2006 for their quick pick me up during the work day. Come see which energy companies are getting the boost they need with Stylus Studio!

XML Unicode Encoding

Stylus Studio supports over 300 different file encodings, including UTF-8, UTF-16, EUC-JP, SHIFT-JIS, and more, alowing you to work with any XML document. Robust text editors support standard editing features, and Sense:X intelligent auto-completion.

EDI to XML Mapping in Stylus Studio

Learn how to use Stylus Studio's EDI to XML mapping tools in Convert-to-XML, including loading an EDI file, inspecting application control codes, customizing XML output and other advanced EDI to XML mapping features.

Validate XML Using XSD

You can validate XML documents against any data model defined using W3C XSD, using any major XSD Validator, including MSXML 3.0, MSXML 4.0, MSXML 6.0, Xerces-J, Xerces-C, Microsoft System.XML (1.0 and 2.0), XSV, the Saxonica XSD Validator and others.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member