patterns Property

 

[This feature was only implemented for MSXML 6.0.]

A SchemaStringCollection object is returned. The collection contains the pattern facets defined for the data type being queried.

Each string in the collection is a pattern construction. This construction uses a special regular expression language for its creation. The content value must match this pattern to be considered valid. For more information about the pattern facet, see Data Type Facets.

JScript Syntax

var objPatterns = oISchemaType.patterns;  

Parameters

None.

Return Values

objPatterns
An object. A string collection of the pattern facets for the data type.

Example

The following snippet is taken from the Walk the SOM sample application. In this snippet, the patterns collection is retrieved from the ISchemaType object. The patterns collection is an ISchemaStringCollection.

        For Each oPattern in oType.patterns
            res = res + printTab(t+1) + "<xsd:pattern value='" + opattern + "'/>" + vbNewLine
        Next

Visual Basic Syntax

Set objPatterns = oISchemaType.patterns  

Parameters

None.

Return Values

objPatterns
An object. A string collection of the pattern facets for the data type.

C/C++ Syntax

HRESULT get_patterns(ISchemaStringCollection** patterns);  

Parameters

patterns[out,retval]
An object. A string collection of the pattern facets for the data type.

Return Values

S_OK
The value returned if successful.

E_POINTER
The value returned if patterns parameter is NULL.

E_FAIL
The value returned if something else is wrong.

Note

If the facet is not used, the property will return an empty string collection.

Versioning

Implemented in: MSXML 6.0

Applies to

ISchemaType Interface

See Also

Data Type Facets
Parts of Data Types