Quantcast

Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

classic Classic list List threaded Threaded
18 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Eliot Kimber-2
In the context of the DITA OT (2.1.1), I am running saxon using the Ant <xslt> target. I include an <xmlcatalog> parameter but it appears that Saxon does not use the catalog when parsing documents directly using the document() function.

This version of the OT still uses Saxon 9.1.0.8 out of the box (the OT team is working on upgrading to the latest Saxon HE but has to do a lot of regression testing so it’s a slow process).

I have a document that is both included in the DITA map and also loaded via document() in my XSLT code. The OT processes the document as part of the input DITA data (as I would expect) but Saxon fails to resolve the DTD.

Is this a limitation in the Ant xslt target or this version of Saxon or is there a way to configure the Ant environment so Saxon has access to the catalog?

I can rewrite the Ant script to use <java> to run Saxon (and thus configure the catalog directly) but I’d rather not if there’s an easier fix for this.

Thanks,

Eliot

----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com

------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Michael Kay
I have run a little test, and I can't say that I have got it working, but I have at least established that Saxon is calling the URIResolver supplied by Ant.

My Ant file is:

<project name="testproject" default="test" basedir=".">
 
<target name="test">
   
<xslt in="out.xml" out="out2.xml" style="test2.xsl" force="true">
     
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
     
<xmlcatalog>
       
<catalogpath>
         
<fileset dir="." includes="**/catalog.xml"/>
       
</catalogpath>
     
</xmlcatalog>
   
</xslt>
 
</target>
</project>

The stylesheet is:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
 
<xsl:template match="/">
  
<out><xsl:copy-of select="doc('http://example.com/example.xml')"/></out>
 
</xsl:template>
</xsl:transform>

The catalog.xml is:

<!DOCTYPE catalog
 PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
         prefer="public">
 
<uri name="http://example.com/test.xsl"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsl"/>
 
<uri name="http://example.com/example.xml"
         uri="file:///Users/mike/repo2/tests/catalog-test/example.xml"/>       
 
<uri name="http://example.com/test.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsd"/>
 
<uri name="http://example.com/test1.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test1.xsd"/>        
</catalog>

Running under the debugger reveals that Saxon is calling the Ant-supplied URIResolver, which is returning a SAXSource populated with an InputSource; the InputSource is initialized with a FileInputStream which is linked to the file file:///Users/mike/repo2/tests/catalog-test/example.xml.

Saxon then supplies this InputSource to the supplied XMLReader, which for some reason comes back with this exception, which has me rather mystified:

net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:478)
at net.sf.saxon.event.Sender.send(Sender.java:152)
at net.sf.saxon.functions.DocumentFn.makeDoc(DocumentFn.java:360)
at net.sf.saxon.functions.Doc.call(Doc.java:94)
at net.sf.saxon.functions.Doc.call(Doc.java:26)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:546)
at net.sf.saxon.expr.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:646)
at net.sf.saxon.expr.instruct.GlobalVariable.actuallyEvaluate(GlobalVariable.java:727)
at net.sf.saxon.expr.instruct.GlobalVariable.evaluateVariable(GlobalVariable.java:695)
at net.sf.saxon.expr.GlobalVariableReference.evaluateVariable(GlobalVariableReference.java:121)
at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:471)
at net.sf.saxon.expr.instruct.CopyOf.processLeavingTail(CopyOf.java:566)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149)
at EE__Slash__01863932867.process(file:/Users/mike/repo2/tests/junit/testdata/ant/test2.xsl:4)
at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:69)
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:395)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456)
at net.sf.saxon.Controller.transformDocument(Controller.java:2257)
at net.sf.saxon.Controller.transform(Controller.java:1860)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:553)
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:183)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:195)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:876)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:414)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
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:483)
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:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at commands.AntTests.runAnt(AntTests.java:32)
at commands.AntTests.testXmlCatalog(AntTests.java:41)
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:483)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.net.MalformedURLException: unknown protocol: urn
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:450)
... 58 more
---------
java.net.MalformedURLException: unknown protocol: urn
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:450)
at net.sf.saxon.event.Sender.send(Sender.java:152)
at net.sf.saxon.functions.DocumentFn.makeDoc(DocumentFn.java:360)
at net.sf.saxon.functions.Doc.call(Doc.java:94)
at net.sf.saxon.functions.Doc.call(Doc.java:26)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:546)
at net.sf.saxon.expr.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:646)
at net.sf.saxon.expr.instruct.GlobalVariable.actuallyEvaluate(GlobalVariable.java:727)
at net.sf.saxon.expr.instruct.GlobalVariable.evaluateVariable(GlobalVariable.java:695)
at net.sf.saxon.expr.GlobalVariableReference.evaluateVariable(GlobalVariableReference.java:121)
at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:471)
at net.sf.saxon.expr.instruct.CopyOf.processLeavingTail(CopyOf.java:566)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149)
at EE__Slash__01863932867.process(file:/Users/mike/repo2/tests/junit/testdata/ant/test2.xsl:4)
at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:69)
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:395)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456)
at net.sf.saxon.Controller.transformDocument(Controller.java:2257)
at net.sf.saxon.Controller.transform(Controller.java:1860)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:553)
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:183)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:195)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:876)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:414)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
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:483)
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:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at commands.AntTests.runAnt(AntTests.java:32)
at commands.AntTests.testXmlCatalog(AntTests.java:41)
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:483)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)

