What is the range of the maxOccurs attribute?

What is the range of the maxOccurs attribute?

book

Article ID: KB0089050

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks -
Not Applicable -

Description

Resolution:

Description:

=======

We have a schema that has an element defined with maxOccurs="9999999999"(10 digit value). We can see the maxOccurs value as 9999999999 in the xsd when opened in Notepad, while we cannot see the maxOccurs value in the code when opened in Designer.

Environment:
========
TIBCO ActiveMatrix BusinessWorks  All versions.

Symptoms:

=======

For the xsd file that contains an invalid maxOccurs (e.g. exceeds the integer range), after Reparsing, Applying and Saving the project, the invalid maxOccurs settings should be removed. If you are setting Occurence Range through Designer, it will populate a Stop window: "Your input was invalid" for any invalid input. Without the maxOccurs, the element may not occur more than once as its default setting is 1.


Cause:

====

This is a limitation on Integer. A signed Integer ranges from -2^(n-1) to 2^(n-1) -1. According to the W3C recommendation (http://www.w3.org/TR/xmlschema-0/#ref6), the value of a maxOccurs attribute may be a positive integer or term unbounded to indicate there is no maximum number of occurences. On a 32-bit system, a valid maxOccurs is from 1 to 2,147,483,647.


Resolution:
=======
Use "unbounded" for the value that exceeds the integer range.

Issue/Introduction

What is the range of the maxOccurs attribute?