Bug 40022 - junitreport task unable to use stylesheets that have an xsl:import tag
Summary: junitreport task unable to use stylesheets that have an xsl:import tag
Status: RESOLVED FIXED
Alias: None
Product: Ant
Classification: Unclassified
Component: Optional Tasks (show other bugs)
Version: nightly
Hardware: All All
: P2 normal (vote)
Target Milestone: 1.7.0
Assignee: Ant Notifications List
URL:
Keywords: XSLTBug
Depends on:
Blocks:
 
Reported: 2006-07-11 23:18 UTC by Jan Cumps
Modified: 2006-07-13 08:55 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Cumps 2006-07-11 23:18:22 UTC
When testing the junitreport task from fresh ant build from svn, I am unable 
to use a custom stylesheet that contains an xsl:import tag.
Maybe recent change that loads the stylesheet as resource in stead of as a 
file causes this (revision 418420, Fri Jun 30).

This still worked for recent checkouts from svn.

Stylesheet fragment:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:fo="http://www.w3.org/1999/XSL/Format"
	xmlns:stringutils="xalan://org.apache.tools.ant.util.StringUtils"
	version="1.0">


<xsl:import href="./extra-documentation.xsl"/>
.....



error:
[junitreport] java.lang.NullPointerException
[junitreport]   at org.apache.tools.ant.types.XMLCatalog.getCatalogResolver
(XMLC
atalog.java:477)
[junitreport]   at org.apache.tools.ant.types.XMLCatalog.resolve
(XMLCatalog.java
:416)
[junitreport]   at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFacto
ryImpl.loadSource(TransformerFactoryImpl.java:1063)
[junitreport]   at 
com.sun.org.apache.xalan.internal.xsltc.compiler.Import.parse
Contents(Import.java:71)
[junitreport]   at 
com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.p
arseOwnChildren(Stylesheet.java:590)
[junitreport]   at 
com.sun.org.apache.xalan.internal.xsltc.compiler.Stylesheet.p
arseContents(Stylesheet.java:562)
[junitreport]   at 
com.sun.org.apache.xalan.internal.xsltc.compiler.Parser.creat
eAST(Parser.java:380)
[junitreport]   at 
com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compil
e(XSLTC.java:325)
[junitreport]   at 
com.sun.org.apache.xalan.internal.xsltc.compiler.XSLTC.compil
e(XSLTC.java:410)
[junitreport]   at 
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFacto
ryImpl.newTemplates(TransformerFactoryImpl.java:791)
[junitreport]   at 
org.apache.tools.ant.taskdefs.optional.TraXLiaison.readTempla
tes(TraXLiaison.java:296)
Comment 1 Antoine Levy-Lambert 2006-07-12 16:40:44 UTC
This is now fixed in svn. If you update your codebase and rebuild it should be
fine. Let us know if not. Thanks for reporting this problem.

Antoine
Comment 2 Jan Cumps 2006-07-13 15:55:27 UTC
Tested with fresh checkout from svn: it's fixed.
Thank you very much.