Abhishek Shrivastava wrote:

>         <p:processor name="oxf:directory-scanner">
>                 <p:input name="config">
>                 <config>
>                                 <base-directory>C:\Program Files\Apache
> Software Foundation\Tomcat 5.0\webapps\orbeon\WEB-INF</base-directory>
>                                 <include>*</include>
>                                 <case-sensitive>false</case-sensitive>
>                         </config>
>                 </p:input>
>                 <p:output name="data" id="dirOutput" debug="directory"/>
>         </p:processor>

> 1. How to get the base-directory node from instance data
> (<selectedApp>)rather than a hard-coded value?

Simply with an embedded XSLT transform:

<p:processor name="oxf:xslt">
<p:input name="data" href="#instance"/>
<p:input name="config">
<config xsl:version="2.0" >
<base-directory>C:\some\base\dir\<xsl:value-of select="whatever-expression-depending-on-instance()"/></base-directory>
<include>*</include>
<case-sensitive>false</case-sensitive>
</config>
</p:input>
<p:output name="data" id="directory-scanner-config"/>
</p:processor>


<p:processor name="oxf:directory-scanner">
    <p:input name="config" href="#directory-scanner-config"/>
    <p:output name="data" id="dirOutput" debug="directory"/>
</p:processor>

Make sure BTW that a user cannot simply enter and submit a path in
your XForms instance (for obvious security reasons).

> 2. It seems like my pipeline AppModel.xpl is not getting
> executed. Even when I try to write the out put in a file for
> debugging purpose it doesn't work.

Do you read the output "dirOutput"? If not, try to read it with a Null
Serializer:

<p:processor name="oxf:null-serializer">
    <p:input name="data" href="#dirOutput"/>
</p:processor>

-Erik



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
orbeon-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to