Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
A.  XFN Composite Names Backus-Naur Form (BNF) Decomposing the Composite Name String  Previous   Contents   Next 
   
 

Composing the Composite Name String

The function fn_string_from_composite_name() returns the string representation of an XFN composite name given its structural form (FN_composite_name_t). The following are the rules used by fn_string_from_composite_name().

  1. The components are added to the composite name string in left to right order (that is, rightmost is the tail).

  2. Successive components are separated by the component separator (<ComponentSep>).

  3. Empty components are handled in the following way:

    1. A leading empty component is represented by a leading <ComponentSep>.

    2. A trailing empty component is represented by a trailing <ComponentSep>.

    3. An empty component occurring within a composite name is represented by two consecutive <ComponentSep>s.

  4. A composite name denoting a single non-empty component does not contain any unescaped component separator.

  5. Any occurrence of <ComponentSep> in a component is escaped by inserting <EscapeChar> immediately preceding <ComponentSep>.

  6. If the first character of a component is either <Quote1> or <Quote2>, it will be escaped by inserting <EscapeChar> immediately preceding the quote.

  7. Any occurrence of <EscapeChar> before <ComponentSep> in a component is escaped by inserting <EscapeChar> immediately preceding the <EscapeChar>.

  8. Any occurrence of <EscapeChar> as the first character of a component with <Quote1> or <Quote2> as the second character in a component is escaped by inserting <EscapeChar> immediately preceding the <EscapeChar>. Subsequent <EscapeChar> occurring before any matching quote character is also escaped by inserting <EscapeChar> immediately preceding the <EscapeChar>.

 
 
 
  Previous   Contents   Next