Project

Profile

Help

Bug #3651

closed

Invalid "Type error" thrown during comparison

Added by Radu Coravu almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2018-01-31
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Platforms:

Description

I'm attaching an XML document and a bunch of XSLT stylesheets.

Using some code like this:

  public static void main(String[] args) throws TransformerException, IOException {
    Transformer tr = new net.sf.saxon.TransformerFactoryImpl().newTransformer(new StreamSource("C:\\Users\\radu_coravu\\Desktop\\untypedComparison\\resources\\xhtml2ditaDriver.xsl"));
    StringWriter wr = new StringWriter();
    tr.transform(new StreamSource(new File("C:\\Users\\radu_coravu\\Desktop\\untypedComparison\\test.xml")), new StreamResult(wr));
    wr.close();
    System.err.println("AAAAAA " + wr.toString());
  }

I receive this error:

Type error at char 196 in xsl:variable/@select on line 517 column 103 of xhtml2dita.xsl:
  XPTY0004: Cannot compare xs:untypedAtomic to xs:untypedAtomic
  at xsl:apply-templates (file:/C:/Users/radu_coravu/Desktop/untypedComparison/resources/xhtml2dita.xsl#484)
     processing /html/body[1]/table[1]/tr[2]/td[1]
  at xsl:apply-templates (file:/C:/Users/radu_coravu/Desktop/untypedComparison/resources/xhtml2dita.xsl#470)
     processing /html/body[1]/table[1]/tr[2]
  at xsl:call-template name="table" (file:/C:/Users/radu_coravu/Desktop/untypedComparison/resources/xhtml2dita.xsl#424)
  in built-in template rule for /html/body[1]/table[1] in the unnamed mode
  in built-in template rule for /html/body[1] in the unnamed mode
  at xsl:apply-templates (file:///C:/Users/radu_coravu/Desktop/untypedComparison/resources/xhtml2ditaDriver.xsl#167)
     processing /html

I cannot reproduce the error using Saxon PE 9.8, so it only occurs with Saxon HE 9.8.

If you look at line line 517 column 103 of xhtml2dita.xsl I've just about cast to xs:integer everything I got my hands on and I still get the error reported.


Files

untypedComparison.zip (42 KB) untypedComparison.zip Radu Coravu, 2018-01-31 08:10

Please register to edit this issue

Also available in: Atom PDF