/Users/mike/repo2/tests/junit/testdata/ant/buildWithCatalog.xml:3: Fatal error during transformation using /Users/mike/repo2/tests/junit/testdata/ant/test2.xsl: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn; SystemID: file:/Users/mike/repo2/tests/junit/testdata/ant/test2.xsl; Line#: 4; Column#: 4
at org.apache.tools.ant.taskdefs.XSLTProcess.handleTransformationError(XSLTProcess.java:1443)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:886)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:414)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
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:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at commands.AntTests.runAnt(AntTests.java:32)
at commands.AntTests.testXmlCatalog(AntTests.java:41)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: Fatal error during transformation using /Users/mike/repo2/tests/junit/testdata/ant/test2.xsl: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn; SystemID: file:/Users/mike/repo2/tests/junit/testdata/ant/test2.xsl; Line#: 4; Column#: 4
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.fatalError(TraXLiaison.java:541)
at net.sf.saxon.lib.DelegatingErrorListener.fatalError(DelegatingErrorListener.java:46)
at net.sf.saxon.Controller.reportFatalError(Controller.java:953)
at net.sf.saxon.Controller.transform(Controller.java:1882)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:553)
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:183)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:195)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:876)
... 36 more
Caused by: net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:478)
at net.sf.saxon.event.Sender.send(Sender.java:152)
at net.sf.saxon.functions.DocumentFn.makeDoc(DocumentFn.java:360)
at net.sf.saxon.functions.Doc.call(Doc.java:94)
at net.sf.saxon.functions.Doc.call(Doc.java:26)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:546)
at net.sf.saxon.expr.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:646)
at net.sf.saxon.expr.instruct.GlobalVariable.actuallyEvaluate(GlobalVariable.java:727)
at net.sf.saxon.expr.instruct.GlobalVariable.evaluateVariable(GlobalVariable.java:695)
at net.sf.saxon.expr.GlobalVariableReference.evaluateVariable(GlobalVariableReference.java:121)
at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:471)
at net.sf.saxon.expr.instruct.CopyOf.processLeavingTail(CopyOf.java:566)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:149)
at EE__Slash__01863932867.process(file:/Users/mike/repo2/tests/junit/testdata/ant/test2.xsl:4)
at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:69)
at net.sf.saxon.expr.instruct.TemplateRule.applyLeavingTail(TemplateRule.java:395)
at net.sf.saxon.trans.Mode.applyTemplates(Mode.java:456)
at net.sf.saxon.Controller.transformDocument(Controller.java:2257)
at net.sf.saxon.Controller.transform(Controller.java:1860)
... 40 more
Caused by: java.net.MalformedURLException: unknown protocol: urn
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:450)
... 58 more


Process finished with exit code 255



On 30 Dec 2015, at 17:17, Eliot Kimber <[hidden email]> wrote:

In the context of the DITA OT (2.1.1), I am running saxon using the Ant <xslt> target. I include an <xmlcatalog> parameter but it appears that Saxon does not use the catalog when parsing documents directly using the document() function.

This version of the OT still uses Saxon 9.1.0.8 out of the box (the OT team is working on upgrading to the latest Saxon HE but has to do a lot of regression testing so it’s a slow process).

I have a document that is both included in the DITA map and also loaded via document() in my XSLT code. The OT processes the document as part of the input DITA data (as I would expect) but Saxon fails to resolve the DTD.

Is this a limitation in the Ant xslt target or this version of Saxon or is there a way to configure the Ant environment so Saxon has access to the catalog?

I can rewrite the Ant script to use <java> to run Saxon (and thus configure the catalog directly) but I’d rather not if there’s an easier fix for this.

Thanks,

Eliot

----
Eliot Kimber, Owner
Contrext, LLC
------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Michael Kay

Saxon then supplies this InputSource to the supplied XMLReader, which for some reason comes back with this exception, which has me rather mystified:

net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn

This is because the example.xml file has a DTD reference which is not resolved by the catalog:

<!DOCTYPE root [
 <!ENTITY text PUBLIC "-//A//XML CATALOG IDENTIFIER//EN"
  "urn:publicid:-:A:XML+CATALOG+IDENTIFIER:EN">
]>

So I think everything is working (for me!) as it should.

Michael Kay
Saxonica


------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Eliot Kimber-2
Is this a response to my question? It appears to be from a different thread (and I happen to know the answer to the question reflected in the quoted text :-)

Cheers,

E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com

From: Michael Kay <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Thursday, December 31, 2015 at 3:14 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task


Saxon then supplies this InputSource to the supplied XMLReader, which for some reason comes back with this exception, which has me rather mystified:

net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn

This is because the example.xml file has a DTD reference which is not resolved by the catalog:

<!DOCTYPE root [
 <!ENTITY text PUBLIC "-//A//XML CATALOG IDENTIFIER//EN"
  "urn:publicid:-:A:XML+CATALOG+IDENTIFIER:EN">
]>

So I think everything is working (for me!) as it should.

Michael Kay
Saxonica

------------------------------------------------------------------------------ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Michael Kay
It was a follow-up to my first response, which for some reason didn't make it to the list. I'll try and repost it, and sorry for the confusing race condition!

Michael Kay
Saxonica

On 31 Dec 2015, at 14:26, Eliot Kimber <[hidden email]> wrote:

Is this a response to my question? It appears to be from a different thread (and I happen to know the answer to the question reflected in the quoted text :-)

