kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?>
|
| 2 | <!--Arbortext, Inc., 1988-2005, v.4002-->
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 3 | <!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN"
|
| 4 | "task.dtd">
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 5 | <task id="taddreg" xml:lang="en-us">
|
| 6 | <title>Adding pattern facets to simple types</title>
|
| 7 | <titlealts>
|
| 8 | <searchtitle>Adding pattern facets to simple types</searchtitle>
|
| 9 | </titlealts>
|
| 10 | <shortdesc>A pattern facet can be used to constrain the value of a type's
|
| 11 | lexical space (the set of string literals that represent the values of a type),
|
| 12 | which indirectly constrains the value space.</shortdesc>
|
| 13 | <prolog><metadata>
|
kprice | 9623e9d | 2007-05-03 03:43:05 +0000 | [diff] [blame] | 14 | <keywords><indexterm>XML schema editor<indexterm>pattern facets</indexterm></indexterm>
|
| 15 | <indexterm>XML schema files<indexterm>pattern facets</indexterm></indexterm>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 16 | </keywords>
|
| 17 | </metadata></prolog>
|
| 18 | <taskbody>
|
| 19 | <context><p> The value of the pattern is called a regular expression. You
|
| 20 | can specify it using the <uicontrol>Regular Expression</uicontrol> wizard.</p><p>To
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 21 | add a pattern to a simple type:</p></context>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 22 | <steps>
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 23 | <step><cmd>In the Design view, select the simple type you want to work with.</cmd>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 24 | </step>
|
| 25 | <step><cmd>In the Properties view, click the <uicontrol>Constraints</uicontrol> tab,
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 26 | then <uicontrol>Patterns</uicontrol>.</cmd></step>
|
| 27 | <step><cmd>Click <uicontrol>Add</uicontrol>.</cmd><info>The Regular Expression
|
| 28 | wizard opens.</info></step>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 29 | <step><cmd>Select the token you want to add to the expression.</cmd></step>
|
| 30 | <step><cmd>Indicate how often you want the token to appear in order for a
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 31 | match to succeed:</cmd>
|
| 32 | <choices>
|
| 33 | <choice>If you want the token to repeat, click <uicontrol>Repeat</uicontrol> and
|
| 34 | specify the number of times the token must appear.</choice>
|
| 35 | </choices>
|
| 36 | <choices>
|
| 37 | <choice> If you want to specify a minimum and maximum number of times the
|
| 38 | token can appear, click <uicontrol>Range</uicontrol> and enter a minimum and
|
| 39 | maximum value.</choice>
|
| 40 | </choices>
|
| 41 | </step>
|
| 42 | <step><cmd>To add the token to the regular expression, click <uicontrol>Add</uicontrol>. </cmd>
|
| 43 | </step>
|
| 44 | <step><cmd>To create the entire expression, repeat steps 4 - 6 as necessary.</cmd>
|
| 45 | </step>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 46 | <step><cmd>When you are finished, click <uicontrol>Next</uicontrol>.</cmd>
|
| 47 | </step>
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 48 | <step><cmd>(Optional) To test against the regular expression and see if a
|
| 49 | match occurs, enter sample text.</cmd></step>
|
| 50 | <step><cmd>Click <uicontrol>Finish</uicontrol>.</cmd><stepresult> The regular
|
| 51 | expression will appear in the Patterns page. <note type="tip"> To edit an
|
| 52 | existing pattern, select it in the Patterns page and click <uicontrol>Edit</uicontrol>.
|
kprice | 9623e9d | 2007-05-03 03:43:05 +0000 | [diff] [blame] | 53 | To delete an existing pattern, select it in the Patterns page and click <uicontrol>Delete</uicontrol>. </note></stepresult>
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 54 | </step>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 55 | </steps>
|
kprice | 159fa58 | 2006-05-08 21:30:45 +0000 | [diff] [blame] | 56 | </taskbody>
|
| 57 | </task>
|
kprice | 647b735 | 2006-05-17 21:27:16 +0000 | [diff] [blame] | 58 | <?Pub *0000002952?>
|