Matthew
Thanks, I will give this a try.
Brian Bacsu
| "Matthew J. Graham" <mjg @cacr.caltech.edu> Sent by: orbeon-user-admin 12/07/2004 08:27 PM
|
To: [EMAIL PROTECTED] cc: Subject: Re: [orbeon-user] Re: loading xml file using dynamic name |
Hi,
Here's how I do it:
<p:param type="input" name="instance"/>
<!-- Load the inventory file -->
<p:processor name="oxf:xslt">
<p:input name="data" href=""> <p:input name="config">
<config xsl:version="2.0">
<url>
<xsl:value-of select="concat('file://', /form/location)"/>
</url>
<content-type>text/xml</content-type>
</config>
</p:input>
<p:output name="data" id="invconfig"/>
</p:processor>
<p:processor name="oxf:url-generator">
<p:input name="config" href=""> <p:output name="data" id="inventory"/>
</p:processor>
where /form/location is the result of an xforms:input on my input form.
Cheers,
Matthew
On Dec 7, 2004, at 5:16 PM, Brian Bacsu wrote:
>
> Hi
>
> I am try to figure out how to load an XML file using a dynamic name. I
> first used the oxf:identity processor, but could not load a variable
> name (say using a <xsl:value-of> statement into the href= ""> >
> I then tried the oxf:url-generator processor, but this section of code
> does not seem to get executed in my pipeline. Here is a sample of the
> code. I know the "<p:when>" statement is true, because other
> processors further on in the flow are being executed.
>
> Any suggestions would be appreciated
>
> <p:param name="instance" type="input" debug="instance_data"/>
> � � <p:param name="data" type="output"/>
> � �
> � � <p:choose href=""> > � � � � � �<p:when test="/instanceData/meta/screen-id != ''"> �
> � � � � � � � � � � <!-- Retreive the appropriate flow config document > for this screen-->
> � � � � � � � � � � �<p:processor name="oxf:url-generator"
> xmlns:p="http://www.orbeon.com/oxf/pipeline">
> � � � � � � � � � � � � � � � � � <p:input name="config">
> � � � � � � � � � � � � � � � � � � � � � <config>
> � � � � � � � � � � � � � � � � � � � � � � � � �
> <url>oxf:/config/pageMgrConfig/<xsl:value-of � � � � � � � � � � � � �
> � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �
> � � � �
> select="/instanceData/meta/screen-id"></xsl:value-of>.xml</url>
> � � � � � � � � � � � � � � � � � � � � � � � � �
> <content-type>application/xml</content-type> � � � � � � � � � � � � �
> � � � � � � � � � � � �
> � � � � � � � � � � � � � � � � � � � � � </config>
> � � � � � � � � � � � � � � � � � </p:input>
> � � � � � � � � � � � � � � � � � <p:output name="data"
> id="xml_config" debug="xml_config"/>
> � � � � � � � � � � � � </p:processor> � � � � � � � � � � � �
>
>
> Thanks,
>
> Brian Bacsu
>
