Dynamic input for xinclude processor

Posted by hospbene on
URL: https://discuss.orbeon.com/Dynamic-input-for-xinclude-processor-tp3013819.html

Hey there,

i've got a problem with my xincludeprocessor with user-defined inputs.

Because of the output of my xslt-processor, which in my opinion can only give back an element not ONLY text/string, i am getting this as input $path.

<path>thedocument.xml</path>


This is my xinclude-processor:

<p:processor name="oxf:xinclude">
                                <p:input name="config" href="projectProperties.xml"/>
                                <p:input name="projectFileInput" href="#path#xpointer(data(/))"/>
                                <p:output name="result" id="result" ref="data" />
</p:processor>

- config, contains the document with this tag


<project id="blubb">
                 <projectfile id="blubb" path='thedocument.xml'/>
  <xi:include href='input:projectFileInput' xxi:omit-xml-base="true"/>
</project>



- projectFileInput gets this :

<path>thedocument.xml</path>

and with xpointer i am trying to get the content (thedocument.xml) as href.



PROBLEM:

The output of my xinclude-Processor doesn't include the file which ist located in thedocument.xml.

The ouput looks like this.

<project id="blubb">
<projectfile id="blubb path="thedocument.xml"/>
thedocument.xml
</project>


so it doesn't include anything, it only replaces the xinclude-tag with the path of my file.

What am i doing wrong?
Can someone help me?

greetz