Deduce the Object Type Automatically from Tag Name
Review Request #119094 - Created July 3, 2014 and submitted
This makes the Geogebra filter code somewhat simpler, but adds a semantic condition on the tag names of the XML file produced since you cannot just make up names for tags. I am, in general, against these types of dependencies because it is not possible to check at compilation time whether a tag added to the XSLT is e.g. properly spelled, but I understand this code is becoming large and tedious so it might be worth the trade off. Also, we could come up with a small checking script. What do you think about this change? Also, if this change is merged, would you be able to check the old tag names and fix them? I know there were a couple of object that I added whose tag names do not match the ObjectType class name exactly.
Opened a file with basically points, lines and intersections, all objects are properly drawn.
I like it!! :D:D. I myself was thinking of doing something to make that part of the code to look better ( i had noticed the pattern but didn't know that find() function existed which could make it so short. I am updating the patch to cover all the objects which have been added so far. I agree that we are adding a condition on the name of the tags chosen in the Stylesheet file. I think there sould be comments near the code describing the approach. Also, I would like to know more about the 'checking-script' that you mentioned so I can implement it. The checking script will be required in the stylesheet file to check if the tagname corresponds to some valid Kig object or not ... ? right ? If not we can give a warning ...