Cheers,

E.
----
Eliot Kimber, Owner
Contrext, LLC

From: Michael Kay <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Thursday, December 31, 2015 at 3:14 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task


Saxon then supplies this InputSource to the supplied XMLReader, which for some reason comes back with this exception, which has me rather mystified:

net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn

This is because the example.xml file has a DTD reference which is not resolved by the catalog:

<!DOCTYPE root [
 <!ENTITY text PUBLIC "-//A//XML CATALOG IDENTIFIER//EN"
  "urn:publicid:-:A:XML+CATALOG+IDENTIFIER:EN">
]>

So I think everything is working (for me!) as it should.

Michael Kay
Saxonica

------------------------------------------------------------------------------ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help
------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Michael Kay
In reply to this post by Michael Kay


Begin forwarded message:

From: Michael Kay <[hidden email]>
Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task
Date: 31 December 2015 08:12:58 GMT
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>

I have run a little test, and I can't say that I have got it working, but I have at least established that Saxon is calling the URIResolver supplied by Ant.

My Ant file is:

<project name="testproject" default="test" basedir=".">
 
<target name="test">
   
<xslt in="out.xml" out="out2.xml" style="test2.xsl" force="true">
     
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
     
<xmlcatalog>
       
<catalogpath>
         
<fileset dir="." includes="**/catalog.xml"/>
       
</catalogpath>
     
</xmlcatalog>
   
</xslt>
 
</target>
</project>

The stylesheet is:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
 
<xsl:template match="/">
  
<out><xsl:copy-of select="doc('http://example.com/example.xml')"/></out>
 
</xsl:template>
</xsl:transform>

The catalog.xml is:

<!DOCTYPE catalog
 PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
         prefer="public">
 
<uri name="http://example.com/test.xsl"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsl"/>
 
<uri name="http://example.com/example.xml"
         uri="file:///Users/mike/repo2/tests/catalog-test/example.xml"/>       
 
<uri name="http://example.com/test.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsd"/>
 
<uri name="http://example.com/test1.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test1.xsd"/>        
</catalog>

Running under the debugger reveals that Saxon is calling the Ant-supplied URIResolver, which is returning a SAXSource populated with an InputSource; the InputSource is initialized with a FileInputStream which is linked to the file file:///Users/mike/repo2/tests/catalog-test/example.xml.

Saxon then supplies this InputSource to the supplied XMLReader, which for some reason comes back with this exception, which has me rather mystified:

net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:478)
at net.sf.saxon.event.Sender.send(Sender.java:152)

---------
java.net.MalformedURLException: unknown protocol: urn
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)


------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Eliot Kimber-2
This may be a Windows-specific issue.

I get the failure under Windows but not OS X.

When I run the exact same Ant and XSLT code against the same content under OS X I don’t get the failure to resolve the DTDs.

I’m using Windows 10 and this java:

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)

And this Ant:

Apache Ant(TM) version 1.9.4 compiled on April 29 2014

On OS X I’m using:

java version "1.8.0_65"

Java(TM) SE Runtime Environment (build 1.8.0_65-b17)

Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)


Apache Ant(TM) version 1.9.4 compiled on April 29 2014


So almost identical configurations under OS X and Windows.


Cheers,


E.


----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com

From: Michael Kay <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Thursday, December 31, 2015 at 11:30 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: [saxon] Fwd: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task



Begin forwarded message:

From: Michael Kay <[hidden email]>
Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task
Date: 31 December 2015 08:12:58 GMT
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>

I have run a little test, and I can't say that I have got it working, but I have at least established that Saxon is calling the URIResolver supplied by Ant.

My Ant file is:

<project name="testproject" default="test" basedir=".">
 
<target name="test">
   
<xslt in="out.xml" out="out2.xml" style="test2.xsl" force="true">
     
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
     
<xmlcatalog>
       
<catalogpath>
         
<fileset dir="." includes="**/catalog.xml"/>
       
</catalogpath>
     
</xmlcatalog>
   
</xslt>
 
</target>
</project>

The stylesheet is:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
 
<xsl:template match="/">
  
<out><xsl:copy-of select="doc('http://example.com/example.xml')"/></out>
 
</xsl:template>
</xsl:transform>

The catalog.xml is:

<!DOCTYPE catalog
 PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
         prefer="public">
 
<uri name="http://example.com/test.xsl"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsl"/>
 
<uri name="http://example.com/example.xml"
         uri="file:///Users/mike/repo2/tests/catalog-test/example.xml"/>       
 
<uri name="http://example.com/test.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsd"/>
 
<uri name="http://example.com/test1.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test1.xsd"/>        
</catalog>

Running under the debugger reveals that Saxon is calling the Ant-supplied URIResolver, which is returning a SAXSource populated with an InputSource; the InputSource is initialized with a FileInputStream which is linked to the file file:///Users/mike/repo2/tests/catalog-test/example.xml.

Saxon then supplies this InputSource to the supplied XMLReader, which for some reason comes back with this exception, which has me rather mystified:

net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:478)
at net.sf.saxon.event.Sender.send(Sender.java:152)

---------
java.net.MalformedURLException: unknown protocol: urn
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)

------------------------------------------------------------------------------ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Michael Kay
In reply to this post by Michael Kay


Begin forwarded message:

From: Michael Kay <[hidden email]>
Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task
Date: 31 December 2015 08:12:58 GMT
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>

