# The following was supposedly scribed by # Bruno Postle # on Saturday 21 August 2004 10:16 am: >The application knows to use the YAML parser from the file >extension. To access the centre-point, all it needs to do is >look-up the ./my-circle.yml#version and ./my-circle.yml#type >attributes and see if it has the code to handle a "foo" or "bar" >formatted "circle" - Otherwise it skips the file with a warning. > >So the "version" and "type" attributes combined have basically the >same function as an XML DOCTYPE declaration. ok, but why "./my-circle.yml#version and ./my-circle.yml#type" ? (btw, ./${circle}.yml#type eq 'circle', so let's call it #format) I think it is a better plan in the long run to resign each directory to one format and version. ./#version and ./#format This gives one place to look for the version and format of the drawing. After all, you don't have mixed versions of entities in one dxf. What if the directory structure changes? Yes, rhizopod is flat, but sturgeon may not be so flat. In fact, I think rhizopod may actually need to be somehow broken into the following parts: geometry/ layers/ object_styles/ linetypes/ text_styles/ mark_styles/ So, for ($format eq 'rhizopod'), you should be able to count on finding one directory structure for any value of $version. But, for ($version == 0.01), the keys inside the entities may possibly have different names/shapes than for ($version == 0.05). This implies a format layer and version layer in your code/classes. For starters, I'm just going to write-off mixed formats within a directory completely. I don't see it as even feasible that rhizopod and sturgeon would have identical structures and filename conventions. So, if $format is global to the directory, that leaves only the question as to whether $version is an entity-level variable. Doesn't it sound easier to switch code classes at drawing-open rather than entity-open? Also, I know it is possible to write code to switch at entity-open, but is it worth it? What real-world situation justifies it? --Eric -- "Unthinking respect for authority is the greatest enemy of truth." --Albert Einstein