erasmus-without-paper / general-issues

An empty project for tracking issues not related to any specific project.
0 stars 1 forks source link

Decide on XML element naming convention #15

Closed mikesteez closed 7 years ago

mikesteez commented 8 years ago

We are working with the IIAS API currently, and we have one suggestion.

Could we change

<xs:element name="response">

To something like

<xs:element name="IIASIndexResponse">

and unique names for all root elements in the XSD files? We get collisions when we generate Java code from the schemas, as everything is named “response”. It is also quite confusing in the code, when all you have is different Reponse objects, only separated by the package name.

wrygiel commented 8 years ago

I don't mind renaming these. @erasmus-without-paper/wp3, @erasmus-without-paper/wp4, what do you think?

Also, I think we should agree on a single "XML element naming convention". I have used <words-separated-by-dashes> so far, because this is what W3C standards tend to use, I think. I don't mind using different conventions, as long as we stick with them in all the other draft APIs.

kaiqu commented 8 years ago

Both unique response names and dash-as-separator are fine by me.

georgschermann commented 8 years ago

We are also fine with both variants. Personally i tend to pascal casing.

wrygiel commented 8 years ago

Personally i tend to pascal casing.

Since we intend to reuse EMREX ELMO schemas, and these schemas use pascalCasing, then I can see a reason to use it in EWP too. Unfortunatelly, we have started to use spacing-with-dashes in some of the released APIs already, so we will end up with some mixed conventions either way... Hmm...

wrygiel commented 8 years ago

On the other hand, having mixed conventions is pretty natural in XML world. For example, EMREX ELMO uses pascalCasing, but it also imports XML signing schema which uses UpperCase (example here). So, perhaps we're overthinking this.

georgschermann commented 8 years ago

I also think it's nothing worth putting too much effort in it.