I have run a little test, and I can't say that I have got it working, but I have at least established that Saxon is calling the URIResolver supplied by Ant.

My Ant file is:

<project name="testproject" default="test" basedir=".">
 
<target name="test">
   
<xslt in="out.xml" out="out2.xml" style="test2.xsl" force="true">
     
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
     
<xmlcatalog>
       
<catalogpath>
         
<fileset dir="." includes="**/catalog.xml"/>
       
</catalogpath>
     
</xmlcatalog>
   
</xslt>
 
</target>
</project>

The stylesheet is:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
 
<xsl:template match="/">
  
<out><xsl:copy-of select="doc('http://example.com/example.xml')"/></out>
 
</xsl:template>
</xsl:transform>

The catalog.xml is:

<!DOCTYPE catalog
 PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
         prefer="public">
 
<uri name="http://example.com/test.xsl"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsl"/>
 
<uri name="http://example.com/example.xml"
         uri="file:///Users/mike/repo2/tests/catalog-test/example.xml"/>       
 
<uri name="http://example.com/test.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsd"/>
 
<uri name="http://example.com/test1.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test1.xsd"/>        
</catalog>

Running under the debugger reveals that Saxon is calling the Ant-supplied URIResolver, which is returning a SAXSource populated with an InputSource; the InputSource is initialized with a FileInputStream which is linked to the file file:///Users/mike/repo2/tests/catalog-test/example.xml.

Saxon then supplies this InputSource to the supplied XMLReader, which for some reason comes back with this exception, which has me rather mystified:

net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:478)
at net.sf.saxon.event.Sender.send(Sender.java:152)
at net.sf.saxon.functions.DocumentFn.makeDoc(DocumentFn.java:360)
at net.sf.saxon.functions.Doc.call(Doc.java:94)
at net.sf.saxon.functions.Doc.call(Doc.java:26)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:546)
at net.sf.saxon.expr.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:646)
<snip>
at net.sf.saxon.Controller.transform(Controller.java:1860)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:553)
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:183)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:195)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:876)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:414)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
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:483)
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:1393)
at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
at commands.AntTests.runAnt(AntTests.java:32)
at commands.AntTests.testXmlCatalog(AntTests.java:41)
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:483)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:243)
at junit.framework.TestSuite.run(TestSuite.java:238)
at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
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:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.net.MalformedURLException: unknown protocol: urn
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:450)
... 58 more
---------
java.net.MalformedURLException: unknown protocol: urn
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
<snip>
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:450)
at net.sf.saxon.event.Sender.send(Sender.java:152)
at net.sf.saxon.functions.DocumentFn.makeDoc(DocumentFn.java:360)
at net.sf.saxon.functions.Doc.call(Doc.java:94)
at net.sf.saxon.functions.Doc.call(Doc.java:26)
at net.sf.saxon.expr.FunctionCall.iterate(FunctionCall.java:546)
at net.sf.saxon.expr.instruct.GlobalVariable.getSelectValue(GlobalVariable.java:646)
<snip>
at net.sf.saxon.Controller.transform(Controller.java:1860)
at net.sf.saxon.s9api.XsltTransformer.transform(XsltTransformer.java:553)
at net.sf.saxon.jaxp.TransformerImpl.transform(TransformerImpl.java:183)
at org.apache.tools.ant.taskdefs.optional.TraXLiaison.transform(TraXLiaison.java:195)
at org.apache.tools.ant.taskdefs.XSLTProcess.process(XSLTProcess.java:876)
at org.apache.tools.ant.taskdefs.XSLTProcess.execute(XSLTProcess.java:414)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
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:483)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)

<snip>



------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Michael Kay
In reply to this post by Eliot Kimber-2
OK, I'll try it when I get back to the office (and a Windows machine) after the holiday.

Michael Kay
Saxonica

On 31 Dec 2015, at 18:02, Eliot Kimber <[hidden email]> wrote:

This may be a Windows-specific issue.

I get the failure under Windows but not OS X.

When I run the exact same Ant and XSLT code against the same content under OS X I don’t get the failure to resolve the DTDs.

I’m using Windows 10 and this java:

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)

And this Ant:

Apache Ant(TM) version 1.9.4 compiled on April 29 2014

On OS X I’m using:

java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)

Apache Ant(TM) version 1.9.4 compiled on April 29 2014

So almost identical configurations under OS X and Windows.

Cheers,

E.

----
Eliot Kimber, Owner
Contrext, LLC

From: Michael Kay <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Thursday, December 31, 2015 at 11:30 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: [saxon] Fwd: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task



Begin forwarded message:

From: Michael Kay <[hidden email]>
Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task
Date: 31 December 2015 08:12:58 GMT
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>

I have run a little test, and I can't say that I have got it working, but I have at least established that Saxon is calling the URIResolver supplied by Ant.

My Ant file is:

<project name="testproject" default="test" basedir=".">
 
<target name="test">
   
<xslt in="out.xml" out="out2.xml" style="test2.xsl" force="true">
     
<factory name="net.sf.saxon.TransformerFactoryImpl"/>
     
<xmlcatalog>
       
<catalogpath>
         
<fileset dir="." includes="**/catalog.xml"/>
       
</catalogpath>
     
</xmlcatalog>
   
</xslt>
 
</target>
</project>

The stylesheet is:

<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
 
<xsl:template match="/">
  
<out><xsl:copy-of select="doc('http://example.com/example.xml')"/></out>
 
