@mwestphal Thanks for your answer. The xdmf file I’ve uploaded essentially follows the example given on the xdmf.org website in section Geometry. This is the example, shortened a bit for simplicity
<Domain>
<DataItem Name="Point Data" Format="XML" Dimensions="2 4 3">
[...]
</DataItem>
<Grid Name="Two Quads">
<Topology Type="Quadrilateral" NumberOfElements="2" >
[...]
</Topology>
<Geometry GeometryType="XYZ">
<DataItem Reference="XML">
/Xdmf/Domain/DataItem[@Name="Point Data"]
</DataItem>
</Geometry>
</Grid>
</Domain>
</Xdmf>
So the Geometry
item contains a DataItem
with a Reference
attribute, but nothing else. From the validation messages you’ve posted it seems that the Xdmf.dtd expects there to be a Dimensions
attribute, which is not contained in the example above. It seems strange to require any attributes apart from Reference
, because the DataItem
is a Reference
to a well-defined other DataItem
, so why would it need any other attribures? But regardless, I added it in this file
bad_fix1.xdmf (1.2 KB)
It doesn’t change Paraview’s behavior. Still the same message and a segfault:
'Format' not found in generateHeavyControllers in XdmfCoreItemFactory
terminate called after throwing an instance of 'XdmfError'
what(): 'Format' not found in generateHeavyControllers in XdmfCoreItemFactory
Aborted (core dumped)
So Paraview expects a Format
attribute in addition, which is apparently not required by the DTD.
But then I checked, and the ‘fixed’ file also doesn’t validate against the mentioned DTD, but in a much more serious way:
$ xmllint --dtdvalid Xdmf.dtd bad_fix1.xdmf
bad_fix1.xdmf:3: element Xdmf: validity error : No declaration for attribute xmlns:xi of element Xdmf
bad_fix1.xdmf:4: element Domain: validity error : Element Domain content does not follow the DTD, expecting (Information* , Grid+), got (DataItem DataItem DataItem DataItem Grid )
From the above it seems that the DTD doesn’t allow any specification of DataItem
on a Domain
level. That would explain a lot of my problems, but the mentioned document from xdmf.org explicitly states that this is a feature that allows re-use of DataItems
:
It is valid to have DataItem elements to be direct children of the Xdmf or Domain elements. This could be useful if several Grids share the same Geometry but have separate Topology
So which part is wrong here, and which is correct? The Xdmf.dtd, the xdmf.org documentation, or Paraview’s implementation?