CybOXProject / schemas

CybOX Schemas and Schema Development
42 stars 17 forks source link

Distinction between Integer and Int #321

Open gtback opened 10 years ago

gtback commented 10 years ago

I just learned that there's a difference between an integer and an int in XML Schema. The former is used for arbitrary-size integers, while the latter is for "programming-language-style" 32-bit signed values in the range [-2147483648, 2147483647].

We only define an IntegerObjectPropertyType, whose default datatype attribute is int, and whose annotation states (emphasis mine):

... representing the specification of a single Object property whose core value is of type Int. This type will be assigned to any property of a CybOX object that should contain content of type Integer ...

Do we need to clarify or correct any of this? I imagine there are places (4-byte fields in network packets, for instance) where the 32-bit-value interpretation is needed, but others (size of a disk in bytes) where either a Long or an arbitrary-length Integer is needed.