Using XSLT files to validate

The system supports XSLT validation files for HL7 CDA 2.0 and HITSP_C32 (2.5 version). These files are located in the root level XSLT folder ($HCIROOT/xslt).

They can be used by hcixslttest or the engine without any changes. It can also be copied and modified to the site level for special use. This is at $HCISITEDIR/xslt or $HCIMASTERSITEDIR/xslt .

You should have a document file to be validated according to a particular specification. Generally, this is an XML file, for example, document.xml.

  1. Prepare the validation XSLT files. Because Cloverleaf provides XSLT validation files for standard HL7 CDA R2 and HITSP C32 version 2.5, the engine and GUI can support root level XSLT files. You can directly use these XSLT files under the root level or move them to the site level and modify them for a particular purpose.
  2. Use hcixslttest to do the validation from the GUI or command line.
    From the GUI:
    1. Launch the Testing Tool in the GUI.
    2. Select the XSLT tab.
    3. Set the validation files in XSLT File. For example, ccd_iso_pretty.xsl for HL7 CDA R2.
    4. In the Choose Date File browser, set the file which needs validation. For example, document.xml.
    5. Set any other options as required.
    6. Click Run Command and get the validation report in the Result pane.
    From the command line:
    1. Run this command:
      hcixslttest [-e <encoding>] [-F <format>] [-p <runtime_parameters>] 
      [-w searchExp] <xslt> <infile> [<outfile>]
      For example:
      hcixslttest -e ASCII CDA_2.0/ccd_iso_pretty.xsl document.xml
    2. View the results.
      The test result shows the validation report, indicating any errors or warnings where the document.xml file violates the standard specifications.