Altova XMLSpy 2025 Professional Edition

Modifying the Schema

Home Prev Top Next

Since we have a phone extension that is outside the range defined in the XML Schema (0 to 99), let's extend the range to 999. Do this as described below.

 

1.In Grid View, select any of the PhoneExt cells (see screenshot below).

TutXMLModifyXSDSelectNode

2.Select the menu option DTD/Schema | Go to definition or click the Go To Definition icon in the Grid View toolbar. The associated schema, in this case AddressLast.xsd, is opened, and the PhoneExt definition will be highlighted (screenshot below).

TutXMLModifyXSDOpenXSD

3.The element's maxIncl facet is 99 (see screenshot). Edit this value to 999, and then save the schema.

4.Go back to the XML document and validate it. It will be valid.

5.Save your file as CompanyLast.xml.

 

Note:The Tutorial folder of XMLSpy contains a file named CompanyLast.xml, which contains the same data as the file you will have saved when you complete this tutorial.

 

© 2018-2024 Altova GmbH