Uploading files

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

Uploading files

Peymirat Damien
Hi all,


   I'm trying to build a XML Schema database. At the moment, I can
upload on my eXist database a XML file with a xforms:upload. However, I
have some XML Schema which have an import element like that : <xs:import
namespace="http://www.example.com/SYS/base/2.0/"
schemaLocation="SYS/base/2.0/base.xsd"/>. So I would like to know how to
put this file (base.xsd) in my eXist database without asking the user to
upload it ?? In fact I just want that the user uploads his schema and
automatically the XML schema included in the import element is saved in
my eXist database.


Thank you for your suggestions

Best regards

Damien.



--
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: Uploading files

Erik Bruchez
Administrator
Roughly, one way of doing it:

o Upload your main schema to a service implemented with XPL
o With p:for-each, iterate over the schema imports
   o For each import, fetch the imported schema with the URL generator
   o Maybe modify the schemaLocation attribute in the main schema to
     point to the future location in eXist
   o Insert the imported schema into eXist
o Insert the main schema into eXist

-Erik

Peymirat Damien wrote:

> Hi all,
>
>
>    I'm trying to build a XML Schema database. At the moment, I can
> upload on my eXist database a XML file with a xforms:upload. However, I
> have some XML Schema which have an import element like that : <xs:import
> namespace="http://www.example.com/SYS/base/2.0/"
> schemaLocation="SYS/base/2.0/base.xsd"/>. So I would like to know how to
> put this file (base.xsd) in my eXist database without asking the user to
> upload it ?? In fact I just want that the user uploads his schema and
> automatically the XML schema included in the import element is saved in
> my eXist database.
>
>
> Thank you for your suggestions
>
> Best regards
>
> Damien.
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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 - XForms Everywhere:
http://www.orbeon.com/blog/



--
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: Uploading files

damien.peymirat
Thank you Erik for your answer,

   However, the url schemaLocation="SYS/base/2.0/base.xsd" is not
complete. So I can't see how to use the url generator ?? I think I have
to build with xslt the complete url before using the url generator but
how to have the url of the uploading file ??

Thanks again

Damien.


> Roughly, one way of doing it:
>
> o Upload your main schema to a service implemented with XPL
> o With p:for-each, iterate over the schema imports
>    o For each import, fetch the imported schema with the URL generator
>    o Maybe modify the schemaLocation attribute in the main schema to
>      point to the future location in eXist
>    o Insert the imported schema into eXist
> o Insert the main schema into eXist
>
> -Erik
>
> Peymirat Damien wrote:
>> Hi all,
>>
>>
>>    I'm trying to build a XML Schema database. At the moment, I can
>> upload on my eXist database a XML file with a xforms:upload. However, I
>> have some XML Schema which have an import element like that : <xs:import
>> namespace="http://www.example.com/SYS/base/2.0/"
>> schemaLocation="SYS/base/2.0/base.xsd"/>. So I would like to know how to
>> put this file (base.xsd) in my eXist database without asking the user to
>> upload it ?? In fact I just want that the user uploads his schema and
>> automatically the XML schema included in the import element is saved in
>> my eXist database.
>>
>>
>> Thank you for your suggestions
>>
>> Best regards
>>
>> Damien.
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> 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 - XForms Everywhere:
> http://www.orbeon.com/blog/
>
>




--
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: Uploading files

Erik Bruchez
Administrator
Absolutely correct.

-Erik

Peymirat Damien wrote:

