# Test Name: Using internal Xalan 2.7.0 or Xalan given from Java™ 5 environment

Document Owner: Joerg Sievers | Last Document Change: 25. Sep. 2006 | Status of Document: Standard

### Test purpose

OpenOffice.org (OOo) should use the Xalan version inside OpenOffice.org if xalan.jar is available otherwise it should use the Xalan available from the Java™ system environment.

### Known issues:

- none

### Preconditions of the test:

- OpenOffice needs a Java™ 5 runtime environment

### Test documents

- copy_vendorinfo.xsl (XSLT stylesheet to detect the vendor info from Xalan)

### Test cases

##### Test case 1

Detect the in OOo included Xalan version.

1. Tools / XML FIlter Settings
2. The XML Filter Settings-dialog is visible
3. Click on New button
4. In the New Filter-dialog enter as filter for example Xalan
5. Select as Application the "PRODUCTNAME Writer (.sxw)"
6. As Name of file type enter Xalan
7. As File extension enter xml
8. Switch to the tab page Transformation
9. Enter at XSLT for export the file URL to copy_vendorinfo.xsl (see: test document)
10. Leave dialog with OK
11. Leave the XML Filter Settings-dialog with Close
12. Type This is a test in the opened Writer document
13. File / Export
14. Select as file format the installed Xalan named filter
15. Name the file integrated_xalan and click on Export
16. Close the Writer document window (e.g. File / Close).
17. File / Open
18. Select the integrated_xalan.xml file and clickl on open
19. The document is being opened as a simple Text-file because we defined Xalan-filter as export filter
20. In the first two lines you should find exactly this statement:

    -     <?xml version="1.0" encoding="UTF-8"?><processor vendor="Apache Software Foundation" vendor-url="http://xml.apache.org/xalan-j" version="1">

21. If not the included Xalan is not being used.

##### Test case 2

Detect the Xalan version in the existing Java™ system environment

1. If testcase 1 has NOT been executed:
   - Tools / XML FIlter Settings
   - The XML Filter Settings-dialog is visible
   - Click on New button
   - In the New Filter-dialog enter as filter for example Xalan
   - Select as Application the "PRODUCTNAME Writer (.sxw)"
   - As Name of file type enter Xalan
   - As File extension enter xml
   - Switch to the tab page Transformation
   - Enter at XSLT for export the file URL to copy_vendorinfo.xsl (see: test document)
   - Leave dialog with OK
   - Leave the XML Filter Settings-dialog with Close
2. Go with a file browser of your choice to

       $INSTALLATION_PATH/program/classes

   and move the

       xalan.jar

   to a place outside the

       $INSTALLATION_PATH

   and also outside the system

       $PATH

   or the Java™

       $CLASSPATH

   .
3. Type This is a test in the opened Writer document
4. File / Export
5. Select as file format the installed Xalan named filter
6. Name the file not_integrated_xalan and click on Export
7. Close the Writer document window (e.g. File / Close).
8. File / Open
9. Select the not_integrated_xalan.xml file and clickl on open
10. The document is being opened as a simple Text-file because we defined Xalan-filter as export filter
11. In the first two lines you shoudl find (nearly) this statement:

    -     <?xml version="1.0" encoding="UTF-8"?><processor vendor="Apache Software Foundation (Xalan XSLTC)" vendor-url="http://xml.apache.org/xalan-j" version="1.0">

    - The difference to testcase 1 is the (Xalan XSLTC) statement.
12. If not the Xalan from the Java™ environment is not being used.

### Problematic areas

none

### Acronyms, legend:

- URL: Uniform Resource Locator
- XML: eXtended Markup Language
- XSLT: Extensible Stylesheet Language Transformation
- PRODUCTNAME: Depending on the labled distribution of OOo it can be OpenOffice.org or another product name.
- Xalan: Is a popular XSLT processor

### References:

- Xalan home page