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="#instance"/>
<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="#invconfig"/>
<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= input

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 ="instance" ="input" ="instance_data"/>
� � <p:param ="data" ="output"/>
� �
� � <p:choose href=>
� � � � � �<p:when ="/instanceData/meta/screen-id != ''">
� � � � � � � � � � <!-- Retreive the appropriate flow config document for this screen-->
� � � � � � � � � � �<p:processor 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> � � � � � � � � � � � � � � � � � � � � � � � � �
� � � � � � � � � � � � � � � � � � � � � </config>
� � � � � � � � � � � � � � � � � </p:input>
� � � � � � � � � � � � � � � � � <p:output name= id= debug=/>
� � � � � � � � � � � � </p:processor> � � � � � � � � � � � �


Thanks,

Brian Bacsu

Reply via email to