XSD Editor Test Specification
Author: Jiri Kovalsky
Version: 1.19.56
Last update: 19.07.2005
Introduction: This document contains procedures for testing XML schema editor. The xml module provides syntax highlighting, bracket matching and validation/transformation actions in the editor.
Comment:
Table of Contents
|
Purpose: This test suite checks that syntax highlighting in XSD editor is correct.
Setup: No preparation is necessary for this test suite.
| # | Test case | Description |
| 1 | New XSD document |
- Use File | New Project... to create new Web Application project located in your home directory.
- Invoke File | New File... from main menu.
- Select XML category and XML Schema as file type. Push Next >.
- Type schema into File Name, change Folder field to src\java\schema and press Finish.
|
|
| RESULT: | New schema.xsd file is opened in editor containing default definition and commented out example. The file is created under Source Packages | schema node. |
|
| 2 | Syntax highlighting |
- Copy whole content of this document into clipboard.
- Press CTRL+A in the editor and then click Edit | Paste from main menu.
- Editor should replace its content with text from clipboard. Compare the syntax highlighting with this picture.
|
|
| RESULT: | Proper colors should be used for XSD elements (blue), attributes (green), values (pink), comments (dark green) and metadata (dark blue). |
|
|
|
Purpose: This test suite checks that it is possible to check structure and contents of XSD file.
Setup: No preparation is necessary for this test suite except having a web project open with addressbook XSD file.
| # | Test case | Description |
| 1 | Check structure |
- The addressbook.xsd file contains 3 structure errors in total.
- Right click editor area and choose Check XML from popup menu.
- One error at line 1 must be reported in Output - XML check window.
- Click The value following "encoding" ... [1] link. It highlights the first line in editor and moves cursor there.
- Correct the error and repeat step 2.
- Go after each error and fix it according to hints mentioned in the comment below the error line.
|
|
| RESULT: | In the end XML checking finished must show up in the status bar of IDE. |
|
| 2 | Validate contents |
- The addressbook.xsd file contains 4 content errors in total.
- Right click editor area and choose Validate XML from popup menu.
- Several errors must be reported in Output - XML check window.
- Click The content of 'sequence' ... [15] link. It highlights line 15 in editor and moves cursor there.
- Correct the error and repeat step 2.
- Go after each error and fix it according to hints mentioned in the comment below the error line.
|
|
| RESULT: | In the end XML validation finished must show up in the status bar of IDE. |
|
| 3 | XSD constrained XML |
- Invoke File | New File... from main menu.
- Select XML category and XML Document as file type. Push Next >.
- Type addressbook into File Name, change Folder to src\java\schema and press Next >.
- Select XML Schema-Constrained Document option and push Next >.
- Type addressbook.xsd into Schema URI, verify that Root Element is set to addressbook and push Finish.
- Copy the following text and paste it into <addressbook> element:
<friend nickname="Jirka" birthday="1974-06-24"> <email>jiri.kovalsky*sun.com</email> </friend>
- Right click Source Packages | schema | addressbook.xml node and invoke Validate XML.
-
The value 'jiri.kovalsky*sun.com' of element 'email' is not valid. error shows up.
- Correct the e-mail address by replacing * char by @ char and repeat step 7.
|
|
| RESULT: | The addressbook.xml file validates successfully and XML validation finished message shows up in Output - XML check window. |
|
|
|
Purpose: This test suite checks that XSL transformation works fine on XSD file.
Setup: No preparation is necessary for this test suite except having a web project open with addressbook XSD file.
| # | Test case | Description |
| 1 | Transformation |
- Save addressbook.xsl stylesheet next to addressbook.xsd schema.
- Right click Source Packages | schema | addressbook.xsd node and invoke XSL Transformation....
- Type addressbook.xsl into XSLT Script and push OK.
|
|
| RESULT: | Transformation finished. is printed into Output - XSLT Processor window and browser gets opened displaying newly generated addressbook.html file. |
|
|
Generated: 2005 07 19 03:10