Since two-digit phone extension numbers do not cover all likely numbers, let's extend the range of valid values to cover three-digit numbers. We therefore need to modify the XML Schema. You can open and modify the XML Schema without having to close your XML document.
Do the following:
|1.||Select the menu option DTD/Schema | Go to definition or click the Go To Definition icon . The associated schema, in this case AddressLast.xsd is opened. Switch to Schema View (screenshot below) if you need to. (By default an XSD schema file will open in Schema View. The default view for every filetype, however, can be changed in the File Types section of the Options dialog (Tools | Options).)|
|2.||In Schema Overview, click the Display Diagram icon of the global Person element. In the Content Model View of the Person element, select the PhoneExt element. The facet data in the Facets tab is displayed.|
|3.||In the Facets tab, double-click the maxIncl value field, change the value 99 to 999, and confirm with Enter.|
|4.||Save the schema document.|
|5.||Press Ctrl+Tab to switch back to the XML document.|
|6.||Click to revalidate the XML document.|
A message that the file is valid appears in the Validation window. The XML document now conforms to the modified schema.
|7.||Select the menu option File | Save As... and save the file as CompanyLast.xml. (Remember to rename the original CompanyLast.xml file that is delivered with XMLSpy to something else, like CompanyLast_orig.xml).|
|Note:||The CompanyLast.xml file delivered with XMLSpy is in the in the Tutorial folder.|