Interpreting an XPath expression to understand a particular schema

192 views Asked by At

This is my first foray into XML. I'm trying to understand Java-based XML pipeline processing structure, but I'm a bit confused by the usage of XPath.. basic abbreviated structure is as follows. In particular, I am trying to wrap my head around the pipeline schema for the XNAT database.

<Pipeline>
    <documentation>
        <author>
        </author>
        <input-parameters>
            <parameter>
                <name>example_parameter</name>
                <values><schemalink>xnat:imageSessionData/ID</schemalink></values>
            </parameter>
        </input-parameters>
    </documentation>     
    <outputFileNamePrefix>^concat(/Pipeline/parameters/parameter[name='workdir']/values/unique/text(),'/DicomToNifti')^</outputFileNamePrefix>
    <loop id="series" xpath="^/Pipeline/parameters/parameter[name='scanids']/values/list^"/>
    <parameters>
        <parameter>
            <name>workdir</name>
            <values>
                <unique>^concat(/Pipeline/parameters/parameter[name='builddir']/values/unique/text(),'/',/Pipeline/parameters/parameter[name='sessionId']/values/unique/text())^</unique>
            </values>
        </parameter>
    </parameters>
</Pipeline>

If I am understanding correctly, the <outputFileNamePrefix> element is using XPath to select the value of the workdir parameter... which itself seems to be a slightly different XPath expression to a similar parameter with the name builddir, but that parameter does not seem to exist anywhere within the pipeline schema... the overall project is probably a little too involved to include in a stack exchange question, but perhaps someone could point me in the right direction...

Again, the code above has been abbreviated. The full .xml can be found here.

1

There are 1 answers

0
reas0n On BEST ANSWER

There are certain fields that are given for 'free' in XNAT, that don't appear explicity in the pipeline XML. For anyone else that requires illumination, you can check this post on the XNAT user's group.