cs-types

Hi,

first of all, sorry if I keep bothering you with these questions. I
hope they are not solely related to my ignorance of XML schemas…

Most of the cs-types are with a ‘-’ when formed by more then one word,
while other are with the underscore “_”.

This diversity makes it troublesome to automatically generate/read
cs-types, especially for those languages for which the ‘-’ is somehow
a reserved symbol.

Wouldn’t be better to have the same approach consistently applied -
whether a ‘-’ r a ‘_’?

Thanks,
Andrea

Yeah, I ran into that one too. I replace any dashes I encounter with
underscores. Not a big problem, as long as there are not going to be
clashes due to two variables only being different in name by the dash
vs. underscore, but that would be bad design anyway.

Johan

first of all, sorry if I keep bothering you with these questions. I
hope they are not solely related to my ignorance of XML schemas…

No, you’re reading it fine (one of the nice benefits of RELAX NG
compact is it’s readable by humans!).

Most of the cs-types are with a ‘-’ when formed by more then one word,
while other are with the underscore “_”.

This diversity makes it troublesome to automatically generate/read
cs-types, especially for those languages for which the ‘-’ is somehow
a reserved symbol.

Wouldn’t be better to have the same approach consistently applied -
whether a ‘-’ r a ‘_’?

From a programming standpoint, yes. But, OTOH, as Johan said, it’s
really not that hard to handle programmatically, and there are other
reasons why the patterns you see. For example, if you look at
“article” and “article-magazine”, the hyphen in the latter is there to
indicate that it is a refinement of the fallback type (in this
article). The underscores are used where there are multiple words
within any particular fragment. So, it’s not inconsistent from that
standpoint.

I did ask about this issue earlier, BTW, but we decided not to make
any changes at that time b/c code and styles were already written, and
there didn’t seem any compelling reason to change.

In any case, we do need to spend some time refining the type list.

Bruce