Equivalent to http://saxon.sf.net/feature/ignoreSAXSourceParser for stylesheets?
Added by Anonymous almost 9 years ago
We are looking to use Norm Walsh's xmlresolver.org resolver within ant XSLT tasks. We've got it working nicely for source documents by using :
(We are configuring the catalogs by setting the xml.catalog.files system property)
But we also want to resolve the stylesheets via the catalogs as well. I can see that we might be able to set the http://saxon.sf.net/feature/styleParserClass attribute but it doesn't look like we can force Saxon to use it - we get ant -v output that suggests the resolver isn't used at all for stylesheets:
/Users/nicg/Projects/LexisNexis/ttm/sample-docs/build.xml:20: stylesheet /Users/nicg/Projects/LexisNexis/ttm/sample-docs/catalog-test.xsl doesn't exist. at org.apache.tools.ant.taskdefs.XSLTProcess.handleError(XSLTProcess.java:1416) at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:410) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:435) at org.apache.tools.ant.Target.performTasks(Target.java:456) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405) at org.apache.tools.ant.Project.executeTarget(Project.java:1376) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1260) at org.apache.tools.ant.Main.runBuild(Main.java:853) at org.apache.tools.ant.Main.startAnt(Main.java:235) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:285) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:112)
(the intention being that catalog-test.xsl would be resolved via the catalog)
Any suggestions?
Replies (2)
RE: Equivalent to http://saxon.sf.net/feature/ignoreSAXSourceParser for stylesheets? - Added by Michael Kay almost 9 years ago
I can't suggest any solution, I'm afraid. My guess would be that Ant is supplying the stylesheet in the same way it supplies the source document, as a SAXSource object with the XMLReader pre-initialized. If that's the case then we could certainly use the ignoreSaxSourceParser switch to substitute our own parser, as we do for source documents. I don't know if there was any good reason why we didn't do this at the time - probably simply that for bug fixes one goes for the least-risk solution to the reported problem.
RE: Equivalent to http://saxon.sf.net/feature/ignoreSAXSourceParser for stylesheets? - Added by Anonymous almost 9 years ago
That's just about what I expected. Any objections to my filing a feature request?
thanks
nic
Please register to reply