Container formats
GavinWraith (26) 1563 posts |
RISC OS uses chunk files as containers for a variety of different data formats: Templates, Resourcefiles, Drawfiles, and many others (see Appendix E, PRM4). This kind of container is good for compactness and swift execution, not so good for readability or editing. Because chunk files use offsets to indicate where subchunks are to be found, the format cannot be textual. In textual files the meaning of the data has to be position independent. HTML, CSS and C source files are textual, whereas TechWriter, PDF, ELF and AIF files are not. I note that in Linux-land XML is often used as a textual format, even for speed-critical things like graphical layout. XML is not my favourite choice of a textual container, but that is a battle for another day. But it seems to me that it would be useful to have software to translate generically between chunk format and some chosen textual format. Another advantage of textual format is that it is a comparatively simple matter to edit documents programmatically, using a scripting language like Awk, Python or Lua. Editing chunk files means juggling with offsets – it can be done of course, but it is a rich source of errors. So has anybody been doing anything along these lines? |
Andreas Skyman (8677) 170 posts |
No, but I have felt the same lack of a textual representation of features, in particular in templates. I think that in a GNU/Linux yaml or – to a lesser extent – json is often preferred to xml, at least where a human is expected to read it from time to time. |
Steve Fryatt (216) 2105 posts |
For templates, you need CCres |