Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2185514 | 7 | Joe Wang | P3 | Closed | Fixed | m05 |
JDK-2182520 | 6u18 | Joe Wang | P4 | Resolved | Fixed | b02 |
FULL PRODUCT VERSION :
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
MS Windows / XP
A DESCRIPTION OF THE PROBLEM :
The given program fails on the following statement in the stylesheet.
not(preceding-sibling::* or following-sibling::*)
It runs fine on the following parenthesized variant.
not((preceding-sibling::*) or following-sibling::*)
-----------------Test.java------------------
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
public class Test {
public static void main(String[] args)
throws TransformerConfigurationException,
TransformerException {
try{
StreamSource xslt = new StreamSource(new File("test.xslt"));
TransformerFactory fc = TransformerFactory.newInstance();
Transformer transformer = fc.newTransformer( xslt );
} catch (Exception e){
System.err.println(e);
} } }
--------------------test.xslt--------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<xsl:output omit-xml-declaration = "yes" />
<xsl:template match="mo" >
<xsl:choose>
<xsl:when test="not(preceding-sibling::* or following-sibling::*)" >
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac Test.java
java Test
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java Test
ERROR: 'Syntax error in 'not(preceding-sibling::* or following-sibling::*)'.'
FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
-----------------Test.java------------------
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
public class Test {
public static void main(String[] args)
throws TransformerConfigurationException,
TransformerException {
try{
StreamSource xslt = new StreamSource(new File("test.xslt"));
TransformerFactory fc = TransformerFactory.newInstance();
Transformer transformer = fc.newTransformer( xslt );
} catch (Exception e){
System.err.println(e);
} } }
--------------------test.xslt--------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<xsl:output omit-xml-declaration = "yes" />
<xsl:template match="mo" >
<xsl:choose>
<xsl:when test="not(preceding-sibling::* or following-sibling::*)" >
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
---------- END SOURCE ----------
java version "1.6.0_01"
Java(TM) SE Runtime Environment (build 1.6.0_01-b06)
Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
MS Windows / XP
A DESCRIPTION OF THE PROBLEM :
The given program fails on the following statement in the stylesheet.
not(preceding-sibling::* or following-sibling::*)
It runs fine on the following parenthesized variant.
not((preceding-sibling::*) or following-sibling::*)
-----------------Test.java------------------
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
public class Test {
public static void main(String[] args)
throws TransformerConfigurationException,
TransformerException {
try{
StreamSource xslt = new StreamSource(new File("test.xslt"));
TransformerFactory fc = TransformerFactory.newInstance();
Transformer transformer = fc.newTransformer( xslt );
} catch (Exception e){
System.err.println(e);
} } }
--------------------test.xslt--------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<xsl:output omit-xml-declaration = "yes" />
<xsl:template match="mo" >
<xsl:choose>
<xsl:when test="not(preceding-sibling::* or following-sibling::*)" >
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
javac Test.java
java Test
ERROR MESSAGES/STACK TRACES THAT OCCUR :
java Test
ERROR: 'Syntax error in 'not(preceding-sibling::* or following-sibling::*)'.'
FATAL ERROR: 'Could not compile stylesheet'
javax.xml.transform.TransformerConfigurationException: Could not compile stylesheet
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
-----------------Test.java------------------
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
public class Test {
public static void main(String[] args)
throws TransformerConfigurationException,
TransformerException {
try{
StreamSource xslt = new StreamSource(new File("test.xslt"));
TransformerFactory fc = TransformerFactory.newInstance();
Transformer transformer = fc.newTransformer( xslt );
} catch (Exception e){
System.err.println(e);
} } }
--------------------test.xslt--------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
>
<xsl:output omit-xml-declaration = "yes" />
<xsl:template match="mo" >
<xsl:choose>
<xsl:when test="not(preceding-sibling::* or following-sibling::*)" >
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
---------- END SOURCE ----------
- backported by
-
JDK-2182520 wrong javax.xml.transform.TransformerConfigurationException
- Resolved
-
JDK-2185514 wrong javax.xml.transform.TransformerConfigurationException
- Closed