9.5 Testing Style Sheets Outside of DirXML

The XSLT process in the DirXML engine may be invoked from the command line and can be used to test stylesheets in a more controlled environment before installing them into DirXML.

The following batch file may be used to invoke the XSLT processor on NT or Windows 2000.

  @echo off
  setlocal
  rem TODO - edit the following line to point to directory where NDS and DirXML are installed
  
  set DIRXML_HOME=c:\novell\nds
  set COMMON_JARS=%DIRXML_HOME%\lib%DIRXML_HOME%\jre\bin\java -classpath%COMMON_JARS%\xp.jar; %COMMON_JARS%\collections.jar; %COMMON_JARS%\nxsl.jar com.novell.xsl.nxsl %1 %2 %3 %4 %5 %6 %7 %8 %9
  
  endlocal
  

Invoking the processor without any arguments prints out the latest information on the command syntax for the processor.

To get sample XML to use as input to test your style sheet, use the tracing options (see Section 3.1, Using DSTrace and the DirXML Trace Log) and paste the appropriate XML into a text file.

Since you are running outside of DirXML, the srcQueryProcessor and destQueryProcessor will not be available. To get around this limitation, you can temporarily comment out code that uses the query processor and replace it with an explicit assignment of the reply you might expect from the query. For example:

  <!-- query NDS -->
  <!-- <xsl:variable name="result" select="query:query($destQueryProcessor, $query)"/> -->
  
  <!-- simulate query results -->
  
  <xsl:variable name="result">
     <nds dtdversion="1.0" ndsversion="8.5">
        <output>
          <instance class-name="User" src-dn="\MY_TREE \MY_ORG\Fred"/>
          <status event-id="" level="success"></status>
        </output>
     </nds>
  <xsl:variable>