Skip to content

Running stix2html in oxygen

mattcoarr edited this page Nov 15, 2013 · 1 revision

Here are the steps I followed:

Initial Setup

  1. Get the current release of stix_to_html

  2. make the directory c:\stix (windows) or ~/stix (mac and linux)

  3. "cd c:\stix" (windows) or "cd ~/stix" (mac/linux)

  4. run "git clone https://github.com/STIXProject/Tools.git"

  5. cd Tools

  6. run "git checkout stix_to_html-v1.0b2a"

  7. Open Oxygen XML Developer

  8. Project -> New Project

  9. navigate to c:\stix\Tools\stix_to_html or ~/stix/Tools/stix_to_html, then choose the name "stix_to_html_oxygen_project"

  10. Right click on the project and choose "Add Folder"

  11. Navigate to c:\stix\Tools\stix_to_html or ~/stix/Tools, select "stix_to_html", and click the "choose" button.

  12. If you have any additional directories of STIX XML files, repeat the previous step for as many directories as needed.

  13. Back in main Oxygen window, in the Project pane (on the left), expand stix_to_html.

  14. Double click on stix_to_html.xsl, which will open this xslt file in the editor.

  15. Also in the project pane, expand stix_to_html/examples.

  16. Double click on STIX_Phishing_Indicator.xml, which will open this xml file in the editor.

  17. Find the "Transformation Scenarios" pane (usually on the bottom right). If it's not visible, go to the Window menu and select Show View -> Transformation Scenarios.

  18. Click on the plus sign in the Transformation Scenarios toolbar to add a new scenario and choose "XML Transformation with XSLT".

  19. Make sure you have an XML file (STIX_Phishing_Indicator.xml) open and selected in the editor. The XSLT file should be open but not the active editor tab. It makes the next couple steps easier.

  20. For the name, enter "STIX XML to HTML Transformation".

  21. Leave XML URL as the default: "${currentFileURL}"

  22. For the XSL URL, click the drop down and you should see "stix_to_html.xsl" in the list (since we opened it above, it's in the recent list of files). If it doesn't show up there, click on the folder icon to the right and navigate to and select c:\stix\Tools\stix_to_html\stix_to_html.xsl or ~/stix/Tools/stix_to_html/stix_to_html.xsl.

  23. Now go to the "output" tab in the scenario dialog. * click the "Save As" radio button and enter "${cfn}.html" [You can see more options for substitution variables by clicking the "down icon with three dots".]

  24. You may optionally check the checkbox for "open in browser/system application". This will have oxygen open your system default browser with the newly generated html.

  25. Click ok, to complete the new xslt scenario configuration.

  26. Now that the XSLT Scenario is configured, again make sure you have the xml file open and in the foreground tab in the editor. Then make sure the new transformation is checked in the Transformation Scenarios pane and click the red play button (right facing triangle) in either the main Oxygen toolbar or in the Transformation Scnearios pane.

For Other STIX XML Files (once the above configuration has been setup in the Transformation Scenarios)

  1. Open the STIX XML in the editor (it should be on the active editor tab)
  2. Go to the Transformation Scenarios pane and make sure the "STIX XML to HTML Transformation" is checked.
  3. Click the red play button (right facing triangle) in either the main Oxygen toolbar or in the Transformation Scnearios pane.