Definedoc™  2.1 -  Validate XML
The following documentation contains test scripts and expected results for validating the Definedoc tool relating to the refresh section.  Do the following to verify proper installation:
  • Start Definedoc by double clicking on the desktop icon.
  • Perform each test by performing the steps specified by the instructions.  
  • Evaluate the results of each step by comparing them with results described in the Documentation column. 
Script Description        Documentation
XMLvalidation.com The validation check is performed against any XML schema or DTD declared inside the XML document.
www.w3schools.com Syntax-check your XML.
SAS XML Mapper This evaluates the XML using the SAS viewer tool.

Additional tools can be used to test XML and is available for download here.  


NOTE: Perform the following steps before doing the rest of the instructions below.

  1. Type any Project name you want to create in the Project Name, and then choose your share scope.

  2. Click on the "New" button to create new Project.

  3. Verify that a new Project has been created.

  4. Select the project that has just been created.

  5. Type a new study name such as "XML Study" and click on the "New" button.

  6. Verify there will be a new out library created.

  7. Click on the [...] button next to Input SAS Datasets selection.

  8. Click on the [...] button of the Library entry.

  9. Create the following path if it does not already exist.
    c:\temp\definedoc\input
    c:\temp\definedoc\source

  10. Submit the following program:

    libname testlib 'c:\temp\definedoc\input';
    data testlib.shoes;
          set sashelp.shoes;
    run;
    data testlib.company;
          set sashelp.company;
    run;

  11. From the library manager screen, enter:

    Library Name: INTEST
    Path: c:\temp\definedoc\input

  12. Click on the "Add" button.

  13. Click on the "Back" button to close this screen.

  14. Select INTEST libname and select "COMPANY" and "SHOES" datasets.

  15. Click on the "OK" button.

  16. Type "C:\temp\define.xml" in Output File.

  17. Click on the "Info" button to input the general information.

  18. Select 2 datasets above and click on the "Generate" button.

  19. Verify the "define.xml" created.

  20. Navigate back to the DefineDoc main screen and click on the "Edit" button.

  21. Move to "Value Level Metadata" column and type "Yes" for "Company.Level2" and "Shoes.Product".

  22. Type "Depthead" for "Company.Level5" and "Region" for "Shoes.Stores".

  23. Click on the "OK" button.

  24. Click on the "Generate" button.

  25. Verify that define.xml is created with all the information of Value Level Metadata.


Instructions 1

  1. Open define.xml with Notepad and remove this row from define.xml "xsi:schemaLocation="http://www.cdisc.org/ns/odm/v1.2 define1-0-0.xsd"

  2. Open this link "http://www.xmlvalidation.com/xml.0.html?L=0".

  3. Click on the "Browse" button to select the define.xml.

  4. Click on the "Validate" button.

  5. Verify that the result is created, please see Expected Result.

Instructions 2

  1. Open this link "http://www.w3schools.com/Dom/dom_validate.asp".

  2. Open define.xml with Notepad and copy and paste the content of this file to the Syntax-check your XML box .

  3. Click on the "Validate" button.

  4. Verify that the result is created, pleased see Expected Result.

Instructions 3

  1. Download and install SAS XML Mapper from SAS at: "http://www.sas.com/apps/demosdownloads/92_SDL_sysdep.jsp?packageID=000486&jmpflag=N"

  2. Open SAS XML Mapper.

  3. Navigate to the menu "File -> Open XML" and select define.xml.

  4. Navigate to the menu "Tools -> Auto Map" using XML.

  5. Navigate to Log tab and Validate tab to see the results.

For more information, please contact MXI .

 
     Meta-Xceed Inc. © 2008