FeaturesPluginsDocs & SupportCommunityPartners

XML Validation Test Specification

Author: Daniel Mladek
Version: 1.0.0
Last update: 02.06.2004

  1. Text Context Sensitive Completion Test

    1. Open SampleProject-XML|Source Packages|sample|Books-II.xml document in the Text Editor.
    2. Put cursor somewhere into document and type the first few characters of an XML tag.
    3. Press Ctrl-spacebar, or pause after typing a portion of the XML tag. The code completion box is displayed. Choose one of the elements.
    4. Write up at least one book per the Completion.
    5. Close the editor.

  2. Check XML document

    1. Open SampleProject-XML|Source Packages|sample|Books.xml document in the Text Editor.
    2. Right-click the editor window and choose Check XML.
    3. Delete '<' char from '<Product>' tag and Check XML again.
    4. Put the '<' char back, save document and close the output window.

  3. Validate XML document

    1. Right-click the editor window and choose Validate XML.
    2. Add element <Producer/> before the element Product and save the document.
    3. Right-click the editor window and choose Validate XML.
    4. Remove the element Producer, save document and close the editor and output windows.

  4. Create New DTD document

    1. In the Explorer, Projecs TAB, right click the "SampleProject-XML|Source Packages|sample.new" folder and choose "New|File..."
    2. In the New File Wizard choose XML as "Categories:" and as "File Types:" select DTD Entity and click Next > button
    3. Name it DTD-Entity

  5. Check DTD document

    1. In the Explorer, right click the SampleProject-XML|Source Packages|sample|simpleDTD.dtd document node and choose Edit. The simpleDTD.dtd is opened in the Text Editor.
    2. Right-click the editor window and choose Check DTD.
    3. Add element-declaration <!ELEMENT x (#PCDATA|ANY)+> before the element-declaration Books and save the document. Right-click the editor's window and choose Check DTD.
    4. Remove the element-declaration x, save document and close the editor and output windows.

  6. Create New CSS document

    1. In the Explorer, Projecs TAB, right click the "SampleProject-XML|Source Packages|sample.new" folder and choose "New|File..."
    2. In the New File Wizard choose XML as "Categories:" and as "File Types:" select Cascading Style Sheet and click Next > button
    3. Name it CSSdocument and click Finish button

  7. Check CSS document

    1. Open SampleProject-XML|Source Packages|sample|netbeans.css document in the Text Editor.
    2. Right-click the netbeans.css node in the Explorer and choose Check CSS.
    3. Duplicate 1st appearance of '{' char and Check CSS again.
    4. Remove the '{' char back, save document and close the output window.

  8. Copy XML Style

    1. Right click the CSSdocument node in the Explorer and choose Copy XML Style
    2. Paste the style in a XML document

  9. Copy HTML Style

    1. Right click the CSSdocument node in the Explorer and choose Copy HTML Style
    2. Paste the style in a HTML document.

  10. Generate DTD from XML

    1. In the Explorer, right click the SampleProject-XML|Source Packages|ssample|PhoneBook.xml node and choose Generate DTD.
    2. Supply a name for the DTD (e.g. phones) to the dialog that appears and click on OK.

  11. Generate documentation

    1. In the Explorer, right click the the SampleProject-XML|Source Packages|ssample|simple.DTD node and choose Generate Documentation.... Supply a name for the HTML file in the dialog that appears and click on OK.

  12. Generate CSS

    1. n the Explorer, right click the the SampleProject-XML|Source Packages|ssample|simpleDTD.dtd node and choose Generate CSS... Supply a name for the CSS file in the dialog that appears and click on OK.

  13. Check Settings nodes

    1. Choose the Main Menu -> Tools -> Options, the Options dialog should appeare.
    2. Check exist nodes: Editing, Editor Settings, DTD Editor, XML Editor, CSS Editor , Indentation Engines, XML Indentation Engine.
    3. XML, General Settings

  14. Create XML Schema Constrained Document

    1. In the Explorer, select the the SampleProject-XML|Source Packages|sample.new node and press Ctrl+N
    2. In the New File Wizard choose XML as "Categories:" and as "File Types:" select XML Document and click Next > button
    3. Name it as XML-Constrain-Schema and click Next button
    4. On the third panel of the Wizard, select XML Schema-Constrained Document and click Next button
    5. Click Browse button and find $Project_Location/src/sample/schema/employee-schema.xsd
    6. As "Root Element:" select employee and click Finish.

  15. Validate XML Schema Constrained Document

    1. Open employee-sample.xml document, new Source Editor pane appears.
    2. Right click the document's node and choose Validate XML. Output Window without any error message should appeare.
    3. Rename salary element on fee.
    4. Right-Click the document's node and choose Validate XML.
    5. Rollback the previous change and close the document.

  16. Create XSL Stylesheet Document

    1. In the Explorer, select the the SampleProject-XML|Source Packages|sample.new node and press Ctrl+N
    2. In the New File Wizard choose XML as "Categories:" and as "File Types:" select XSL Stylesheet.
    3. Specify a name and click Finish button.

  17. Check XSL Stylesheet

    1. Open SampleProject-XML|Source Packages|sample.xslt|doc2html.xsl document in the Text Editor.
    2. Right click the document's node and choose Check XML.Output Window without any error message should appeare.
    3. Remove root's element start tag.
    4. Right click the document's node and choose Check XML.
    5. Rollback the previous change and close the document.

  18. XSL Transformation Action

    1. Right click SampleProject-XML|Source Packages|sample.xslt|doc2html.xsl node in the Explorer and choose XSL Transformation, XSL Transformation dialog should appeare.
    2. Browse xsl/document.xml as XML Source .
    3. Change the "Output:" to value "document_output.html"
    4. Set "Process Output:" to value "Open in Browser"
    5. and click OK button.

  19. Mount NetBeans Catalog

    1. Press Ctrl+5 to open and switch to RunTime TAB in the Explorer Window.
    2. Expand the XML Entity Catalog node.
    3. If the node doesn't contain Netbeans Catalog then right click on the XML Entity Catalog node and select from popup-menu "Mount Catalog...".
    4. In the Mount Catalog dialog choose as "Catalog Type:" the "Netbeans Catalog" and click OK button.
    5. Click the Project Tab and right click the "SampleProject-XML|Source Packages|sample|Standard.xml" node and choose Validate XML.

  20. Unmount NetBeans Catalog

    1. Click the Runtime Tab then right click on the XML Entity Catalogs|Netbeans Catalog node and choose Unmount Catalog.
    2. Click the Filesystems Tab then right click "SampleProject-XML|Source Packages|sample|Standard.xml" node and choose Validate XML.


Generated: Thu Jun 03 00:13:25 CEST 2004
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