FeaturesPluginsDocs & SupportCommunityPartners

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

Test suite 1: Syntax highlighting

Purpose: This test suite checks that syntax highlighting in XSD editor is correct.
Setup: No preparation is necessary for this test suite.

#Test caseDescription
1New XSD document
  1. Use File | New Project... to create new Web Application project located in your home directory.
  2. Invoke File | New File... from main menu.
  3. Select XML category and XML Schema as file type. Push Next >.
  4. 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.
2Syntax highlighting
  1. Copy whole content of this document into clipboard.
  2. Press CTRL+A in the editor and then click Edit | Paste from main menu.
  3. 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).

Test suite 2: Validation

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 caseDescription
1Check structure
  1. The addressbook.xsd file contains 3 structure errors in total.
  2. Right click editor area and choose Check XML from popup menu.
  3. One error at line 1 must be reported in Output - XML check window.
  4. Click The value following "encoding" ... [1] link. It highlights the first line in editor and moves cursor there.
  5. Correct the error and repeat step 2.
  6. 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.
2Validate contents
  1. The addressbook.xsd file contains 4 content errors in total.
  2. Right click editor area and choose Validate XML from popup menu.
  3. Several errors must be reported in Output - XML check window.
  4. Click The content of 'sequence' ... [15] link. It highlights line 15 in editor and moves cursor there.
  5. Correct the error and repeat step 2.
  6. 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.
3XSD constrained XML
  1. Invoke File | New File... from main menu.
  2. Select XML category and XML Document as file type. Push Next >.
  3. Type addressbook into File Name, change Folder to src\java\schema and press Next >.
  4. Select XML Schema-Constrained Document option and push Next >.
  5. Type addressbook.xsd into Schema URI, verify that Root Element is set to addressbook and push Finish.
  6. Copy the following text and paste it into <addressbook> element:

    <friend nickname="Jirka" birthday="1974-06-24">
    <email>
    jiri.kovalsky*sun.com</email>
    </friend>

  7. Right click Source Packages | schema | addressbook.xml node and invoke Validate XML.
  8. The value 'jiri.kovalsky*sun.com' of element 'email' is not valid. error shows up.
  9. 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.

Test suite 3: Transformation

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 caseDescription
1Transformation
  1. Save addressbook.xsl stylesheet next to addressbook.xsd schema.
  2. Right click Source Packages | schema | addressbook.xsd node and invoke XSL Transformation....
  3. 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
Companion
Projects:
MySQL Database Server   Open JDK: an Open SourceJDK   GlassFish Community: an Open Source Application Server    Mobile & Embedded Community    Open Solaris   java.net - The Source for Java Technology Collaboration   Virtual Box - full virtualizer  Open ESB - The Open Enterprise Service Bus Powered by