</xsl:template>
</xsl:transform>

The catalog.xml is:

<!DOCTYPE catalog
 PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN"
 "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
         prefer="public">
 
<uri name="http://example.com/test.xsl"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsl"/>
 
<uri name="http://example.com/example.xml"
         uri="file:///Users/mike/repo2/tests/catalog-test/example.xml"/>       
 
<uri name="http://example.com/test.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test.xsd"/>
 
<uri name="http://example.com/test1.xsd"
         uri="file:///Users/mike/repo2/tests/catalog-test/test1.xsd"/>        
</catalog>

Running under the debugger reveals that Saxon is calling the Ant-supplied URIResolver, which is returning a SAXSource populated with an InputSource; the InputSource is initialized with a FileInputStream which is linked to the file file:///Users/mike/repo2/tests/catalog-test/example.xml.

Saxon then supplies this InputSource to the supplied XMLReader, which for some reason comes back with this exception, which has me rather mystified:

net.sf.saxon.trans.XPathException: I/O error reported by XML parser processing file:/Users/mike/repo2/tests/catalog-test/example.xml: unknown protocol: urn
at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:478)
at net.sf.saxon.event.Sender.send(Sender.java:152)

---------
java.net.MalformedURLException: unknown protocol: urn
at java.net.URL.<init>(URL.java:593)
at java.net.URL.<init>(URL.java:483)
at java.net.URL.<init>(URL.java:432)
at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)

------------------------------------------------------------------------------ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help
------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Jirka Kosek
In reply to this post by Eliot Kimber-2
On 30.12.2015 18:17, Eliot Kimber wrote:
> Is this a limitation in the Ant xslt target or this version of Saxon or is
> there a way to configure the Ant environment so Saxon has access to the
> catalog?

Is catalog support working for you in other Ant tasks? I recall that
there were all sort of problems with XML catalog support in Ant. For
example it wasn't enough to load resolver.jar from build script itself
it has to be specified by -lib parameter to Ant or put into lib/
directory of Ant.

You can also try running Ant with -d and -v messages. This can give you
more clue what's happening.

                                Jirka

--
------------------------------------------------------------------
  Jirka Kosek      e-mail: [hidden email]      http://xmlguru.cz
------------------------------------------------------------------
     Professional XML and Web consulting and training services
DocBook/DITA customization, custom XSLT/XSL-FO document processing
------------------------------------------------------------------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
------------------------------------------------------------------
    Bringing you XML Prague conference    http://xmlprague.cz
------------------------------------------------------------------


------------------------------------------------------------------------------

_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 

