User:Mjb/Oracle XSLT processor bugs
I've had to use the Oracle XSLT processor twice: once in 2001, and once in 2005.
Both times, I ran into the same set of bugs which render this processor incompatible with other processors and basically not XSLT 1.0 conformant. At first it was amazing to me that these problems have not been fixed in all this time, but then I discovered that Oracle has the worst bug reporting and tech support system ever. It is basically impossible to file a simple bug report. So it's no wonder things never get fixed.
Here are the bugs:
Contents
- 1 Empty-string parameter sometimes tests true
- 2 Empty-string parameter sometimes causes crash
- 3 xml-stylesheet PIs are omitted from source tree
- 4 xsl:message output can corrupt XML or HTML result tree serialization
- 5 Last-modified date/time of importing stylesheet affects loading of imported stylesheets
- 6 xsl:when without a 'test' attribute is allowed
- 7 xsl:param in imported stylesheets not handled correctly
- 8 Oracle XML DOM bugs
Empty-string parameter sometimes tests true
This bug may only manifest in certain contexts, or with certain versions of the processor.
Example needed
Empty-string parameter sometimes causes crash
Example needed
xml-stylesheet PIs are omitted from source tree
Example needed
xsl:message output can corrupt XML or HTML result tree serialization
The following stylesheet, applied against any source doc, should result in the output of a prolog and an empty <result/>
element, along with a 'hello' message from the processor:
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" indent="yes"/> <xsl:template match="/"> <result> <xsl:message terminate="no">hello</xsl:message> </result> <xsl:text> </xsl:text> </xsl:template> </xsl:stylesheet>
In these command-line examples, 'oraxsl
' is an alias for 'java -classpath /home/mike/xml/oracle/lib/xmlparserv2.jar:/home/mike/xml/oracle/lib/xmlmesg.jar oracle.xml.parser.v2.oraxsl
':
The main problem is that an extraneous element start tag is serialized:
$ oraxsl dummy.xml oraxsl-bug.xsl out file:/portnoy/home/mike/xml/test/oraxsl-bug.xsl: Message: hello $ cat out <?xml version = '1.0'?> <result> <result/>
A secondary problem is that if an explicit output target is not given, then both the serialized result tree and the processor message are sent to stdout, whereas it would make more sense for the processor message to go to stderr, where it will not interfere with the stdout stream.
$ oraxsl dummy.xml oraxsl-bug.xsl > out $ cat out <?xml version = '1.0'?> file:/portnoy/home/mike/xml/test/oraxsl-bug.xsl: Message: hello <result> <result/>
The expected results were more like this:
$ saxon -o out dummy.xml oraxsl-bug.xsl hello $ cat out <?xml version="1.0" encoding="utf-8"?> <result/>
Last-modified date/time of importing stylesheet affects loading of imported stylesheets
Imported stylesheets are not reloaded when they're changed, unless the importing stylesheet is also touched.
Example needed
xsl:when without a 'test' attribute is allowed
This bug may only manifest in certain contexts, or with certain versions of the processor.
Example needed
xsl:param in imported stylesheets not handled correctly
Example needed
Oracle XML DOM bugs
Document is a subclass of Element
In Oracle's XML DOM implementation, Document is a subclass of Element. I'm not entirely sure this is forbidden by W3C DOM, but it is counterintuitive.
It prevents Saxon from being used to process an Oracle XML DOM Document. This is partly a problem with Saxon, which doesn't use the DOM's node type attributes to figure out what it is processing; it instead uses "instanceof" to see if the document it was given is an Element (i.e., a fragment) or a Document (i.e., a complete doc), so it gets confused by Oracle's strange Documents-that-are-Elements.