niftools / nifxml

A repository for the nif.xml file, which contains the nif file format description.
http://www.niftools.org
GNU General Public License v3.0
37 stars 43 forks source link

Cleanup of & in field names and some boolean/numeric comparisons in condition text #6

Closed abies closed 11 years ago

abies commented 11 years ago

Cleanup of & in field names and some boolean/numeric comparisons in condition text

@ttl269, @throttlekitty @skyfox69 @amorilia

neomonkeus commented 11 years ago

@abies - FYI, when you send a pull request include some people to review. Generally if the person who sends the pull request is a reviewer they will not merge it themselves.

The list of reviewers is available in the the assign list. I have added them to pull request description. Don't include me though I'd have to do work then and I'm terrible at doing that :P

Feel to look through the issues and pull request list, comment and give your ideas. Go nuts. We are always looking for new people.

abies commented 11 years ago

Regarding & - these are only places where this character is used in field name. It is illegal identifier for field names in most languages, so any translation will have to escape it just for these two fields.

Regarding !=0 - nif.xml is quite 'proper' in differentiating boolean conditions versus numeric conditions. In this few places, it assumes that integers are convertible to booleans. This is non-obvious for non-C languages. You could say 'we don't care', but it is done properly in hundreds of other places - so there is no real reason to no do it in these few to make it consistent and explicit.

Both modifications came from changes I have spotted while doing java bindings for nif files. In attempt to reduce special handling/exceptions I looked at things which could be corrected in nif.xml - and these few came up as inconsitencies to majority of nif.xml, while also adding few extra exceptions to converter.

neomonkeus commented 11 years ago

Nif.xml should be both language and application agnostic. This has been brought up before to do with Java and changes have been rejected before because they were language specific. I know there are some attribute for Niflib & NifSkope, those are legacy.

Here are my thoughts on this;

Something which we should think about is implementing ref: #3 This would allow this to be broken into its sub-parts using a compound. The we would have more specific names

I would like to hear more about what is the difference between numeric & boolean comparisons in terms of pure xml. Also would an xml schema be worth investigating?

neomonkeus commented 11 years ago

Any further thoughts or should we merge in?

ttl269 commented 11 years ago

I think we can merge. Abies exlpained the reasons very well.