call one document.xml in the xpl

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

call one document.xml in the xpl

simone123456
I want to call one xml document how when in the xforms we do <xforms:instance
                                 id="prova" src="oxf:/apps/prova.xml"/> for example.
For understand better I have done one simply example where I have this xpl:
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
        xmlns:oxf="http://www.orbeon.com/oxf/processors">

      <p:param name="instance" type="input"/>
       
       
                       
        <p:processor name="oxf:xml-converter">
            <p:input name="config">
                <config>
                    <encoding>utf-8</encoding>
                </config>
            </p:input>
            <p:input name="data" href="#instance"/>
            <p:output name="data" id="converted"/>
        </p:processor>
                       
        <p:processor name="oxf:file-serializer">
            <p:input name="data" href="#path"/>
        <p:input name="config">
               <config>
                   
                   <content-type>text/xml</content-type>
                    <directory>data#xpointer(/directory/@path)</directory>
                   
                    <file>prova.xml</file>
                    <append>false</append>
                   
                </config>
            </p:input>
            <p:input name="data" href="#converted"/>
        </p:processor>
    </p:config>
   
I have one file path.xml:
<path xmlns="">
                                <directory path="c:/Programmi/Apache Software Foundation/Tomcat 5.5/webapps/ops/WEB-INF/resources/apps/tirocinio"/>
                        </path>         

and i want to put the path value(c:.....) and put ,in the code directory, the   path value

   
   












Reply | Threaded
Open this post in threaded view
|

Re: call one document.xml in the xpl

Alessandro Vernet
Administrator
On Wed, Aug 20, 2008 at 8:06 AM, simone123456 <[hidden email]> wrote:
>                    <directory>data#xpointer(/directory/@path)</directory>

Using XPointer this way won't work. To build this configuration for the
file-serializer, you will need to use XSLT. You can do this in a
separate step or with an inline transformation. For the latter, see
"11.5. Embedding Transformations within Inputs" on
http://www.orbeon.com/ops/doc/reference-xpl-pipelines#inline-transformations.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.com/
Twitter - http://twitter.com/avernet



--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: call one document.xml in the xpl

simone123456
I'm trying to do but there is some error, I think the error is that I don't know how pass the xml I have try with <p:input name="data" href="oxf:/apps/tirocinio/framework/problema1/path.xml"/> where oxf:...is the path where is situated the xml
however the code now is the sequent:
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
        xmlns:oxf="http://www.orbeon.com/oxf/processors">

        <p:param name="instance" type="input"/>
       
                       
        <p:processor name="oxf:xml-converter">
            <p:input name="config">
                <config>
                    <encoding>utf-8</encoding>
                </config>
            </p:input>
            <p:input name="data" href="#instance"/>
            <p:output name="data" id="converted"/>
        </p:processor>
       
       <p:processor name="oxf:xslt">
        <p:input name="data" href="oxf:/apps/tirocinio/framework/problema1/path.xml"/>
        <p:input name="config" transform="oxf:xslt">
        <config>
                    <content-type>text/xml</content-type>
                    <directory>
                    <xsl:value-of select="/directory/@path"/>
                    </directory>
                    <file>test.xml</file>
                    <append>false</append>
                   
                </config>
        </p:input>
        <p:output name="data" id="path"/>
       </p:processor> 
                       
        <p:processor name="oxf:file-serializer">
            <p:input name="config" href="#path">
            <p:input name="data" href="#converted"/>
        </p:processor>
    </p:config>
   
   
   

Reply | Threaded
Open this post in threaded view
|

Re: Re: call one document.xml in the xpl

Hank Ratzesberger

In XPL, as I understand, the href attribute can point to "infosets" that
are within the xpl document.  The get an external document you need to
use a generator, such as the url-generator, which accepts various
protocols (file://, http://) and outputs a reference that can be used
later as input to another processor.

http://www.orbeon.com/ops/doc/processors-generators-url

HTH,
Hank

On Aug 22, 2008, at 8:08 AM, simone123456 wrote:

>
> I'm trying to do but there is some error, I think the error is that  
> I don't
> know how pass the xml I have try with <p:input name="data"
> href="#oxf:/apps/tirocinio/framework/problema1/path.xml"/> where  
> oxf:...is
> the path where is situated the xml
> however the code now is the sequent:
> <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"
>         xmlns:oxf="http://www.orbeon.com/oxf/processors">
>
>         <p:param name="instance" type="input"/>
>
> <!-- Convert a document to serialized XML -->
>         <p:processor name="oxf:xml-converter">
>             <p:input name="config">
>                 <config>
>                     <encoding>utf-8</encoding>
>                 </config>
>             </p:input>
>             <p:input name="data" href="#instance"/>
>             <p:output name="data" id="converted"/>
>         </p:processor>
>
>        <p:processor name="oxf:xslt">
>         <p:input name="data"
> href="#oxf:/apps/tirocinio/framework/problema1/path.xml"/>:confused:
>         <p:input name="config" transform="oxf:xslt">
>         <config>
>                     <content-type>text/xml</content-type>
>                     <directory>
>                     <xsl:value-of select="/directory/@path"/>
>                     </directory>
>                     <file>test.xml</file>
>                     <append>false</append>
>
>                 </config>
>         </p:input>
>         <p:output name="data" id="path"/>
>        </p:processor>
> <!-- Write the document to a file -->
>         <p:processor name="oxf:file-serializer">
>             <p:input name="config" href="#path">
>             <p:input name="data" href="#converted"/>
>         </p:processor>
>     </p:config>
>
>
>
>
>
> --
> View this message in context: http://www.nabble.com/call-one- 
> document.xml-in-the-xpl-tp19070004p19108783.html
> Sent from the ObjectWeb OPS - Users mailing list archive at  
> Nabble.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
> OW2 mailing lists service home page: http://www.ow2.org/wws
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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
OW2 mailing lists service home page: http://www.ow2.org/wws