signature.asc (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Eliot Kimber-2
The catalog resolution otherwise works‹that is, the XSLT transform is able
to resolve the DTD references in the input source documents.

As I mentioned, the code works correctly under OS X so this must be a
Windows-specific issue in Ant, Saxon, or Java.

Cheers,

E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com




On 1/6/16, 4:07 AM, "Jirka Kosek" <[hidden email]> wrote:

>On 30.12.2015 18:17, Eliot Kimber wrote:
>> Is this a limitation in the Ant xslt target or this version of Saxon or
>>is
>> there a way to configure the Ant environment so Saxon has access to the
>> catalog?
>
>Is catalog support working for you in other Ant tasks? I recall that
>there were all sort of problems with XML catalog support in Ant. For
>example it wasn't enough to load resolver.jar from build script itself
>it has to be specified by -lib parameter to Ant or put into lib/
>directory of Ant.
>
>You can also try running Ant with -d and -v messages. This can give you
>more clue what's happening.
>
> Jirka
>
>--
>------------------------------------------------------------------
>  Jirka Kosek      e-mail: [hidden email]      http://xmlguru.cz
>------------------------------------------------------------------
>     Professional XML and Web consulting and training services
>DocBook/DITA customization, custom XSLT/XSL-FO document processing
>------------------------------------------------------------------
> OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34 rep.
>------------------------------------------------------------------
>    Bringing you XML Prague conference    http://xmlprague.cz
>------------------------------------------------------------------
>
>--------------------------------------------------------------------------
>----
>_______________________________________________
>saxon-help mailing list archived at http://saxon.markmail.org/
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/saxon-help 



------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Earl Hood
On Wed, Jan 6, 2016 at 10:26 AM, Eliot Kimber wrote:

> The catalog resolution otherwise works‹that is, the XSLT transform is
> able to resolve the DTD references in the input source documents.
>
> As I mentioned, the code works correctly under OS X so this must be a
> Windows-specific issue in Ant, Saxon, or Java.

Do not know if it may affect you, but there are known bugs in the Apache
Commons Resolver jar regarding Windows pathnames.

I submitted patches to the project a long time ago, and I believe they
have been applied to the source code, but it appears there has not been
a new release of resolver.jar since those patches were submitted.

For the project I have been involved in, we have been running a patched
version of resolver.jar for a long time due to the Windows pathname
problem.

--ewh

------------------------------------------------------------------------------
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Eliot Kimber-2
In reply to this post by Eliot Kimber-2
Any status on this issue? It's a bit of a blocker for us.

Is there anything I can do to help track down the cause?

Thanks,

Eliot
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com

From: Eliot Kimber <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Wednesday, December 30, 2015 at 11:17 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

In the context of the DITA OT (2.1.1), I am running saxon using the Ant <xslt> target. I include an <xmlcatalog> parameter but it appears that Saxon does not use the catalog when parsing documents directly using the document() function.

This version of the OT still uses Saxon 9.1.0.8 out of the box (the OT team is working on upgrading to the latest Saxon HE but has to do a lot of regression testing so it’s a slow process).

I have a document that is both included in the DITA map and also loaded via document() in my XSLT code. The OT processes the document as part of the input DITA data (as I would expect) but Saxon fails to resolve the DTD.

Is this a limitation in the Ant xslt target or this version of Saxon or is there a way to configure the Ant environment so Saxon has access to the catalog?

I can rewrite the Ant script to use <java> to run Saxon (and thus configure the catalog directly) but I’d rather not if there’s an easier fix for this.

Thanks,

Eliot

----
Eliot Kimber, Owner
Contrext, LLC
------------------------------------------------------------------------------ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Michael Kay
Sorry, I'm running a bit of a backlog at the moment and dusting off the Windows machine comes somewhere alongside filing VAT returns in order of enthusiasm. But it's on the list.

Michael Kay
Saxonica

On 11 Jan 2016, at 15:22, Eliot Kimber <[hidden email]> wrote:

Any status on this issue? It's a bit of a blocker for us.

Is there anything I can do to help track down the cause?

Thanks,

Eliot
----
Eliot Kimber, Owner
Contrext, LLC

From: Eliot Kimber <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Wednesday, December 30, 2015 at 11:17 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

In the context of the DITA OT (2.1.1), I am running saxon using the Ant <xslt> target. I include an <xmlcatalog> parameter but it appears that Saxon does not use the catalog when parsing documents directly using the document() function.

This version of the OT still uses Saxon 9.1.0.8 out of the box (the OT team is working on upgrading to the latest Saxon HE but has to do a lot of regression testing so it’s a slow process).

I have a document that is both included in the DITA map and also loaded via document() in my XSLT code. The OT processes the document as part of the input DITA data (as I would expect) but Saxon fails to resolve the DTD.

Is this a limitation in the Ant xslt target or this version of Saxon or is there a way to configure the Ant environment so Saxon has access to the catalog?

I can rewrite the Ant script to use <java> to run Saxon (and thus configure the catalog directly) but I’d rather not if there’s an easier fix for this.

Thanks,

Eliot

----
Eliot Kimber, Owner
Contrext, LLC
------------------------------------------------------------------------------ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Eliot Kimber-2
I fully understand. 

If there's any debugging I can do I'm willing to eat the pain of setting up a dev environment under my Windows VM.

Cheers,

E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com

From: Michael Kay <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Monday, January 11, 2016 at 10:36 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Sorry, I'm running a bit of a backlog at the moment and dusting off the Windows machine comes somewhere alongside filing VAT returns in order of enthusiasm. But it's on the list.

Michael Kay
Saxonica

On 11 Jan 2016, at 15:22, Eliot Kimber <[hidden email]> wrote:

Any status on this issue? It's a bit of a blocker for us.

Is there anything I can do to help track down the cause?

Thanks,

Eliot
----
Eliot Kimber, Owner
Contrext, LLC

From: Eliot Kimber <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Wednesday, December 30, 2015 at 11:17 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

In the context of the DITA OT (2.1.1), I am running saxon using the Ant <xslt> target. I include an <xmlcatalog> parameter but it appears that Saxon does not use the catalog when parsing documents directly using the document() function.

This version of the OT still uses Saxon 9.1.0.8 out of the box (the OT team is working on upgrading to the latest Saxon HE but has to do a lot of regression testing so it’s a slow process).

I have a document that is both included in the DITA map and also loaded via document() in my XSLT code. The OT processes the document as part of the input DITA data (as I would expect) but Saxon fails to resolve the DTD.

Is this a limitation in the Ant xslt target or this version of Saxon or is there a way to configure the Ant environment so Saxon has access to the catalog?

I can rewrite the Ant script to use <java> to run Saxon (and thus configure the catalog directly) but I’d rather not if there’s an easier fix for this.

Thanks,

Eliot

----
Eliot Kimber, Owner
Contrext, LLC
------------------------------------------------------------------------------ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/[hidden email]https://lists.sourceforge.net/lists/listinfo/saxon-help
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Eliot Kimber-2
In reply to this post by Michael Kay
Mike,

I forgot about this pending issue from back in December in January.

Were you able to try this out under Windows?

We worked around it by adding preprocess to strip the offending DOCTYPE declarations from the files that had the problem but our client is hoping to no longer need that bit of complication.

If there's more testing I can do to help this along let me know.

Cheers,

E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com

From: Michael Kay <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Monday, January 11, 2016 at 11:36 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Sorry, I'm running a bit of a backlog at the moment and dusting off the Windows machine comes somewhere alongside filing VAT returns in order of enthusiasm. But it's on the list.

Michael Kay
Saxonica

On 11 Jan 2016, at 15:22, Eliot Kimber <[hidden email]> wrote:

Any status on this issue? It's a bit of a blocker for us.

Is there anything I can do to help track down the cause?

Thanks,

Eliot
----
Eliot Kimber, Owner
Contrext, LLC

From: Eliot Kimber <[hidden email]>
Reply-To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Date: Wednesday, December 30, 2015 at 11:17 AM
To: Mailing list for the SAXON XSLT and XQuery processor <[hidden email]>
Subject: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

In the context of the DITA OT (2.1.1), I am running saxon using the Ant <xslt> target. I include an <xmlcatalog> parameter but it appears that Saxon does not use the catalog when parsing documents directly using the document() function.

This version of the OT still uses Saxon 9.1.0.8 out of the box (the OT team is working on upgrading to the latest Saxon HE but has to do a lot of regression testing so it’s a slow process).

I have a document that is both included in the DITA map and also loaded via document() in my XSLT code. The OT processes the document as part of the input DITA data (as I would expect) but Saxon fails to resolve the DTD.

Is this a limitation in the Ant xslt target or this version of Saxon or is there a way to configure the Ant environment so Saxon has access to the catalog?

I can rewrite the Ant script to use <java> to run Saxon (and thus configure the catalog directly) but I’d rather not if there’s an easier fix for this.

Thanks,

Eliot

----
Eliot Kimber, Owner
Contrext, LLC
------------------------------------------------------------------------------ _______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/[hidden email]https://lists.sourceforge.net/lists/listinfo/saxon-help
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________ saxon-help mailing list archived at http://saxon.markmail.org/ [hidden email] https://lists.sourceforge.net/lists/listinfo/saxon-help

------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Radu Coravu
Hi Eliot,

Maybe you could try to create a small sample project to exemplify the
problem. If it helps I could also try to test it on my side.

Regards,
Radu

Radu Coravu
<oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

On 6/30/2016 3:22 PM, Eliot Kimber wrote:

> Mike,
>
> I forgot about this pending issue from back in December in January.
>
> Were you able to try this out under Windows?
>
> We worked around it by adding preprocess to strip the offending DOCTYPE
> declarations from the files that had the problem but our client is
> hoping to no longer need that bit of complication.
>
> If there's more testing I can do to help this along let me know.
>
> Cheers,
>
> E.
> ----
> Eliot Kimber, Owner
> Contrext, LLC
> http://contrext.com
>
> From: Michael Kay <[hidden email] <mailto:[hidden email]>>
> Reply-To: Mailing list for the SAXON XSLT and XQuery processor
> <[hidden email] <mailto:[hidden email]>>
> Date: Monday, January 11, 2016 at 11:36 AM
> To: Mailing list for the SAXON XSLT and XQuery processor
> <[hidden email] <mailto:[hidden email]>>
> Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant
> xslt Task
>
> Sorry, I'm running a bit of a backlog at the moment and dusting off the
> Windows machine comes somewhere alongside filing VAT returns in order of
> enthusiasm. But it's on the list.
>
> Michael Kay
> Saxonica
>
>> On 11 Jan 2016, at 15:22, Eliot Kimber <[hidden email]
>> <mailto:[hidden email]>> wrote:
>>
>> Any status on this issue? It's a bit of a blocker for us.
>>
>> Is there anything I can do to help track down the cause?
>>
>> Thanks,
>>
>> Eliot
>> ----
>> Eliot Kimber, Owner
>> Contrext, LLC
>> http://contrext.com
>>
>> From: Eliot Kimber <[hidden email] <mailto:[hidden email]>>
>> Reply-To: Mailing list for the SAXON XSLT and XQuery processor
>> <[hidden email]
>> <mailto:[hidden email]>>
>> Date: Wednesday, December 30, 2015 at 11:17 AM
>> To: Mailing list for the SAXON XSLT and XQuery processor
>> <[hidden email]
>> <mailto:[hidden email]>>
>> Subject: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant
>> xslt Task
>>
>> In the context of the DITA OT (2.1.1), I am running saxon using the
>> Ant <xslt> target. I include an <xmlcatalog> parameter but it appears
>> that Saxon does not use the catalog when parsing documents directly
>> using the document() function.
>>
>> This version of the OT still uses Saxon 9.1.0.8 out of the box (the OT
>> team is working on upgrading to the latest Saxon HE but has to do a
>> lot of regression testing so it’s a slow process).
>>
>> I have a document that is both included in the DITA map and also
>> loaded via document() in my XSLT code. The OT processes the document
>> as part of the input DITA data (as I would expect) but Saxon fails to
>> resolve the DTD.
>>
>> Is this a limitation in the Ant xslt target or this version of Saxon
>> or is there a way to configure the Ant environment so Saxon has access
>> to the catalog?
>>
>> I can rewrite the Ant script to use <java> to run Saxon (and thus
>> configure the catalog directly) but I’d rather not if there’s an
>> easier fix for this.
>>
>> Thanks,
>>
>> Eliot
>>
>> ----
>> Eliot Kimber, Owner
>> Contrext, LLC
>> http://contrext.com <http://contrext.com/>
>> ------------------------------------------------------------------------------
>> _______________________________________________ saxon-help mailing
>> list archived at
>> http://saxon.markmail.org/saxon-help@...
>> <mailto:[hidden email]>https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>> ------------------------------------------------------------------------------
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email] <mailto:[hidden email]>
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> <mailto:[hidden email]>
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
>
>
>
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Saxon Appears to Not Use Catalog When Run Via Ant xslt Task

