commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: [scxml] src and relative url
Date Tue, 01 Jun 2010 19:17:30 GMT
On Tue, Jun 1, 2010 at 2:26 PM, Fabrizio Morbini <> wrote:
> Hi, i'm using the src attribute to include external content (i haven't
> yet spent time in figuring our how to use xinclude).

OK, as long as you're aware its deprecated usage.

> I load the initial scxml file using a url like "file:C:/path/file.scxml".
> Inside file.scxml some node uses the src attribute set to (for
> example) src="include1.scxml#node34".
> When it gets parsed the urlResolver.resolvePath has as baseURL the
> complete "file:C:/path/file.scxml" and as ctxPath the string
> "include1.scxml", the merging results in an absolute url:
> "file:/include1.scxml" instead of the desired
> "file:C:/path/include1.scxml".
> is there a better alternative than modify the urlResolver (by removing
> the file.scxml part from the baseURL) to get the desired merged path
> when using the method resolvePath?

The portable way is to put the SCXML files as resources on application
classpath and use the getResource() method of the appropriate
ClassLoader to get the URL (this will also resolve src attributes


> thanks,
> fabrizio.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message