Hi all,
I would like to know if it is possible to do recurrence with XPL language ?? Here is what I would like to do : My project consist in uploading XML Schema in an eXist database with Orbeon. However, it is possible that some XML Schema have an import element like this : <xs:import namespace="http://www.example.com/test/" schemaLocation="base.xsd"/> So when I want to upload a XML Schema I have to upload the files including by the import element too. For example : function upload(file){ save(file) for each import element upload(file of import element) } Thanks you creax. -- 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 |
[hidden email] wrote:
Hi > function upload(file){ > > save(file) > for each import element > upload(file of import element) > > } How do you actually do the upload? If you use XQuery, for example, the recurrence comes for free. Regards, --drkm ___________________________________________________________________________ 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 |
The upload is done by an xmldb:insert
How using recurrence with XQuery ?? Do you have an example ? Thank you very much for your answers creax Le 09/08/06,
Florent Georges <[hidden email]> a écrit : [hidden email] wrote:Hi all, -- 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 |
Administrator
|
In reply to this post by creaxys
Hi Damien,
You can have recursive code in XPL as a pipeline can call itself. The XPL below is an example of recursive pipeline: <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <p:param type="input" name="data"/> <p:param type="output" name="data"/> <p:choose href="#data"> <p:when test="/count = 0"> <p:processor uri="oxf/processor/identity"> <p:input name="data" href="#data"/> <p:output name="data" ref="data"/> </p:processor> </p:when> <p:otherwise> <p:processor uri="oxf/processor/xslt"> <p:input name="data" href="#data"/> <p:output name="data" id="new-value"/> <p:input name="config"> <xsl:stylesheet version="2.0"> <xsl:template match="/"> <count><xsl:value-of select="/count - 1"/></count> </xsl:template> </xsl:stylesheet> </p:input> </p:processor> <p:processor uri="oxf/processor/pipeline"> <p:input name="config" href="oxf:/ops/unit-tests/recurse.xml"/> <p:input name="data" href="#new-value"/> <p:output name="data" ref="data"/> </p:processor> </p:otherwise> </p:choose> </p:config> Alex On 8/9/06, [hidden email] <[hidden email]> wrote: > Hi all, > > > I would like to know if it is possible to do recurrence with XPL language ?? > > Here is what I would like to do : > > My project consist in uploading XML Schema in an eXist database with Orbeon. However, it is possible that some XML Schema have an import element like this : <xs:import namespace="http://www.example.com/test/" schemaLocation="base.xsd"/> > > So when I want to upload a XML Schema I have to upload the files including by the import element too. > > For example : > > function upload(file){ > > save(file) > for each import element > upload(file of import element) > > } > > Thanks you > > creax. > > > > > -- > 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 > > > -- Blog (XML, Web apps, Open Source): 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
In reply to this post by creaxys
Damien Peymirat wrote:
> The upload is done by an xmldb:insert > How using recurrence with XQuery ?? Do you have an example ? By XQuery, I meant an XQuery script, as with xmldb:query (for example, eXist has extension functions to do the inserts and updates directly in XQuery scripts). If so, as you can define function in XQuery, you can easily use recursivity. Regards, --drkm p4.vert.ukl.yahoo.com uncompressed/chunked Sun Aug 13 13:13:38 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 |
Free forum by Nabble | Edit this page |