> Thank you Erik for your answer,
>
>    However, the url schemaLocation="SYS/base/2.0/base.xsd" is not
> complete. So I can't see how to use the url generator ?? I think I have
> to build with xslt the complete url before using the url generator but
> how to have the url of the uploading file ??
>
> Thanks again
>
> Damien.
>
>
>> Roughly, one way of doing it:
>>
>> o Upload your main schema to a service implemented with XPL
>> o With p:for-each, iterate over the schema imports
>>    o For each import, fetch the imported schema with the URL generator
>>    o Maybe modify the schemaLocation attribute in the main schema to
>>      point to the future location in eXist
>>    o Insert the imported schema into eXist
>> o Insert the main schema into eXist
>>
>> -Erik
>>
>> Peymirat Damien wrote:
>>> Hi all,
>>>
>>>
>>>    I'm trying to build a XML Schema database. At the moment, I can
>>> upload on my eXist database a XML file with a xforms:upload. However, I
>>> have some XML Schema which have an import element like that : <xs:import
>>> namespace="http://www.example.com/SYS/base/2.0/"
>>> schemaLocation="SYS/base/2.0/base.xsd"/>. So I would like to know how to
>>> put this file (base.xsd) in my eXist database without asking the user to
>>> upload it ?? In fact I just want that the user uploads his schema and
>>> automatically the XML schema included in the import element is saved in
>>> my eXist database.
>>>
>>>
>>> Thank you for your suggestions
>>>
>>> Best regards
>>>
>>> Damien.
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> --
>>> 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 - XForms Everywhere:
>> http://www.orbeon.com/blog/
>>
>>
>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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 - XForms Everywhere:
http://www.orbeon.com/blog/



--
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: Uploading files

damien.peymirat
Erik,

I have a last question :

How can I get the full url of my uploading file ?? Because to upload the
file include in the schemaLocation, I need to have the path before
SYS/base/2.0/base.xsd .

Thank you

Damien.


> Absolutely correct.
>
> -Erik
>
> Peymirat Damien wrote:
>> Thank you Erik for your answer,
>>
>>    However, the url schemaLocation="SYS/base/2.0/base.xsd" is not
>> complete. So I can't see how to use the url generator ?? I think I have
>> to build with xslt the complete url before using the url generator but
>> how to have the url of the uploading file ??
>>
>> Thanks again
>>
>> Damien.
>>
>>
>>> Roughly, one way of doing it:
>>>
>>> o Upload your main schema to a service implemented with XPL
>>> o With p:for-each, iterate over the schema imports
>>>    o For each import, fetch the imported schema with the URL generator
>>>    o Maybe modify the schemaLocation attribute in the main schema to
>>>      point to the future location in eXist
>>>    o Insert the imported schema into eXist
>>> o Insert the main schema into eXist
>>>
>>> -Erik
>>>
>>> Peymirat Damien wrote:
>>>> Hi all,
>>>>
>>>>
>>>>    I'm trying to build a XML Schema database. At the moment, I can
>>>> upload on my eXist database a XML file with a xforms:upload. However,
>>>> I
>>>> have some XML Schema which have an import element like that :
>>>> <xs:import
>>>> namespace="http://www.example.com/SYS/base/2.0/"
>>>> schemaLocation="SYS/base/2.0/base.xsd"/>. So I would like to know how
>>>> to
>>>> put this file (base.xsd) in my eXist database without asking the user
>>>> to
>>>> upload it ?? In fact I just want that the user uploads his schema and
>>>> automatically the XML schema included in the import element is saved
>>>> in
>>>> my eXist database.
>>>>
>>>>
>>>> Thank you for your suggestions
>>>>
>>>> Best regards
>>>>
>>>> Damien.
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> --
>>>> 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 - XForms Everywhere:
>>> http://www.orbeon.com/blog/
>>>
>>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> 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 - XForms Everywhere:
> http://www.orbeon.com/blog/
>
>




--
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: Uploading files

Erik Bruchez
Administrator
Damien,

> How can I get the full url of my uploading file ?? Because to upload the
> file include in the schemaLocation, I need to have the path before
> SYS/base/2.0/base.xsd .

I don't quite understand the question. I assume the file is initially on
a client's computer, where its "URL" doesn't matter. Then you will
upload it into a database, and it is up to you to figure out through
which URL that schema will be accessible, for example through the eXist
REST API, or through your own code that serves the schema to whoever
uses it.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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 : Uploading files

