java.lang.IllegalArgumentException: URI is not absolute

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.IllegalArgumentException: URI is not absolute

Matthias Born-3
Hello,

i'm getting this exception while calling a xsl transformation from a little
swt-client. With <xsl:message> i print out the uri for debugging. the funny
thing is: XALAN works fine

At first the SAXON output:

[2.0 | SAXON 8.6.1 from Saxonica | http://www.saxonica.com/]
file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
CMSdoc.xsd
file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
CMSents.xsd
file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
CMStable_OASIS.xsd
java.lang.IllegalArgumentException: URI is not absolute
        at java.io.File.<init>(Unknown Source)

And here's the XALAN output, shortened:

[1 | Apache Software Foundation | http://xml.apache.org/xalan-j | Xalan Java
2.4.1]
file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
CMSdoc.xsd
file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
CMSents.xsd
file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
CMStable_OASIS.xsd
file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
CMStable_simple.xsd
file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
CMSdoc_id_grp.xsd
...

You see: no problem with or after the CMStable_OASIS.xsd

The part from the stylesheet, that causes this problem:

<xsl:template match="*[local-name()='include']">
  <xsl:param name="accessedLocations"/>
  <xsl:param name="includedLocations"/>
  <xsl:variable name="path">
    <xsl:value-of select="concat($stystem-path,@schemaLocation)"/>
  </xsl:variable>
  <xsl:message><xsl:value-of select="$path"/></xsl:message>
  <xsl:apply-templates select="document($path)/*[local-name()='schema']"
mode="next">
    <xsl:with-param name="accessedLocations"
select="concat($accessedLocations,',',$includedLocations)"/>
  </xsl:apply-templates>
</xsl:template>

Any ideas?!

Thank you!

matze
--
Orientation in Objects GmbH
Weinheimerstr. 68
D-68309 Mannheim
http://www.oio.de
Tel +49(0)621-71839-0
Fax. +49(0)621-71839-50



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.IllegalArgumentException: URI is not absolute

David Carlisle


> file:/E:/FIZ-KA

That should probably be

file:///E:/FIZ-KA

although the mappings between windows file paths and URI ae notoriously
vague and under specified.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: java.lang.IllegalArgumentException: URI is not absolute

Michael Kay
In reply to this post by Matthias Born-3
Sorry, there's not enough information here to see what's happening.

Is there a more complete stack trace? I need to see where the java.io.File
constructor is being called from. Preferably I need enough information to
reproduce the problem.

There's certainly no obvious reason why one of these URIs should be accepted
by the document() function and the others should fail. The only thing that's
different is that the failing URI contains an underscore. But underscores
are allowed in URIs and I've just checked that Saxon accepts them OK. It's
just possible, I suppose, that you're using a Java VM that isn't happy with
an underscore in a URI. Perhaps you could do some experiments to see whether
the underscore is causing the problem.

Saxon is sometimes stricter about enforcing the rules for URIs than other
products, for example I think Xalan accepts Windows filenames where a URI is
required, while Saxon does not. But I would normally expect a proper Saxon
run-time error, not an IllegalArgumentException.

How was the transformation invoked? Is the base URI of the stylesheet known?

I don't think it's relevant to the problem, but this code:

>   <xsl:variable name="path">
>     <xsl:value-of select="concat($stystem-path,@schemaLocation)"/>
>   </xsl:variable>

causes a lot of complications. It would be much simpler if it were replaced
by

 <xsl:variable name="path" select="concat($stystem-path,@schemaLocation)"/>

[is your variable really named $stystem-path?]

The reason is that when you supply $path as an argument to the document()
function, and $path is a node rather than a string, then the base URI of the
node needs to be calculated. It's possible that the failure is occurring
during this process.

Another comment here is that concat() is not a particularly good way of
resolving a relative URI against a base URI. It's better to use the
resolve-uri() function in XPath 2.0.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Matthias Born
> Sent: 13 December 2005 18:05
> To: [hidden email]
> Subject: [saxon] java.lang.IllegalArgumentException: URI is
> not absolute
>
> Hello,
>
> i'm getting this exception while calling a xsl transformation
> from a little
> swt-client. With <xsl:message> i print out the uri for
> debugging. the funny
> thing is: XALAN works fine
>
> At first the SAXON output:
>
> [2.0 | SAXON 8.6.1 from Saxonica | http://www.saxonica.com/]
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> /etc/files/xsd/
> CMSdoc.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> /etc/files/xsd/
> CMSents.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> /etc/files/xsd/
> CMStable_OASIS.xsd
> java.lang.IllegalArgumentException: URI is not absolute
> at java.io.File.<init>(Unknown Source)
>
> And here's the XALAN output, shortened:
>
> [1 | Apache Software Foundation |
> http://xml.apache.org/xalan-j | Xalan Java
> 2.4.1]
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> /etc/files/xsd/
> CMSdoc.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> /etc/files/xsd/
> CMSents.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> /etc/files/xsd/
> CMStable_OASIS.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> /etc/files/xsd/
> CMStable_simple.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> /etc/files/xsd/
> CMSdoc_id_grp.xsd
> ...
>
> You see: no problem with or after the CMStable_OASIS.xsd
>
> The part from the stylesheet, that causes this problem:
>
> <xsl:template match="*[local-name()='include']">
>   <xsl:param name="accessedLocations"/>
>   <xsl:param name="includedLocations"/>
>   <xsl:variable name="path">
>     <xsl:value-of select="concat($stystem-path,@schemaLocation)"/>
>   </xsl:variable>
>   <xsl:message><xsl:value-of select="$path"/></xsl:message>
>   <xsl:apply-templates
> select="document($path)/*[local-name()='schema']"
> mode="next">
>     <xsl:with-param name="accessedLocations"
> select="concat($accessedLocations,',',$includedLocations)"/>
>   </xsl:apply-templates>
> </xsl:template>
>
> Any ideas?!
>
> Thank you!
>
> matze
> --
> Orientation in Objects GmbH
> Weinheimerstr. 68
> D-68309 Mannheim
> http://www.oio.de
> Tel +49(0)621-71839-0
> Fax. +49(0)621-71839-50
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.IllegalArgumentException: URI is not absolute

Andrew Welch
In reply to this post by Matthias Born-3
> At first the SAXON output:
>
> [2.0 | SAXON 8.6.1 from Saxonica | http://www.saxonica.com/]
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> CMSdoc.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> CMSents.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> CMStable_OASIS.xsd
> java.lang.IllegalArgumentException: URI is not absolute
>         at java.io.File.<init>(Unknown Source)
>
> And here's the XALAN output, shortened:
>
> [1 | Apache Software Foundation | http://xml.apache.org/xalan-j | Xalan Java
> 2.4.1]
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> CMSdoc.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> CMSents.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> CMStable_OASIS.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> CMStable_simple.xsd
> file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> CMSdoc_id_grp.xsd
> ...
>
> You see: no problem with or after the CMStable_OASIS.xsd


Does CMStable_OASIS.xsd reference any other xsd's ?  Pure speculation...


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: java.lang.IllegalArgumentException: URI is not absolute

Matthias Born
In reply to this post by Michael Kay
Hello,

at first thank you Micheal for the long answer and sorry for my bad english.

Following your suggestions i tried the following:

- <xsl:variable name="path" select="concat($system-path, @schemaLocation)"/>
  (and of course, renamed the variable to system-path)
- changing Java VM from 1.4.2_08 to 1.5.0_02
- using XSLT 2.0 with resolve-uri() instead of 1.0 and concat()
- Renaming the included schema modules to names without underscore

But the result hasn't changed.

So i've to ask for help again with more and new informations:

The template:

<xsl:template match="*[local-name()='include']">
  <xsl:param name="accessedLocations"/>
  <xsl:param name="includedLocations"/>
  <xsl:variable name="path" select="resolve-uri(@schemaLocation,$system-path)"/>
  <!-- <xsl:variable name="path" select="concat($system-path,@schemaLocation)"/> -->
  <xsl:message><xsl:value-of select="$path"/></xsl:message>
  <xsl:apply-templates select="document($path)/*[local-name()='schema']" mode="next">
    <xsl:with-param name="accessedLocations" select="concat($accessedLocations,',',
$includedLocations)"/>
  </xsl:apply-templates>
</xsl:template>

The calling java-code from a simple swt application:

runTransformationButton.addListener(SWT.Selection, new Listener() {
    private TransformerFactory transformerFactory;

    private Transformer        transformer;

    public void handleEvent(Event e) {
        System.out.println(DEFAULT_DIRECTORY_PATH_XSL + "/" + xslPath);
        System.out.println(DEFAULT_DIRECTORY_PATH_XSD + "/"
                + xsdSourcePath);
        System.out.println(DEFAULT_DIRECTORY_PATH_RESULT + "/"
                + xsdTargetPath);
        try {
            transformerFactory = TransformerFactory.newInstance();
            transformer = transformerFactory
                    .newTransformer(new StreamSource(
                            DEFAULT_DIRECTORY_PATH_XSL + "/" + xslPath));
            transformer.setParameter("system-path", "file:/E:/FIZ-KA/workspace/e-
fiz-wpi-demodularisation-swt/etc/files/xsd/");
            transformer.transform(new StreamSource(
                    DEFAULT_DIRECTORY_PATH_XSD + "/" + xsdSourcePath),
                    new StreamResult(DEFAULT_DIRECTORY_PATH_RESULT
                            + "/" + xsdTargetPath));
        } catch (TransformerConfigurationException exception) {
            // TODO Auto-generated catch block
            exception.printStackTrace();
        } catch (TransformerException exception) {
            // TODO Auto-generated catch block
            exception.printStackTrace();
        }
    }
});

And at last the stack trace

[2.0 | SAXON 8.6.1 from Saxonica | http://www.saxonica.com/]
file:/E:/FIZ-KA/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/CMSdoc.xsd
file:/E:/FIZ-KA/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/CMSents.xsd
file:/E:/FIZ-KA/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
CMStable_OASIS.xsd
java.lang.IllegalArgumentException: URI is not absolute
        at java.io.File.<init>(Unknown Source)
        at net.sf.saxon.event.Emitter.makeWriter(Emitter.java:138)
        at net.sf.saxon.event.XMLEmitter.openDocument(XMLEmitter.java:119)
        at net.sf.saxon.event.XMLEmitter.characters(XMLEmitter.java:519)
        at net.sf.saxon.event.ProxyReceiver.characters(ProxyReceiver.java:180)
        at net.sf.saxon.event.XMLIndenter.indent(XMLIndenter.java:182)
        at net.sf.saxon.event.XMLIndenter.startElement(XMLIndenter.java:67)
        at net.sf.saxon.event.ProxyReceiver.startElement(ProxyReceiver.java:116)
        at net.sf.saxon.event.NamespaceReducer.startElement(NamespaceReducer.java:55)
        at net.sf.saxon.event.ComplexContentOutputter.
startContent(ComplexContentOutputter.java:477)
        at net.sf.saxon.event.ComplexContentOutputter.
startElement(ComplexContentOutputter.java:156)
        at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.
java:155)
        at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
        at net.sf.saxon.instruct.Template.expand(Template.java:95)
        at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
290)
        at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
processLeavingTail(ApplyTemplates.java:425)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
270)
        at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
processLeavingTail(ApplyTemplates.java:425)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
270)
        at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
        at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.
java:133)
        at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:283)
        at net.sf.saxon.instruct.Instruction.process(Instruction.java:90)
        at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:222)
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:328)
        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        at net.sf.saxon.instruct.Template.expand(Template.java:95)
        at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
290)
        at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
        at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.
java:133)
        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        at net.sf.saxon.instruct.Template.expand(Template.java:95)
        at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
290)
        at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
processLeavingTail(ApplyTemplates.java:425)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
270)
        at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
        at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.
java:133)
        at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:283)
        at net.sf.saxon.instruct.Instruction.process(Instruction.java:90)
        at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:222)
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:328)
        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        at net.sf.saxon.instruct.Template.expand(Template.java:95)
        at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
290)
        at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
        at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.
java:133)
        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        at net.sf.saxon.instruct.Template.expand(Template.java:95)
        at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
290)
        at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
processLeavingTail(ApplyTemplates.java:425)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
270)
        at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
        at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.
java:133)
        at net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:283)
        at net.sf.saxon.instruct.Instruction.process(Instruction.java:90)
        at net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:222)
        at net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpression.java:328)
        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        at net.sf.saxon.instruct.Template.expand(Template.java:95)
        at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
290)
        at net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
        at net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyTemplates.
java:133)
        at net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
        at net.sf.saxon.instruct.Instruction.process(Instruction.java:90)
        at net.sf.saxon.instruct.ElementCreator.processLeavingTail(ElementCreator.
java:162)
        at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
        at net.sf.saxon.instruct.Template.expand(Template.java:95)
        at net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
290)
        at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
processLeavingTail(ApplyTemplates.java:425)
        at net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTemplates.java:
270)
        at net.sf.saxon.Controller.transformDocument(Controller.java:1406)
        at net.sf.saxon.Controller.transform(Controller.java:1234)
        at XSDFlattenerTransformation$4.handleEvent(XSDFlattenerTransformation.java:
189)
        at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
        at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
        at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
        at XSDFlattenerTransformation.<init>(XSDFlattenerTransformation.java:100)
        at XSDFlattenerTransformation.main(XSDFlattenerTransformation.java:206)
Exception in thread "main"

Thank you again and again!!!

matze

On Wed, 14 Dec 2005 11:28:44 -0000, Michael Kay wrote

> Sorry, there's not enough information here to see what's happening.
>
> Is there a more complete stack trace? I need to see where the java.io.File
> constructor is being called from. Preferably I need enough
> information to reproduce the problem.
>
> There's certainly no obvious reason why one of these URIs should be accepted
> by the document() function and the others should fail. The only
> thing that's different is that the failing URI contains an
> underscore. But underscores are allowed in URIs and I've just
> checked that Saxon accepts them OK. It's just possible, I suppose,
> that you're using a Java VM that isn't happy with an underscore in a
> URI. Perhaps you could do some experiments to see whether the
> underscore is causing the problem.
>
> Saxon is sometimes stricter about enforcing the rules for URIs than other
> products, for example I think Xalan accepts Windows filenames where
> a URI is required, while Saxon does not. But I would normally expect
> a proper Saxon run-time error, not an IllegalArgumentException.
>
> How was the transformation invoked? Is the base URI of the
> stylesheet known?
>
> I don't think it's relevant to the problem, but this code:
>
> >   <xsl:variable name="path">
> >     <xsl:value-of select="concat($stystem-path,@schemaLocation)"/>
> >   </xsl:variable>
>
> causes a lot of complications. It would be much simpler if it were replaced
> by
>
>  <xsl:variable name="path" select="concat($stystem-path,
> @schemaLocation)"/>
>
> [is your variable really named $stystem-path?]
>
> The reason is that when you supply $path as an argument to the
> document() function, and $path is a node rather than a string, then
> the base URI of the node needs to be calculated. It's possible that
> the failure is occurring during this process.
>
> Another comment here is that concat() is not a particularly good way
> of resolving a relative URI against a base URI. It's better to use
> the resolve-uri() function in XPath 2.0.
>
> Michael Kay
> http://www.saxonica.com/
>
> > -----Original Message-----
> > From: [hidden email]
> > [mailto:[hidden email]] On Behalf Of
> > Matthias Born
> > Sent: 13 December 2005 18:05
> > To: [hidden email]
> > Subject: [saxon] java.lang.IllegalArgumentException: URI is
> > not absolute
> >
> > Hello,
> >
> > i'm getting this exception while calling a xsl transformation
> > from a little
> > swt-client. With <xsl:message> i print out the uri for
> > debugging. the funny
> > thing is: XALAN works fine
> >
> > At first the SAXON output:
> >
> > [2.0 | SAXON 8.6.1 from Saxonica | http://www.saxonica.com/]
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > /etc/files/xsd/
> > CMSdoc.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > /etc/files/xsd/
> > CMSents.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > /etc/files/xsd/
> > CMStable_OASIS.xsd
> > java.lang.IllegalArgumentException: URI is not absolute
> > at java.io.File.<init>(Unknown Source)
> >
> > And here's the XALAN output, shortened:
> >
> > [1 | Apache Software Foundation |
> > http://xml.apache.org/xalan-j | Xalan Java
> > 2.4.1]
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > /etc/files/xsd/
> > CMSdoc.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > /etc/files/xsd/
> > CMSents.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > /etc/files/xsd/
> > CMStable_OASIS.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > /etc/files/xsd/
> > CMStable_simple.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > /etc/files/xsd/
> > CMSdoc_id_grp.xsd
> > ...
> >
> > You see: no problem with or after the CMStable_OASIS.xsd
> >
> > The part from the stylesheet, that causes this problem:
> >
> > <xsl:template match="*[local-name()='include']">
> >   <xsl:param name="accessedLocations"/>
> >   <xsl:param name="includedLocations"/>
> >   <xsl:variable name="path">
> >     <xsl:value-of select="concat($stystem-path,@schemaLocation)"/>
> >   </xsl:variable>
> >   <xsl:message><xsl:value-of select="$path"/></xsl:message>
> >   <xsl:apply-templates
> > select="document($path)/*[local-name()='schema']"
> > mode="next">
> >     <xsl:with-param name="accessedLocations"
> > select="concat($accessedLocations,',',$includedLocations)"/>
> >   </xsl:apply-templates>
> > </xsl:template>
> >
> > Any ideas?!
> >
> > Thank you!
> >
> > matze
> > --
> > Orientation in Objects GmbH
> > Weinheimerstr. 68
> > D-68309 Mannheim
> > http://www.oio.de
> > Tel +49(0)621-71839-0
> > Fax. +49(0)621-71839-50
> >
> >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep
> > through log files
> > for problems?  Stop!  Download the new AJAX search engine that makes
> > searching your log files as easy as surfing the  web.  
> > DOWNLOAD SPLUNK!
> > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > saxon-help mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/saxon-help
> >
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files for problems?  Stop!  Download the new AJAX search engine
> that makes searching your log files as easy as surfing the  web.
>  DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help


--
Orientation in Objects GmbH
Weinheimerstr. 68
D-68309 Mannheim
http://www.oio.de
Tel +49(0)621-71839-0
Fax. +49(0)621-71839-50



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.IllegalArgumentException: URI is not absolute

Matthias Born
In reply to this post by Andrew Welch
Sorry, i've overseen the other answers before asking again.

To you, David, using "file:///..." as value for $system-path doesn't change the
result. i just tried.

And to you, Andrew: Yes, it does. Your speculation is right, it references others.
Even in that way: a references b and b references a. Does this make the difference/
problem?! Running the stylesheet without calling via java it works fine (it had me
cost a lot of time to avoid a stack overflow...).  Can there be sth. i disobeyed?!

matze


On Wed, 14 Dec 2005 11:53:20 +0000, andrew welch wrote

> > At first the SAXON output:
> >
> > [2.0 | SAXON 8.6.1 from Saxonica | http://www.saxonica.com/]
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> > CMSdoc.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> > CMSents.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> > CMStable_OASIS.xsd
> > java.lang.IllegalArgumentException: URI is not absolute
> >         at java.io.File.<init>(Unknown Source)
> >
> > And here's the XALAN output, shortened:
> >
> > [1 | Apache Software Foundation | http://xml.apache.org/xalan-j | Xalan Java
> > 2.4.1]
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> > CMSdoc.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> > CMSents.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> > CMStable_OASIS.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> > CMStable_simple.xsd
> > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt/etc/files/xsd/
> > CMSdoc_id_grp.xsd
> > ...
> >
> > You see: no problem with or after the CMStable_OASIS.xsd
>
> Does CMStable_OASIS.xsd reference any other xsd's ?  Pure speculation...
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep through
> log files for problems?  Stop!  Download the new AJAX search engine
> that makes searching your log files as easy as surfing the  web.
>  DOWNLOAD SPLUNK! <a href="http://ads.osdn.com/?ad_idv37&alloc_id865&opÌk">http://ads.osdn.com/?ad_idv37&alloc_id865&opÌk 
_______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help


--
Orientation in Objects GmbH
Weinheimerstr. 68
D-68309 Mannheim
http://www.oio.de
Tel +49(0)621-71839-0
Fax. +49(0)621-71839-50



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
<a href="http://ads.osdn.com/?ad_idv37&alloc_id865&op=click">http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help
Reply | Threaded
Open this post in threaded view
|

RE: java.lang.IllegalArgumentException: URI is not absolute

Michael Kay
In reply to this post by Matthias Born
Thanks. The stack trace shows that this has nothing to do with the calls on
the document() function, but is actually concerned with creation of the
output file.

Saxon should be catching the IllegalArgumentException, and reporting a
proper error message. I'll fix this.

The problem seems to be that the system ID supplied in your call to "new
StreamResult()" doesn't match the preconditions for new File(new URI(s)):
either it isn't an absolute URI, or it doesn't use the "file:" scheme. I
can't see from your code what the actual value is.

If you want to supply a relative URI, I'd suggest doing new StreamResult(new
File(uri)).

Perhaps it should be possible to supply a relative URI to new
StreamResult(): I can't see anything in the current specs that disallows it.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: [hidden email]
> [mailto:[hidden email]] On Behalf Of
> Matthias Born
> Sent: 14 December 2005 13:23
> To: [hidden email]
> Subject: RE: [saxon] java.lang.IllegalArgumentException: URI
> is not absolute
>
> Hello,
>
> at first thank you Micheal for the long answer and sorry for
> my bad english.
>
> Following your suggestions i tried the following:
>
> - <xsl:variable name="path" select="concat($system-path,
> @schemaLocation)"/>
>   (and of course, renamed the variable to system-path)
> - changing Java VM from 1.4.2_08 to 1.5.0_02
> - using XSLT 2.0 with resolve-uri() instead of 1.0 and concat()
> - Renaming the included schema modules to names without underscore
>
> But the result hasn't changed.
>
> So i've to ask for help again with more and new informations:
>
> The template:
>
> <xsl:template match="*[local-name()='include']">
>   <xsl:param name="accessedLocations"/>
>   <xsl:param name="includedLocations"/>
>   <xsl:variable name="path"
> select="resolve-uri(@schemaLocation,$system-path)"/>
>   <!-- <xsl:variable name="path"
> select="concat($system-path,@schemaLocation)"/> -->
>   <xsl:message><xsl:value-of select="$path"/></xsl:message>
>   <xsl:apply-templates
> select="document($path)/*[local-name()='schema']" mode="next">
>     <xsl:with-param name="accessedLocations"
> select="concat($accessedLocations,',',
> $includedLocations)"/>
>   </xsl:apply-templates>
> </xsl:template>
>
> The calling java-code from a simple swt application:
>
> runTransformationButton.addListener(SWT.Selection, new Listener() {
>     private TransformerFactory transformerFactory;
>
>     private Transformer        transformer;
>
>     public void handleEvent(Event e) {
>         System.out.println(DEFAULT_DIRECTORY_PATH_XSL + "/" +
> xslPath);
>         System.out.println(DEFAULT_DIRECTORY_PATH_XSD + "/"
>                 + xsdSourcePath);
>         System.out.println(DEFAULT_DIRECTORY_PATH_RESULT + "/"
>                 + xsdTargetPath);
>         try {
>             transformerFactory = TransformerFactory.newInstance();
>             transformer = transformerFactory
>                     .newTransformer(new StreamSource(
>                             DEFAULT_DIRECTORY_PATH_XSL + "/"
> + xslPath));
>             transformer.setParameter("system-path",
> "file:/E:/FIZ-KA/workspace/e-
> fiz-wpi-demodularisation-swt/etc/files/xsd/");
>             transformer.transform(new StreamSource(
>                     DEFAULT_DIRECTORY_PATH_XSD + "/" + xsdSourcePath),
>                     new StreamResult(DEFAULT_DIRECTORY_PATH_RESULT
>                             + "/" + xsdTargetPath));
>         } catch (TransformerConfigurationException exception) {
>             // TODO Auto-generated catch block
>             exception.printStackTrace();
>         } catch (TransformerException exception) {
>             // TODO Auto-generated catch block
>             exception.printStackTrace();
>         }
>     }
> });
>
> And at last the stack trace
>
> [2.0 | SAXON 8.6.1 from Saxonica | http://www.saxonica.com/]
> file:/E:/FIZ-KA/workspace/e-fiz-wpi-demodularisation-swt/etc/f
> iles/xsd/CMSdoc.xsd
> file:/E:/FIZ-KA/workspace/e-fiz-wpi-demodularisation-swt/etc/f
> iles/xsd/CMSents.xsd
> file:/E:/FIZ-KA/workspace/e-fiz-wpi-demodularisation-swt/etc/f
> iles/xsd/
> CMStable_OASIS.xsd
> java.lang.IllegalArgumentException: URI is not absolute
> at java.io.File.<init>(Unknown Source)
> at net.sf.saxon.event.Emitter.makeWriter(Emitter.java:138)
> at
> net.sf.saxon.event.XMLEmitter.openDocument(XMLEmitter.java:119)
> at net.sf.saxon.event.XMLEmitter.characters(XMLEmitter.java:519)
> at
> net.sf.saxon.event.ProxyReceiver.characters(ProxyReceiver.java:180)
> at net.sf.saxon.event.XMLIndenter.indent(XMLIndenter.java:182)
> at
> net.sf.saxon.event.XMLIndenter.startElement(XMLIndenter.java:67)
> at
> net.sf.saxon.event.ProxyReceiver.startElement(ProxyReceiver.java:116)
> at
> net.sf.saxon.event.NamespaceReducer.startElement(NamespaceRedu
> cer.java:55)
> at net.sf.saxon.event.ComplexContentOutputter.
> startContent(ComplexContentOutputter.java:477)
> at net.sf.saxon.event.ComplexContentOutputter.
> startElement(ComplexContentOutputter.java:156)
> at
> net.sf.saxon.instruct.ElementCreator.processLeavingTail(Elemen
> tCreator.
> java:155)
> at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
> at net.sf.saxon.instruct.Template.expand(Template.java:95)
> at
> net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 290)
> at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
> processLeavingTail(ApplyTemplates.java:425)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 270)
> at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
> processLeavingTail(ApplyTemplates.java:425)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 270)
> at
> net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
> at
> net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyT
> emplates.
> java:133)
> at
> net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:283)
> at
> net.sf.saxon.instruct.Instruction.process(Instruction.java:90)
> at
> net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:222)
> at
> net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpressi
> on.java:328)
> at
> net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
> at net.sf.saxon.instruct.Template.expand(Template.java:95)
> at
> net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 290)
> at
> net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
> at
> net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyT
> emplates.
> java:133)
> at
> net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
> at net.sf.saxon.instruct.Template.expand(Template.java:95)
> at
> net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 290)
> at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
> processLeavingTail(ApplyTemplates.java:425)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 270)
> at
> net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
> at
> net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyT
> emplates.
> java:133)
> at
> net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:283)
> at
> net.sf.saxon.instruct.Instruction.process(Instruction.java:90)
> at
> net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:222)
> at
> net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpressi
> on.java:328)
> at
> net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
> at net.sf.saxon.instruct.Template.expand(Template.java:95)
> at
> net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 290)
> at
> net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
> at
> net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyT
> emplates.
> java:133)
> at
> net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
> at net.sf.saxon.instruct.Template.expand(Template.java:95)
> at
> net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 290)
> at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
> processLeavingTail(ApplyTemplates.java:425)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 270)
> at
> net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
> at
> net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyT
> emplates.
> java:133)
> at
> net.sf.saxon.instruct.Choose.processLeavingTail(Choose.java:283)
> at
> net.sf.saxon.instruct.Instruction.process(Instruction.java:90)
> at
> net.sf.saxon.instruct.ForEach.processLeavingTail(ForEach.java:222)
> at
> net.sf.saxon.expr.LetExpression.processLeavingTail(LetExpressi
> on.java:328)
> at
> net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
> at net.sf.saxon.instruct.Template.expand(Template.java:95)
> at
> net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 290)
> at
> net.sf.saxon.instruct.ApplyTemplates.apply(ApplyTemplates.java:169)
> at
> net.sf.saxon.instruct.ApplyTemplates.processLeavingTail(ApplyT
> emplates.
> java:133)
> at
> net.sf.saxon.instruct.Block.processLeavingTail(Block.java:330)
> at
> net.sf.saxon.instruct.Instruction.process(Instruction.java:90)
> at
> net.sf.saxon.instruct.ElementCreator.processLeavingTail(Elemen
> tCreator.
> java:162)
> at net.sf.saxon.instruct.Copy.processLeavingTail(Copy.java:123)
> at net.sf.saxon.instruct.Template.expand(Template.java:95)
> at
> net.sf.saxon.instruct.Template.processLeavingTail(Template.java:79)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 290)
> at net.sf.saxon.instruct.ApplyTemplates$ApplyTemplatesPackage.
> processLeavingTail(ApplyTemplates.java:425)
> at
> net.sf.saxon.instruct.ApplyTemplates.applyTemplates(ApplyTempl
> ates.java:
> 270)
> at
> net.sf.saxon.Controller.transformDocument(Controller.java:1406)
> at net.sf.saxon.Controller.transform(Controller.java:1234)
> at
> XSDFlattenerTransformation$4.handleEvent(XSDFlattenerTransform
> ation.java:
> 189)
> at
> org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843)
> at
> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080)
> at
> org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713)
> at
> XSDFlattenerTransformation.<init>(XSDFlattenerTransformation.java:100)
> at
> XSDFlattenerTransformation.main(XSDFlattenerTransformation.java:206)
> Exception in thread "main"
>
> Thank you again and again!!!
>
> matze
>
> On Wed, 14 Dec 2005 11:28:44 -0000, Michael Kay wrote
> > Sorry, there's not enough information here to see what's happening.
> >
> > Is there a more complete stack trace? I need to see where
> the java.io.File
> > constructor is being called from. Preferably I need enough
> > information to reproduce the problem.
> >
> > There's certainly no obvious reason why one of these URIs
> should be accepted
> > by the document() function and the others should fail. The only
> > thing that's different is that the failing URI contains an
> > underscore. But underscores are allowed in URIs and I've just
> > checked that Saxon accepts them OK. It's just possible, I suppose,
> > that you're using a Java VM that isn't happy with an
> underscore in a
> > URI. Perhaps you could do some experiments to see whether the
> > underscore is causing the problem.
> >
> > Saxon is sometimes stricter about enforcing the rules for
> URIs than other
> > products, for example I think Xalan accepts Windows filenames where
> > a URI is required, while Saxon does not. But I would
> normally expect
> > a proper Saxon run-time error, not an IllegalArgumentException.
> >
> > How was the transformation invoked? Is the base URI of the
> > stylesheet known?
> >
> > I don't think it's relevant to the problem, but this code:
> >
> > >   <xsl:variable name="path">
> > >     <xsl:value-of select="concat($stystem-path,@schemaLocation)"/>
> > >   </xsl:variable>
> >
> > causes a lot of complications. It would be much simpler if
> it were replaced
> > by
> >
> >  <xsl:variable name="path" select="concat($stystem-path,
> > @schemaLocation)"/>
> >
> > [is your variable really named $stystem-path?]
> >
> > The reason is that when you supply $path as an argument to the
> > document() function, and $path is a node rather than a string, then
> > the base URI of the node needs to be calculated. It's possible that
> > the failure is occurring during this process.
> >
> > Another comment here is that concat() is not a particularly
> good way
> > of resolving a relative URI against a base URI. It's better to use
> > the resolve-uri() function in XPath 2.0.
> >
> > Michael Kay
> > http://www.saxonica.com/
> >
> > > -----Original Message-----
> > > From: [hidden email]
> > > [mailto:[hidden email]] On Behalf Of
> > > Matthias Born
> > > Sent: 13 December 2005 18:05
> > > To: [hidden email]
> > > Subject: [saxon] java.lang.IllegalArgumentException: URI is
> > > not absolute
> > >
> > > Hello,
> > >
> > > i'm getting this exception while calling a xsl transformation
> > > from a little
> > > swt-client. With <xsl:message> i print out the uri for
> > > debugging. the funny
> > > thing is: XALAN works fine
> > >
> > > At first the SAXON output:
> > >
> > > [2.0 | SAXON 8.6.1 from Saxonica | http://www.saxonica.com/]
> > > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > > /etc/files/xsd/
> > > CMSdoc.xsd
> > > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > > /etc/files/xsd/
> > > CMSents.xsd
> > > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > > /etc/files/xsd/
> > > CMStable_OASIS.xsd
> > > java.lang.IllegalArgumentException: URI is not absolute
> > > at java.io.File.<init>(Unknown Source)
> > >
> > > And here's the XALAN output, shortened:
> > >
> > > [1 | Apache Software Foundation |
> > > http://xml.apache.org/xalan-j | Xalan Java
> > > 2.4.1]
> > > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > > /etc/files/xsd/
> > > CMSdoc.xsd
> > > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > > /etc/files/xsd/
> > > CMSents.xsd
> > > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > > /etc/files/xsd/
> > > CMStable_OASIS.xsd
> > > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > > /etc/files/xsd/
> > > CMStable_simple.xsd
> > > file:/E:/FIZ-KA/mborn/workspace/e-fiz-wpi-demodularisation-swt
> > > /etc/files/xsd/
> > > CMSdoc_id_grp.xsd
> > > ...
> > >
> > > You see: no problem with or after the CMStable_OASIS.xsd
> > >
> > > The part from the stylesheet, that causes this problem:
> > >
> > > <xsl:template match="*[local-name()='include']">
> > >   <xsl:param name="accessedLocations"/>
> > >   <xsl:param name="includedLocations"/>
> > >   <xsl:variable name="path">
> > >     <xsl:value-of select="concat($stystem-path,@schemaLocation)"/>
> > >   </xsl:variable>
> > >   <xsl:message><xsl:value-of select="$path"/></xsl:message>
> > >   <xsl:apply-templates
> > > select="document($path)/*[local-name()='schema']"
> > > mode="next">
> > >     <xsl:with-param name="accessedLocations"
> > > select="concat($accessedLocations,',',$includedLocations)"/>
> > >   </xsl:apply-templates>
> > > </xsl:template>
> > >
> > > Any ideas?!
> > >
> > > Thank you!
> > >
> > > matze
> > > --
> > > Orientation in Objects GmbH
> > > Weinheimerstr. 68
> > > D-68309 Mannheim
> > > http://www.oio.de
> > > Tel +49(0)621-71839-0
> > > Fax. +49(0)621-71839-50
> > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.net email is sponsored by: Splunk Inc. Do you grep
> > > through log files
> > > for problems?  Stop!  Download the new AJAX search engine
> that makes
> > > searching your log files as easy as surfing the  web.  
> > > DOWNLOAD SPLUNK!
> > > http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > > _______________________________________________
> > > saxon-help mailing list
> > > [hidden email]
> > > https://lists.sourceforge.net/lists/listinfo/saxon-help
> > >
> >
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep through
> > log files for problems?  Stop!  Download the new AJAX search engine
> > that makes searching your log files as easy as surfing the  web.
> >  DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> > _______________________________________________
> > saxon-help mailing list
> > [hidden email]
> > https://lists.sourceforge.net/lists/listinfo/saxon-help
>
>
> --
> Orientation in Objects GmbH
> Weinheimerstr. 68
> D-68309 Mannheim
> http://www.oio.de
> Tel +49(0)621-71839-0
> Fax. +49(0)621-71839-50
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc. Do you grep
> through log files
> for problems?  Stop!  Download the new AJAX search engine that makes
> searching your log files as easy as surfing the  web.  
> DOWNLOAD SPLUNK!
> http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
> _______________________________________________
> saxon-help mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help
>




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
saxon-help mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help