Naming Rules for Identifiers in Apache OSSIE: Case Sensitivity and Quoting

Apache OSSIE identifiers follow ANSI-SQL conventions where unquoted names are case-insensitive and limited to 128 characters, while double-quoted identifiers preserve case and allow special characters.

Apache OSSIE enforces strict naming conventions for identifiers to ensure portability across diverse SQL backends. Understanding these rules—including length limits, case sensitivity behavior, and quoting requirements—is essential when defining entities, fields, and relationships in your data models according to the apache/ossie source specification.

Identifier Format and Length Constraints

According to core-spec/expression_language.md at line 75, OSSIE identifiers must conform to valid SQL name standards with a hard maximum length of 128 characters. This limit provides a safe upper bound compatible with most database vendors while preventing identifier overflow errors during model compilation.

Case Sensitivity Rules in OSSIE

OSSIE distinguishes between unquoted and quoted identifiers regarding case sensitivity, following standard ANSI-SQL semantics.

Unquoted Identifiers (Case-Insensitive)

Unquoted identifiers are treated as case-insensitive by the OSSIE expression parser. As documented in core-spec/expression_language.md at line 77, the system interprets id, Id, and iD as referring to the same entity. During the canonicalization process, OSSIE normalizes regular identifiers to uppercase before comparison, as specified at line 92.

Quoted Identifiers (Case-Preserving)

When you wrap an identifier in double quotes, OSSIE preserves the exact case you provide. However, during internal canonicalization, the system strips the surrounding quotes and unescapes any escaped characters while maintaining the original casing for matching purposes.

Quoting Identifiers with Double Quotes

The OSSIE dialect uses standard ANSI-SQL double quotes (") to delimit identifiers containing reserved words, spaces, or mixed-case characters. As noted in core-spec/expression_language.md at line 79, this quoting mechanism allows you to use otherwise restricted terms as valid identifier names across datasets and ontology definitions.

Normalization and Canonicalization Process

OSSIE applies specific transformation rules when canonicalizing identifiers for internal storage and namespace resolution. Regular identifiers undergo upper-casing normalization, while quoted identifiers have their delimiters removed and escape sequences processed. This normalization ensures consistent matching across different namespaces—from field names in core-spec/spec.md to entity relationships in ontology/ontology.md—while respecting the original case of explicitly quoted names.

Practical Implementation Examples

The following YAML examples demonstrate how to declare regular versus quoted identifiers in OSSIE model definitions:


# Regular (unquoted) identifier – case-insensitive

entity:
  name: customer                # same as "Customer" or "CUSTOMER"

# Quoted identifier – preserves exact case and allows reserved words

entity:
  name: "\"Order\""            # stored as Order, can include spaces or keywords

When OSSIE normalizes these identifiers internally, the transformations follow these patterns:

id        → ID          (regular identifier upper-cased)
"UserId"  → UserId      (quoted identifier with quotes stripped)

Namespace Resolution

While identifier syntax rules apply uniformly across all contexts, the resolution logic determining which namespace an identifier belongs to is defined in the broader OSSIE semantics specification. The core-spec/expression_language.md file at line 97 clarifies that these naming conventions remain consistent whether referencing datasets, fields, or relationship definitions.

Summary

  • Maximum length: OSSIE identifiers are limited to 128 characters to ensure database compatibility.
  • Case-insensitive unquoted: Regular identifiers normalize to uppercase and ignore case differences.
  • Double-quote delimiters: Use " to preserve case and enable special characters or reserved words.
  • Canonicalization: Quoted identifiers strip quotes during internal processing while retaining original casing.
  • Source authority: Rules defined in core-spec/expression_language.md apply uniformly across all OSSIE namespaces.

Frequently Asked Questions

Are OSSIE identifiers case-sensitive by default?

No. Unquoted identifiers in OSSIE are case-insensitive and normalize to uppercase during processing. Only quoted identifiers retain their original case, though they still undergo quote stripping during canonicalization as implemented in the expression language core.

What is the maximum length for an OSSIE identifier?

OSSIE limits identifiers to 128 characters, as specified in core-spec/expression_language.md at line 75. This constraint ensures compatibility across diverse SQL backend implementations while maintaining model portability.

How do I use a reserved SQL keyword as an OSSIE identifier?

Wrap the keyword in double quotes to create a quoted identifier. For example, use "Order" or "Select" to prevent parsing conflicts while preserving the exact spelling and case of the name.

Does OSSIE normalize quoted identifiers differently than unquoted ones?

Yes. According to lines 92 and 93 of core-spec/expression_language.md, unquoted identifiers are converted to uppercase for comparison, while quoted identifiers have their surrounding double quotes removed and escape characters processed without altering the internal casing.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →