It's not clear from the information you have supplied, but I would think a
likely explanation is that you have used a Windows filesname (such as
C:\UMLR\tmp\3639122.xml.mod) in a context where a URI is expected. Some APIs
tolerate this; Saxon typically doesn't. It should be written
file:///c:/UMLR/tmp/3639122.xml.mod.
It's also possible, of course (from the information given) that the file
really doesn't exist.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your answer. The System.out.println() prints this URI:
file:///C:/UMLR/tmp/9129250.xml.mod
Also, the file does exists, because I create it before in the program, and
already checked that it is there when called.
I suspect that there are further diagnostics being written to System.err which
perhaps you are not displaying. If this is the case, please either redirect
System.err to some log file, or configure Saxon to write to a location other
than System.err, perhaps by supplying your own JAXP ErrorListener. (or you
could supply an instance of the Saxon StandardErrorListener in which you have
called setErrorOutput() to direct the error messages perhaps to a file.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I got all the error message, and it told, in an upper part, that the
problem was in a line in the xslt file (still don't get why It result in an
XPathException). Anyways, I got to track the problem.
Thank you so much, this libs are so usefull.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Recoverable error on line 77 of PrimerMapeo.xslt:
FODC0002: Exception thrown by URIResolver: Invalid relative URI
{C:\UMLR\tmp\1020457.xml.mod}: Illegal character in opaque part at index 2:
C:\UMLR\tmp\1020457.xml.mod
Error on line 77 of PrimerMapeo.xslt:
FODC0002: Failed to load document C:\UMLR\tmp\1020457.xml.mod
; SystemID: file:///D:/Mis%20documentos/FRSF/Beca%20I+D/2011/workspace/umlrela
cional/files/PrimerMapeo.xslt; Line#: 77; Column#: -1
net.sf.saxon.trans.XPathException: Failed to load document
C:\UMLR\tmp\1020457.xml.mod
at net.sf.saxon.expr.Expression.dynamicError(Expression.java:995)
at net.sf.saxon.functions.Doc.doc(Doc.java:158)
at net.sf.saxon.functions.Doc.evaluateItem(Doc.java:129)
at net.sf.saxon.expr.Expression.iterate(Expression.java:393)
at net.sf.saxon.expr.PathExpression.iterate(PathExpression.java:619)
at net.sf.saxon.expr.PathExpression.iterate(PathExpression.java:619)
at net.sf.saxon.expr.LazyExpression.iterate(LazyExpression.java:106)
at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:98)
at net.sf.saxon.value.Value.getIterator(Value.java:119)
at net.sf.saxon.expr.VariableReference.iterate(VariableReference.java:407)
at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:344)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:123)
at net.sf.saxon.expr.LetExpression.process(LetExpression.java:409)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:318)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:269)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:123)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:318)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:269)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:569)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:123)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:318)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:269)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:569)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:123)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:318)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:269)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:123)
at net.sf.saxon.expr.LetExpression.process(LetExpression.java:409)
at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:387)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:569)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:123)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:318)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:269)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:123)
at net.sf.saxon.expr.LetExpression.process(LetExpression.java:409)
at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:387)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:569)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:123)
at net.sf.saxon.expr.instruct.ForEach.processLeavingTail(ForEach.java:387)
at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:567)
at net.sf.saxon.expr.instruct.Block.processLeavingTail(Block.java:569)
at net.sf.saxon.expr.instruct.Instruction.process(Instruction.java:123)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:318)
at net.sf.saxon.expr.instruct.ElementCreator.processLeavingTail(ElementCreator
.java:269)
at net.sf.saxon.expr.instruct.Template.applyLeavingTail(Template.java:208)
at net.sf.saxon.expr.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.jav
a:368)
at net.sf.saxon.Controller.transformDocument(Controller.java:1887)
at net.sf.saxon.Controller.transform(Controller.java:1737)
I got this error message AGAIN, when I did resolve the NullPointer one.
What I am missing?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi! Well, Im using JDOM, SAXON and XERCES to transform xml docs, using
stylesheets.
The problem is, that during this transformation, I receive this error message:
My transforming code, is:
The line where the error pops up, is: conversor.transform(wrapper, resultado);
Sorry for the newbie question, but I don't know what more to try.
Thanks, hope to read some answers.
It's not clear from the information you have supplied, but I would think a
likely explanation is that you have used a Windows filesname (such as
C:\UMLR\tmp\3639122.xml.mod) in a context where a URI is expected. Some APIs
tolerate this; Saxon typically doesn't. It should be written
file:///c:/UMLR/tmp/3639122.xml.mod.
It's also possible, of course (from the information given) that the file
really doesn't exist.
Hi!
Thanks for your answer. The System.out.println() prints this URI:
file:///C:/UMLR/tmp/9129250.xml.mod
Also, the file does exists, because I create it before in the program, and
already checked that it is there when called.
The other method where I read the doc, it is:
I suspect that there are further diagnostics being written to System.err which
perhaps you are not displaying. If this is the case, please either redirect
System.err to some log file, or configure Saxon to write to a location other
than System.err, perhaps by supplying your own JAXP ErrorListener. (or you
could supply an instance of the Saxon StandardErrorListener in which you have
called setErrorOutput() to direct the error messages perhaps to a file.
Hi again!
Ok, I got all the error message, and it told, in an upper part, that the
problem was in a line in the xslt file (still don't get why It result in an
XPathException). Anyways, I got to track the problem.
Thank you so much, this libs are so usefull.
Ok, the full system error message, is:
I got this error message AGAIN, when I did resolve the NullPointer one.
What I am missing?
The doc() function expects a URI, not a Windows filename. The URI
corresponding to this filename is
file:///c:/UMLR/tmp/1020457.xml.mod
I see, I was looking for the issue in the other function.
Tried, and solved.
Kinds regards.