Eliot Kimber-2
I can try to set up a focused test for this but it will probably be a week
or so as I'm on the road and limited in my available work time.

Cheers,

E.
----
Eliot Kimber, Owner
Contrext, LLC
http://contrext.com




On 6/30/16, 6:33 AM, "Radu Coravu" <[hidden email]> wrote:

>Hi Eliot,
>
>Maybe you could try to create a small sample project to exemplify the
>problem. If it helps I could also try to test it on my side.
>
>Regards,
>Radu
>
>Radu Coravu
><oXygen/>  XML Editor, Schema Editor and XSLT Editor/Debugger
>http://www.oxygenxml.com
>
>On 6/30/2016 3:22 PM, Eliot Kimber wrote:
>> Mike,
>>
>> I forgot about this pending issue from back in December in January.
>>
>> Were you able to try this out under Windows?
>>
>> We worked around it by adding preprocess to strip the offending DOCTYPE
>> declarations from the files that had the problem but our client is
>> hoping to no longer need that bit of complication.
>>
>> If there's more testing I can do to help this along let me know.
>>
>> Cheers,
>>
>> E.
>> ----
>> Eliot Kimber, Owner
>> Contrext, LLC
>> http://contrext.com
>>
>> From: Michael Kay <[hidden email] <mailto:[hidden email]>>
>> Reply-To: Mailing list for the SAXON XSLT and XQuery processor
>> <[hidden email]
>><mailto:[hidden email]>>
>> Date: Monday, January 11, 2016 at 11:36 AM
>> To: Mailing list for the SAXON XSLT and XQuery processor
>> <[hidden email]
>><mailto:[hidden email]>>
>> Subject: Re: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant
>> xslt Task
>>
>> Sorry, I'm running a bit of a backlog at the moment and dusting off the
>> Windows machine comes somewhere alongside filing VAT returns in order of
>> enthusiasm. But it's on the list.
>>
>> Michael Kay
>> Saxonica
>>
>>> On 11 Jan 2016, at 15:22, Eliot Kimber <[hidden email]
>>> <mailto:[hidden email]>> wrote:
>>>
>>> Any status on this issue? It's a bit of a blocker for us.
>>>
>>> Is there anything I can do to help track down the cause?
>>>
>>> Thanks,
>>>
>>> Eliot
>>> ----
>>> Eliot Kimber, Owner
>>> Contrext, LLC
>>> http://contrext.com
>>>
>>> From: Eliot Kimber <[hidden email] <mailto:[hidden email]>>
>>> Reply-To: Mailing list for the SAXON XSLT and XQuery processor
>>> <[hidden email]
>>> <mailto:[hidden email]>>
>>> Date: Wednesday, December 30, 2015 at 11:17 AM
>>> To: Mailing list for the SAXON XSLT and XQuery processor
>>> <[hidden email]
>>> <mailto:[hidden email]>>
>>> Subject: [saxon] Saxon Appears to Not Use Catalog When Run Via Ant
>>> xslt Task
>>>
>>> In the context of the DITA OT (2.1.1), I am running saxon using the
>>> Ant <xslt> target. I include an <xmlcatalog> parameter but it appears
>>> that Saxon does not use the catalog when parsing documents directly
>>> using the document() function.
>>>
>>> This version of the OT still uses Saxon 9.1.0.8 out of the box (the OT
>>> team is working on upgrading to the latest Saxon HE but has to do a
>>> lot of regression testing so it¹s a slow process).
>>>
>>> I have a document that is both included in the DITA map and also
>>> loaded via document() in my XSLT code. The OT processes the document
>>> as part of the input DITA data (as I would expect) but Saxon fails to
>>> resolve the DTD.
>>>
>>> Is this a limitation in the Ant xslt target or this version of Saxon
>>> or is there a way to configure the Ant environment so Saxon has access
>>> to the catalog?
>>>
>>> I can rewrite the Ant script to use <java> to run Saxon (and thus
>>> configure the catalog directly) but I¹d rather not if there¹s an
>>> easier fix for this.
>>>
>>> Thanks,
>>>
>>> Eliot
>>>
>>> ----
>>> Eliot Kimber, Owner
>>> Contrext, LLC
>>> http://contrext.com <http://contrext.com/>
>>>
>>>------------------------------------------------------------------------
>>>------
>>> _______________________________________________ saxon-help mailing
>>> list archived at
>>> http://saxon.markmail.org/saxon-help@...
>>>
>>><mailto:[hidden email]>https://lists.sourceforge.net/l
>>>ists/listinfo/saxon-help
>>>
>>>
>>>------------------------------------------------------------------------
>>>------
>>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>>> Monitor end-to-end web transactions and take corrective actions now
>>> Troubleshoot faster and improve end-user experience. Signup Now!
>>>
>>>http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140________
>>>_______________________________________
>>> saxon-help mailing list archived at http://saxon.markmail.org/
>>> [hidden email]
>>><mailto:[hidden email]>
>>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>>
>>-------------------------------------------------------------------------
>>-----
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>>
>>http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140_________
>>______________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> <mailto:[hidden email]>
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>>
>>
>>-------------------------------------------------------------------------
>>-----
>> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
>> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
>> present their vision of the future. This family event has something for
>> everyone, including kids. Get more information and register today.
>> http://sdm.link/attshape
>>
>>
>>
>> _______________________________________________
>> saxon-help mailing list archived at http://saxon.markmail.org/
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/saxon-help
>>
>
>
>
>--------------------------------------------------------------------------
>----
>Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
>Francisco, CA to explore cutting-edge tech and listen to tech luminaries
>present their vision of the future. This family event has something for
>everyone, including kids. Get more information and register today.
>http://sdm.link/attshape
>_______________________________________________
>saxon-help mailing list archived at http://saxon.markmail.org/
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/saxon-help
>



------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Loading...