VTK XML format and data type specific variants

Scripts are often written like so

... blah blah blah..

SaveDataSet(producer, "../foobar.vtk")

Here, SaveDataSet call will have to change based on what the data type is for VTK-XML files.

Let’s say your script accepts png, tif, ply, stl, vtp, and vti file extensions now. Would you like the script to only accept vtx extension? Or the script would take png, tif, ply, stl, and vtx?

I think this a bad comparison. TIFF, PNG, etc. are different file formats entirely. If the user wants to write a file in PNG format, one can easily specify so in the script.

SaveDataSet(producer, "..../filename.png")

Now, if the user wants to write the data in VTK-XML format, this is not sufficient. He has to determine which extension it’s going to be based on the input type and then generate.

We are not talking radomly combining file extensions here. We’re saying for all files in the VTK-XML format, it makes since to have single extension than different ones based on the data type. This split is unique to VTK-XML formats, and my original question was aimed at understanding why that was done. From the discussion, I am concluding there’s really no rhyme or reason for that decision,

Again, that is not the core point here. It’s simply limited to VTK-XML file formats.