'Interpreting an XPath expression to understand a particular schema
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
