cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

DTD Editor Test Specification

Author: Jiri Kovalsky
Version: 1.17.20
Last update: 27.06.2005
Introduction: This document contains procedures for testing DTD editor. The xml module provides syntax highlighting, bracket matching and several generating actions in DTD editor.
Comment:

Table of Contents

Test suite 1: Syntax highlighting

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

#Test caseDescription
1New DTD 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 DTD Entity as file type. Push Next >.
  4. Type diary into File Name, change Folder field to src\java\dtd and press Finish.
RESULT:New diary.dtd file is opened in editor containing only definition of <root> element and its version attribute. The file is created under Source Packages | dtd node.
2Syntax highlighting
  1. Copy whole content of this document into clipboard.
  2. Press CTRL+A in the editor and then invoke 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 keywords (bold dark blue), symbols (bold black), processing instruction targets (dark red), values (pink), comments (dark green), plain text (black) and references (blue). Invalid data section is highlighted in red color.

Test suite 2: Editor actions

Purpose: This test suite checks that all validation and generating functions work correctly.
Setup: No preparation is necessary for this test suite except having one web project open with diary.dtd file.

#Test caseDescription
1Check DTD
  1. The diary.dtd file contains 4 errors in total.
  2. Invoke Check DTD from popup menu in editor area.
  3. The first error about unquoted string shows up in the output window. Click the ... must be a quoted string. [1] link which takes the cursor to line 1.
  4. Correct the error and repeat step 2.
  5. Go after each error and fix it according to hints mentioned in the comment below the error line.
  6. The last reported error will be about missing sub/days.dtd file.
  7. Create new days.dtd from template located in src\java\dtd\sub folder and repeat step 2 again.
RESULT:The diary.dtd checks without errors now.
2CSS stylesheet
  1. Right click editor area of diary.dtd file and select Generate CSS action.
  2. Change default filename from diaryStylesheet to diary and press OK button.
RESULT:New diary.css stylesheet file gets generated and opened in editor.
3HTML documentation
  1. Use this file to create new time.dtd file.
  2. Right click editor area of time.dtd file and invoke Generate Documentation from popup menu.
  3. Change default timeDocumentation file name to time and press OK button.
RESULT:New time.html page file gets generated and opened in system default browser. It contains element index and details sections with description taken from comments above each element and links for faster navigation. The result should look like this page.
4DOM scanner
  1. Right click editor area of time.dtd file and invoke Generate DOM Tree Scanner... from popup menu.
  2. Change default TimeScanner file name to MyTimeScanner and press OK button.
  3. New MyTimeScanner.java class file gets generated and opened in editor.
  4. Invoke Build | Compile "MyTimeScanner.java" from main menu.
RESULT:It is possible to generate DOM tree scanner class that is immediatelly compilable.
5SAX handler
  1. Right click editor area of time.dtd file and invoke SAX Document Handler Wizard... from popup menu.
  2. Check Propagate SAX Events to Generated Handler option and push Next >.
  3. For month element select Ignore handler type and change handler method to monthMethod. Then push Next > twice.
  4. Change handler interface to MyTimeHandler, handler implementation to MyTimeHandlerImpl and generated parser to MyTimeParser. Finally push Finish.
  5. 1 XML and 3 Java class files get generated. MyTimeHandlerImpl.java gets opened in editor.
  6. Verify that TimeSAXBindings.xml file contains <bind element='month' method='monthMethod' type='IGNORE' >
  7. Open MyTimeParser.java and verify that all methods are not empty and contain at least one method call.
  8. Finally invoke Build | Build Main Project from main menu.
RESULT:It is possible to generate DOM tree scanner class that is immediatelly compilable. This is unfortunately not working due to issue #58967.

Generated: 2005 06 27 04:07
Companion
Projects:
MySQL Database Server   GlassFish Community: an Open Source Application Server   Open Solaris  Open JDK: an Open SourceJDK   Mobile & Embedded Community     Sponsored by 
Sponsored by Sun Microsystems