Peymirat Damien
In reply to this post by Peymirat Damien
Hi Erik,

   All the files (main.xsd and base.xsd) are on a client's computer. So I upload the main.xsd like this :

View.xhtml:

<xforms:upload ref="file" xhtml:size="30">
        <xforms:label></xforms:label>
        <xforms:filename ref="@filename"/>
        <xforms:mediatype ref="@mediatype"/>
        <xxforms:size ref="@size"/>
        <xforms:hint>Choisissez le Schema XML à importer</xforms:hint>
</xforms:upload>

Model.xpl
...
<p:processor name="oxf:xslt">
        <p:input name="data" href="#instance"/>
        <p:input name="config">
                <config xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
                        <url>
                                <xsl:value-of select="/*/file"/>
                        </url>
                        <content-type>application/xml</content-type>
                        <force-content-type>true</force-content-type>
                        <cache-control>
                                <use-local-cache>false</use-local-cache>
                        </cache-control>
                </config>
        </p:input>
        <p:output name="data" id="url-config"/>
</p:processor>
<p:processor name="oxf:url-generator">
        <p:input name="config" href="#url-config"/>
        <p:output name="data" ref="data" id="output-file" debug="true"/>
</p:processor>
...


My problem is that I can't see how to upload the import element of main.xsd without asking the user. When I have uploaded the main.xsd, the only informations I have is <xs:import namespace="http://www.example.com/SYS/base/2.0/  schemaLocation="SYS/base/2.0/base.xsd"/> . And I don't know how to upload the file base.xsd (which is on client's computer) to the server ???


Thanks


Damien.




-----Message d'origine-----
De : Erik Bruchez [mailto:[hidden email]] De la part de Erik Bruchez
Envoyé : samedi 19 août 2006 03:24
À : [hidden email]
Objet : Re: [ops-users] Uploading files


Damien,

> How can I get the full url of my uploading file ?? Because to upload
> the file include in the schemaLocation, I need to have the path before
> SYS/base/2.0/base.xsd .

I don't quite understand the question. I assume the file is initially on
a client's computer, where its "URL" doesn't matter. Then you will
upload it into a database, and it is up to you to figure out through
which URL that schema will be accessible, for example through the eXist
REST API, or through your own code that serves the schema to whoever
uses it.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/

> Absolutely correct.
>
> -Erik
>
> Peymirat Damien wrote:
>> Thank you Erik for your answer,
>>
>>    However, the url schemaLocation="SYS/base/2.0/base.xsd" is not
>> complete. So I can't see how to use the url generator ?? I think I
>> have to build with xslt the complete url before using the url
>> generator but how to have the url of the uploading file ??
>>
>> Thanks again
>>
>> Damien.
>>
>>
>>> Roughly, one way of doing it:
>>>
>>> o Upload your main schema to a service implemented with XPL o With
>>> p:for-each, iterate over the schema imports
>>>    o For each import, fetch the imported schema with the URL generator
>>>    o Maybe modify the schemaLocation attribute in the main schema to
>>>      point to the future location in eXist
>>>    o Insert the imported schema into eXist
>>> o Insert the main schema into eXist
>>>
>>> -Erik
>>>
>>> Peymirat Damien wrote:
>>>> Hi all,
>>>>
>>>>
>>>>    I'm trying to build a XML Schema database. At the moment, I can
>>>> upload on my eXist database a XML file with a xforms:upload.
>>>> However, I have some XML Schema which have an import element like
>>>> that : <xs:import
>>>> namespace="http://www.example.com/SYS/base/2.0/"
>>>> schemaLocation="SYS/base/2.0/base.xsd"/>. So I would like to know how
>>>> to
>>>> put this file (base.xsd) in my eXist database without asking the user
>>>> to
>>>> upload it ?? In fact I just want that the user uploads his schema and
>>>> automatically the XML schema included in the import element is saved
>>>> in
>>>> my eXist database.
>>>>
>>>>
>>>> Thank you for your suggestions
>>>>
>>>> Best regards
>>>>
>>>> Damien.
>>>>
>>>>
>>>>
>>>> -------------------------------------------------------------------
>>>> -----
>>>>
>>>>
>>>> --
>>>> 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 - XForms Everywhere:
>>> http://www.orbeon.com/blog/
>>>
>>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> ---
>>
>>
>> --
>> 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 - XForms Everywhere:
> http://www.orbeon.com/blog/
>
>


--
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: RE : Uploading files

Erik Bruchez
Administrator
Damien,

 > All the files (main.xsd and base.xsd) are on a client's computer. So
 > I upload the main.xsd like this :

[...]

 > My problem is that I can't see how to upload the import element of
 > main.xsd without asking the user. When I have uploaded the main.xsd,
 > the only informations I have is <xs:import
 > namespace="http://www.example.com/SYS/base/2.0/
 > schemaLocation="SYS/base/2.0/base.xsd"/> . And I don't know how to
 > upload the file base.xsd (which is on client's computer) to the
 > server ???

There is no way to do that as far as I know. A web browser allows you
to upload files that are explicitly selected by the user, and for
obvious security reasons web applications do not have access to the
client's hard drive.

I think you will have to tell your users to select for upload not only
the main schema, but all the dependent schemas as well.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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: RE : Uploading files

damien.peymirat
Thank you Erik,

   Is there a solution to upload a folder to the server ?? Or a zip file ??

Thanks again

Damien.


> Damien,
>
>  > All the files (main.xsd and base.xsd) are on a client's computer. So
>  > I upload the main.xsd like this :
>
> [...]
>
>  > My problem is that I can't see how to upload the import element of
>  > main.xsd without asking the user. When I have uploaded the main.xsd,
>  > the only informations I have is <xs:import
>  > namespace="http://www.example.com/SYS/base/2.0/
>  > schemaLocation="SYS/base/2.0/base.xsd"/> . And I don't know how to
>  > upload the file base.xsd (which is on client's computer) to the
>  > server ???
>
> There is no way to do that as far as I know. A web browser allows you
> to upload files that are explicitly selected by the user, and for
> obvious security reasons web applications do not have access to the
> client's hard drive.
>
> I think you will have to tell your users to select for upload not only
> the main schema, but all the dependent schemas as well.
>
> -Erik
>
> --
> Orbeon - XForms Everywhere:
> http://www.orbeon.com/blog/
>
>




--
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: RE : Uploading files

Erik Bruchez
Administrator
You can upload a zip file, but the user will have to create the zip
first, which may or may not be convenient in your case.

Upload from web browsers is just very limited. This is in part why you
see all those photo sharing web sites coming up with their own little
upload tools.

-Erik

Peymirat Damien wrote:

> Thank you Erik,
>
>    Is there a solution to upload a folder to the server ?? Or a zip file ??
>
> Thanks again
>
> Damien.
>
>
>> Damien,
>>
>>  > All the files (main.xsd and base.xsd) are on a client's computer. So
>>  > I upload the main.xsd like this :
>>
>> [...]
>>
>>  > My problem is that I can't see how to upload the import element of
>>  > main.xsd without asking the user. When I have uploaded the main.xsd,
>>  > the only informations I have is <xs:import
>>  > namespace="http://www.example.com/SYS/base/2.0/
>>  > schemaLocation="SYS/base/2.0/base.xsd"/> . And I don't know how to
>>  > upload the file base.xsd (which is on client's computer) to the
>>  > server ???
>>
>> There is no way to do that as far as I know. A web browser allows you
>> to upload files that are explicitly selected by the user, and for
>> obvious security reasons web applications do not have access to the
>> client's hard drive.
>>
>> I think you will have to tell your users to select for upload not only
>> the main schema, but all the dependent schemas as well.
>>
>> -Erik
>>
>> --
>> Orbeon - XForms Everywhere:
>> http://www.orbeon.com/blog/
>>
>>
>
>
>
>
> ------------------------------------------------------------------------
>
>
> --
> 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 - XForms Everywhere:
http://www.orbeon.com/blog/



--
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: RE : Uploading files

damien.peymirat
Ok for the zip file, but Can I use this zip file with Orbeon (to have the
main schema and all the dependant schemas) ??


Thank you for your help

Best regards

Damien.


> You can upload a zip file, but the user will have to create the zip
> first, which may or may not be convenient in your case.
>
> Upload from web browsers is just very limited. This is in part why you
> see all those photo sharing web sites coming up with their own little
> upload tools.
>
> -Erik
>
> Peymirat Damien wrote:
>> Thank you Erik,
>>
>>    Is there a solution to upload a folder to the server ?? Or a zip file
>> ??
>>
>> Thanks again
>>
>> Damien.
>>
>>
>>> Damien,
>>>
>>>  > All the files (main.xsd and base.xsd) are on a client's computer. So
>>>  > I upload the main.xsd like this :
>>>
>>> [...]
>>>
>>>  > My problem is that I can't see how to upload the import element of
>>>  > main.xsd without asking the user. When I have uploaded the main.xsd,
>>>  > the only informations I have is <xs:import
>>>  > namespace="http://www.example.com/SYS/base/2.0/
>>>  > schemaLocation="SYS/base/2.0/base.xsd"/> . And I don't know how to
>>>  > upload the file base.xsd (which is on client's computer) to the
>>>  > server ???
>>>
>>> There is no way to do that as far as I know. A web browser allows you
>>> to upload files that are explicitly selected by the user, and for
>>> obvious security reasons web applications do not have access to the
>>> client's hard drive.
>>>
>>> I think you will have to tell your users to select for upload not only
>>> the main schema, but all the dependent schemas as well.
>>>
>>> -Erik
>>>
>>> --
>>> Orbeon - XForms Everywhere:
>>> http://www.orbeon.com/blog/
>>>
>>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> --
>> 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 - XForms Everywhere:
> http://www.orbeon.com/blog/
>
>




--
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: RE : Uploading files

Erik Bruchez
Administrator
Damien,

There is unfortunately no built-in zip processor, although some people
have worked on such a beast. You would probably have to write your own
processor to perform the extraction.

-Erik

Peymirat Damien wrote:

> Ok for the zip file, but Can I use this zip file with Orbeon (to have the
> main schema and all the dependant schemas) ??
>
>
> Thank you for your help
>
> Best regards
>
> Damien.
>
>
>> You can upload a zip file, but the user will have to create the zip
>> first, which may or may not be convenient in your case.
>>
>> Upload from web browsers is just very limited. This is in part why you
>> see all those photo sharing web sites coming up with their own little
>> upload tools.
>>
>> -Erik
>>
>> Peymirat Damien wrote:
>>> Thank you Erik,
>>>
>>>    Is there a solution to upload a folder to the server ?? Or a zip file
>>> ??
>>>
>>> Thanks again
>>>
>>> Damien.
>>>
>>>
>>>> Damien,
>>>>
>>>>  > All the files (main.xsd and base.xsd) are on a client's computer. So
>>>>  > I upload the main.xsd like this :
>>>>
>>>> [...]
>>>>
>>>>  > My problem is that I can't see how to upload the import element of
>>>>  > main.xsd without asking the user. When I have uploaded the main.xsd,
>>>>  > the only informations I have is <xs:import
>>>>  > namespace="http://www.example.com/SYS/base/2.0/
>>>>  > schemaLocation="SYS/base/2.0/base.xsd"/> . And I don't know how to
>>>>  > upload the file base.xsd (which is on client's computer) to the
>>>>  > server ???
>>>>
>>>> There is no way to do that as far as I know. A web browser allows you
>>>> to upload files that are explicitly selected by the user, and for
>>>> obvious security reasons web applications do not have access to the
>>>> client's hard drive.
>>>>
>>>> I think you will have to tell your users to select for upload not only
>>>> the main schema, but all the dependent schemas as well.
>>>>
>>>> -Erik
>>>>
>>>> --
>>>> Orbeon - XForms Everywhere:
>>>> http://www.orbeon.com/blog/
>>>>
>>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> --
>>> 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 - XForms Everywhere:
>> http://www.orbeon.com/blog/
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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: RE : Uploading files

damien.peymirat
Erik

Is there some tutorials, examples to write processor ??


> Damien,
>
> There is unfortunately no built-in zip processor, although some people
> have worked on such a beast. You would probably have to write your own
> processor to perform the extraction.
>
> -Erik
>
> Peymirat Damien wrote:
>> Ok for the zip file, but Can I use this zip file with Orbeon (to have
>> the
>> main schema and all the dependant schemas) ??
>>
>>
>> Thank you for your help
>>
>> Best regards
>>
>> Damien.
>>
>>
>>> You can upload a zip file, but the user will have to create the zip
>>> first, which may or may not be convenient in your case.
>>>
>>> Upload from web browsers is just very limited. This is in part why you
>>> see all those photo sharing web sites coming up with their own little
>>> upload tools.
>>>
>>> -Erik
>>>
>>> Peymirat Damien wrote:
>>>> Thank you Erik,
>>>>
>>>>    Is there a solution to upload a folder to the server ?? Or a zip
>>>> file
>>>> ??
>>>>
>>>> Thanks again
>>>>
>>>> Damien.
>>>>
>>>>
>>>>> Damien,
>>>>>
>>>>>  > All the files (main.xsd and base.xsd) are on a client's computer.
>>>>> So
>>>>>  > I upload the main.xsd like this :
>>>>>
>>>>> [...]
>>>>>
>>>>>  > My problem is that I can't see how to upload the import element of
>>>>>  > main.xsd without asking the user. When I have uploaded the
>>>>> main.xsd,
>>>>>  > the only informations I have is <xs:import
>>>>>  > namespace="http://www.example.com/SYS/base/2.0/
>>>>>  > schemaLocation="SYS/base/2.0/base.xsd"/> . And I don't know how to
>>>>>  > upload the file base.xsd (which is on client's computer) to the
>>>>>  > server ???
>>>>>
>>>>> There is no way to do that as far as I know. A web browser allows you
>>>>> to upload files that are explicitly selected by the user, and for
>>>>> obvious security reasons web applications do not have access to the
>>>>> client's hard drive.
>>>>>
>>>>> I think you will have to tell your users to select for upload not
>>>>> only
>>>>> the main schema, but all the dependent schemas as well.
>>>>>
>>>>> -Erik
>>>>>
>>>>> --
>>>>> Orbeon - XForms Everywhere:
>>>>> http://www.orbeon.com/blog/
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> --
>>>> 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 - XForms Everywhere:
>>> http://www.orbeon.com/blog/
>
> --
> Orbeon - XForms Everywhere:
> http://www.orbeon.com/blog/
>
>




--
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: Uploading files

Hank Ratzesberger
In reply to this post by Peymirat Damien
There is an execute-processor, by which you may be able to
call a command line zip/unzip.  Then there are issues
of local workspace and cleanup of local files.  I'm not
sure if it becomes more work than a custom processor.

No documentation yet.  Attached is sample pipleline.

Erik wrote this as a, how can I say this without an
English colloquial, sine qua non, integration step
so it is just enough, no frills.

Regards
Hank
UCSB


----- Original Message -----
From: "Peymirat Damien" <[hidden email]>
To: <[hidden email]>
Sent: Monday, August 21, 2006 12:20 PM
Subject: Re: RE : [ops-users] Uploading files


> Ok for the zip file, but Can I use this zip file with Orbeon (to have the
> main schema and all the dependant schemas) ??
>
>
> Thank you for your help
>
> Best regards
>
> Damien.
>
>
>> You can upload a zip file, but the user will have to create the zip
>> first, which may or may not be convenient in your case.
>>
>> Upload from web browsers is just very limited. This is in part why you
>> see all those photo sharing web sites coming up with their own little
>> upload tools.
>>
>> -Erik
>>
>> Peymirat Damien wrote:
>>> Thank you Erik,
>>>
>>>    Is there a solution to upload a folder to the server ?? Or a zip file
>>> ??
>>>
>>> Thanks again
>>>
>>> Damien.
>>>
>>>
>>>> Damien,
>>>>
>>>>  > All the files (main.xsd and base.xsd) are on a client's computer. So
>>>>  > I upload the main.xsd like this :
>>>>
>>>> [...]
>>>>
>>>>  > My problem is that I can't see how to upload the import element of
>>>>  > main.xsd without asking the user. When I have uploaded the main.xsd,
>>>>  > the only informations I have is <xs:import
>>>>  > namespace="http://www.example.com/SYS/base/2.0/
>>>>  > schemaLocation="SYS/base/2.0/base.xsd"/> . And I don't know how to
>>>>  > upload the file base.xsd (which is on client's computer) to the
>>>>  > server ???
>>>>
>>>> There is no way to do that as far as I know. A web browser allows you
>>>> to upload files that are explicitly selected by the user, and for
>>>> obvious security reasons web applications do not have access to the
>>>> client's hard drive.
>>>>
>>>> I think you will have to tell your users to select for upload not only
>>>> the main schema, but all the dependent schemas as well.
>>>>
>>>> -Erik
>>>>
>>>> --
>>>> Orbeon - XForms Everywhere:
>>>> http://www.orbeon.com/blog/
>>>>
>>>>
>>>
>>>


--
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

execute-command.xpl (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: RE : Uploading files

Erik Bruchez
Administrator
In reply to this post by damien.peymirat
Damien,

 > Is there some tutorials, examples to write processor ??

I recommend first that you look at this documentation:

   Java Processor
   http://www.orbeon.com/ops/doc/processors-java

   Processor API
   http://www.orbeon.com/ops/doc/reference-processor-api

This documentation illustrates simple examples.

A nice example of more complex processor is the "Execute" processor
that you can find in the OPS source as:

   org.orbeon.oxf.processor.execute.ExecuteProcessor

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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: Uploading files

Florent Georges
In reply to this post by Hank Ratzesberger
Hank Ratzesberger wrote:

> There is an execute-processor

  I just saw the following exerpt in the attached file:

    <p:processor name="oxf:execute-processor">
      <p:input name="config">
        <exec executable="c:/cygwin/bin/ls.exe" dir="c:/TEMP">
          <arg line="-als"/>
        </exec>
      </p:input>
      <p:output name="stdout" id="stdout"/>
      <p:output name="stderr" id="stderr"/>
      <p:output name="result" id="result"/>
    </p:processor>

and I wonder, since stdout and stderr are already "redirected", where
the "result" is computed from?

  Regards,

--drkm





















       
 p4.vert.ukl.yahoo.com uncompressed/chunked Wed Aug 23 11:13:41 GMT 2006
       
               
___________________________________________________________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
http://fr.answers.yahoo.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: Uploading files

Erik Bruchez
Administrator
Florent,

>> There is an execute-processor
>
>   I just saw the following exerpt in the attached file:
>
>     <p:processor name="oxf:execute-processor">
>       <p:input name="config">
>         <exec executable="c:/cygwin/bin/ls.exe" dir="c:/TEMP">
>           <arg line="-als"/>
>         </exec>
>       </p:input>
>       <p:output name="stdout" id="stdout"/>
>       <p:output name="stderr" id="stderr"/>
>       <p:output name="result" id="result"/>
>     </p:processor>
>
> and I wonder, since stdout and stderr are already "redirected", where
> the "result" is computed from?
I fear that I don't understand the question at all ;-)

Each process (in the Unix world, but Cygwin here emulates that) has
stdout and stderr outputs. Here you simply obtain the text of these
outputs embedded in an XML document.

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
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: Uploading files

Hank Ratzesberger
In reply to this post by Florent Georges
Apologies that the post lacked some documentation that
I had.

The output element named result is the program return code,
as typically programs will return 0 for success and some
other value to indicate an error.

Please note that the size of stderr and stdout are not
limited and an errant program could easily consume all
your heap.

The Execute Processor is simply a way run a command
line program.

Regards,
Hank
UCSB



----- Original Message -----
From: "Florent Georges" <[hidden email]>
To: <[hidden email]>
Sent: Wednesday, August 23, 2006 2:16 PM
Subject: Re: [ops-users] Uploading files


> Hank Ratzesberger wrote:
>
>> There is an execute-processor
>
>  I just saw the following exerpt in the attached file:
>
>    <p:processor name="oxf:execute-processor">
>      <p:input name="config">
>        <exec executable="c:/cygwin/bin/ls.exe" dir="c:/TEMP">
>          <arg line="-als"/>
>        </exec>
>      </p:input>
>      <p:output name="stdout" id="stdout"/>
>      <p:output name="stderr" id="stderr"/>
>      <p:output name="result" id="result"/>
>    </p:processor>
>
> and I wonder, since stdout and stderr are already "redirected", where
> the "result" is computed from?
>
>  Regards,
>
> --drkm
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> p4.vert.ukl.yahoo.com uncompressed/chunked Wed Aug 23 11:13:41 GMT 2006
>
>
> ___________________________________________________________________________
> Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
> Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
> http://fr.answers.yahoo.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
Reply | Threaded
Open this post in threaded view
|

Re: Uploading files

Florent Georges
In reply to this post by Erik Bruchez
Erik Bruchez wrote:

> >     <p:processor name="oxf:execute-processor">
> >       <p:input name="config">
> >         <exec executable="c:/cygwin/bin/ls.exe" dir="c:/TEMP">
> >           <arg line="-als"/>
> >         </exec>
> >       </p:input>
> >       <p:output name="stdout" id="stdout"/>
> >       <p:output name="stderr" id="stderr"/>
> >       <p:output name="result" id="result"/>
> >     </p:processor>

> > and I wonder, since stdout and stderr are already "redirected",
> > where the "result" is computed from?

> I fear that I don't understand the question at all ;-)

  Sorry, I'll try to reformulate:

  The terms "stdout" and "stderr" come from the Unix world.  Each
process has one standard output and one error output.  ls(1) can have
only two side-effects: writing to stdout and/or stderr.

  But the above processor has three outputs: "stdout" (I guess it is
the standard output of the process), "stderr" (I guess...) and an other
one, "result".  What is the value of this output, if it is not taken
from neither stdout nor stderr?

  I hope that is a little bit clearer.  Sorry for my too approximate
English :-(

  Regards,

--drkm

























       
 p4.vert.ukl.yahoo.com uncompressed/chunked Wed Aug 23 11:13:39 GMT 2006
       
               
___________________________________________________________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
http://fr.answers.yahoo.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: Uploading files

Florent Georges
In reply to this post by Hank Ratzesberger
Hank Ratzesberger wrote:

> The output element named result is the program return code,
> as typically programs will return 0 for success and some
> other value to indicate an error.

  Oh yes, I didn't think about the return code (that was obvious,
however).  Thanks.

  Regards,

--drkm






















       
 p5.vert.ukl.yahoo.com uncompressed/chunked Wed Aug 23 23:13:39 GMT 2006
       
               
___________________________________________________________________________
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences.
http://fr.answers.yahoo.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
12