I thought that was for xs:int, but not xs:integer which is of arbitrary length. In other words: http://www.w3.org/TR/xmlschema11-2/#integer versus http://www.w3.org/TR/xmlschema11-2/#int
It's true, the wording implies that all implementations need to support larger integers. This is in contrast with out-of-bounds situations resulting from integer operations (see e.g. [1] ("For xs:integer operations, implementations that support limited-precision integer operations ·must· select from the following options [...]").
Really all I needed for my use case was to call the toString() method on the BigInteger instance, but I couldn't seem to do that without the implicit cast to xs:integer. What about something along the lines of: BI:new() returns a basex:binary as it's type and leave it to the user to handle any explicit casting?
Maybe you can call BI:to-string() instead? Return basex:binary instead of casting the value could lead to unexpected behavior in existing applications..
Christian