The ParaView ServerManager configuration XML have grown to be quite complex over the years. To avoid duplication we came up with some idiosyncratic strategies in the past like base_xmlgroup
, base_xmlname
etc. I am wondering if it’s time to add something more standard-esque like xi::inlcude
.
In my use-case, I am adding support for bunch of writers to choose arrays to write. Currently, I’ll have to resort to copy-paste, however with xi:include, it could be potentially supported as follows:
<ServerManagerConfiguration>
<Stub name="ArraySelectionForWriters">
<!-- define a stub to re-use -->
<SubProxy>
<Proxy name="PassArrays" proxygroup="internal_writers" proxyname="PassArrays" />
<ExposedProperties>
<Property name="ChooseArraysToWrite"/>
<PropertyGroup label="Array Selection" panel_widget="ArrayStatus">
<Property name="PointDataArrays" />
<Property name="CellDataArrays" />
<Property name="FieldDataArrays" />
<Property name="VertexDataArrays" />
<Property name="EdgeDataArrays" />
<Property name="RowDataArrays" />
</PropertyGroup>
</ExposedProperties>
<LinkProperties>
<Property name="Input" with_property="Input" />
</LinkProperties>
</SubProxy>
</Stub>
....
<WriterProxy ...>
<StringVectorProperty name="FileName" .. >
</StringVectorProperty>
...
<!-- this is same as having the Stub/SubProxy element copied here -->
<xi::include xpointer="element(//Stub[@name='ArraySelectionForWriters']/SubProxy)" />
</WriterProxy>
</ServerManagerConfiguation>
Thoughts? Other suggestions?