All ASN.1 character string useful types (IA5String, VisibleString, etc.) are mapped to the XSD string type.
ASN.1 production:
TypeName ::= ASN1CharStringType
in this definition, ASN1CharStringType would be replaced with one of the ASN.1 Character String types such as VisibleString.
Generated XSD code:
<xsd:simpleType name="TypeName"> <xsd:restriction base="xsd:string"/> </xsd:simpleType>
ASN.1 character string types may contain a size constraint. This is converted into minLength and maxLength facets in the generated XSD definition:
ASN.1 production:
TypeName ::= ASN1CharStringType (SIZE (lower..upper))
Generated XSD code:
<xsd:simpleType name="TypeName"> <xsd:restriction base="xsd:string"> <xsd:minLength value="lower"/> <xsd:maxLength value="upper"/> </xsd:restriction> </xsd:simpleType>
ASN.1 character string types may also contain permitted alphabet or pattern constraints. These are converted into pattern facets in the generated XSD definition:
ASN.1 production:
TypeName ::= ASN1CharStringType (FROM (charSet))
or
TypeName ::= ASN1CharStringType (PATTERN (pattern))
Generated XSD code:
<xsd:simpleType name="TypeName"> <xsd:restriction base="xsd:string"> <xsd:pattern value="pattern"/> </xsd:restriction> </xsd:simpleType
In this case, the permitted alphabet character set (charSet) is converted into a corresponding pattern for use in the generated XML schema definition.