saving xml on relative files

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

saving xml on relative files

Ryan Puddephatt
Hi,
    I'm trying to save a file relative to an XPL file, but the relative paths on the file-serializer are relative to the Tomcat classpath and url-serializer doesn't accept relative files. Is there a processor I'm missing?

Thanks

Ryan
--

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: saving xml on relative files

Joseph Lawrence
Hi Ryan,
    Wont the 'file:/' protocol serves your requirement? Or I presume that you can use the @path of 'oxf:directory-scanner' output to obtain the absolute path in the file:/  context  from  the  oxf: relative  context. Wont it be possible to save your file relative to the xpl file this way? In  that  case too you have to provide the  oxf: relative path.

Thanks
Joseph Lawrence
Stabilix Solutions

Ryan Puddephatt <[hidden email]> wrote:
Hi,
    I'm trying to save a file relative to an XPL file, but the relative paths on the file-serializer are relative to the Tomcat classpath and url-serializer doesn't accept relative files. Is there a processor I'm missing?

Thanks

Ryan
--
Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.

--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: saving xml on relative files

Alessandro Vernet
Administrator
In reply to this post by Ryan Puddephatt
Hi Ryan,

I don't see any way to save a file relative to the current XPL file.
Maybe the file serializer could be modified to take into account the
base URI of its config when the path is relative.

Alex

On 4/9/07, Ryan Puddephatt <[hidden email]> wrote:

>
>  Hi,
>      I'm trying to save a file relative to an XPL file, but the relative
> paths on the file-serializer are relative to the Tomcat classpath and
> url-serializer doesn't accept relative files. Is there a processor I'm
> missing?
>
>  Thanks
>
>  Ryan
>
> --
>
>
>
>  Ryan Puddephatt
>  Software Engineer
>
>  Teleflex Group - IT UK
>  1 Michaelson Square
>  Livingston
>  West Lothian
>  Scotland
>  EH54 7DP
>
>  e> [hidden email]
>  t> +44(0)1506 407 110
>  f> +44(0)1506 407 108
>  w> www.teleflex.com
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: saving xml on relative files

Ryan Puddephatt
Alex,
    This would be nice, I found a work around, by using the directory-scanner to find the relative directory and then using the file-serializer to save the file. I guess this process could be done in the processor itself when relative paths are provided?

Thanks

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com



Alessandro Vernet wrote:
Hi Ryan,

I don't see any way to save a file relative to the current XPL file.
Maybe the file serializer could be modified to take into account the
base URI of its config when the path is relative.

Alex

On 4/9/07, Ryan Puddephatt [hidden email] wrote:

 Hi,
     I'm trying to save a file relative to an XPL file, but the relative
paths on the file-serializer are relative to the Tomcat classpath and
url-serializer doesn't accept relative files. Is there a processor I'm
missing?

 Thanks

 Ryan

--



 Ryan Puddephatt
 Software Engineer

 Teleflex Group - IT UK
 1 Michaelson Square
 Livingston
 West Lothian
 Scotland
 EH54 7DP

 e> [hidden email]
 t> +44(0)1506 407 110
 f> +44(0)1506 407 108
 w> www.teleflex.com


--
You receive this message as a subscriber of the [hidden email]
mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws





-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: saving xml on relative files

Alessandro Vernet
Administrator
Hi Ryan,

Yes, I guess. More precisely, this is what I had in mind: assuming the
path for the file is relative, the File serializer could get the URI
that corresponds to the "config" input, and consider that the relative
path is relative to that URI. If the "config" in embedded in XPL, than
the URI would be a file: URI that points to the XPL file. You can the
the URI for the config using the Locator API (see below). You can give
this a shot if you think that this makes sense and feel like
implementing it.

http://www.saxproject.org/apidoc/org/xml/sax/Locator.html#getSystemId()

Alex

On 4/9/07, Ryan Puddephatt <[hidden email]> wrote:

>      This would be nice, I found a work around, by using the
> directory-scanner to find the relative directory and then using the
> file-serializer to save the file. I guess this process could be done in the
> processor itself when relative paths are provided?
>
>  Thanks
>
>  Ryan
>
>
>
>
>  Ryan Puddephatt
>  Software Engineer
>
>  Teleflex Group - IT UK
>  1 Michaelson Square
>  Livingston
>  West Lothian
>  Scotland
>  EH54 7DP
>
>  e> [hidden email]
>  t> +44(0)1506 407 110
>  f> +44(0)1506 407 108
>  w> www.teleflex.com
>
>
>  Alessandro Vernet wrote:
> Hi Ryan,
>
>  I don't see any way to save a file relative to the current XPL file.
>  Maybe the file serializer could be modified to take into account the
>  base URI of its config when the path is relative.
>
>  Alex
>
>  On 4/9/07, Ryan Puddephatt <[hidden email]> wrote:
>
>
>   Hi,
>       I'm trying to save a file relative to an XPL file, but the relative
>  paths on the file-serializer are relative to the Tomcat classpath and
>  url-serializer doesn't accept relative files. Is there a processor I'm
>  missing?
>
>   Thanks
>
>   Ryan
>
>  --
>
>
>
>   Ryan Puddephatt
>   Software Engineer
>
>   Teleflex Group - IT UK
>   1 Michaelson Square
>   Livingston
>   West Lothian
>   Scotland
>   EH54 7DP
>
>   e> [hidden email]
>   t> +44(0)1506 407 110
>   f> +44(0)1506 407 108
>   w> www.teleflex.com
>
>
>  --
>  You receive this message as a subscriber of the [hidden email]
>  mailing list.
>  To unsubscribe: mailto:[hidden email]
>  For general help: mailto:[hidden email]?subject=help
>  ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
>
>  ________________________________
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws