Federated Naming Service Programming Guide

XFN Backus-Naur Form (BNF)

The following defines the standard string form of XFN composite names in Backus-Naur Form (BNF). All the characters of the string representation of one name must uniformly use the same encoding and locale information. The notations used are shown in Table B-1:

Table B-1 Backus-Naur Notation

Symbol 

Meaning 

::=

Is defined to be 

|

Alternatively 

<text>

Nonterminal element 

`' `'

Literal expression 

*

The preceding syntactic unit can appear 0 or more times. 

+

The preceding syntactic unit can appear 1 or more times. 

{}

The enclosed syntactic units are grouped as a single syntactic unit (can be nested). 

The XFN composite name syntax in BNF is shown in Table B-2:

Table B-2 XFN Composite Name Syntax Using BNF

XFN Composite Name 

BNF Syntax 

NULL ::= 

// Empty set  

<PCS> ::= 

// Portable Character Set.
The set consists of the glyphs:
//!"#$%&'()*+,\0123456789:;<=>?
//@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'
//abcdefghijklmnopqrstuvwxyz{|}~

<CharSet> ::=  

<PCS>
| Characters from the repertoire of a string representation

<EscapeChar> ::= 

<ComponentSep>::= 

<Quote1>::= 

<Quote2> ::= 

<MetaChar> ::= 

<EscapeChar> | <ComponentSep> 

<SimpleChar> ::=  

// any character from <CharSet> with <MetaChar>, <Quote1>,
// and <Quote2> excluded. An<EscapeChar> <MetaChar>, or  
// <EscapeChar> <Quote1>, or <EscapeChar> <Quote2> is equivalent to 
// <SimpleChar>.

<Component> ::= 

<SimpleChar>* 
| <SimpleChar>+ {<Quote1> |  <Quote2> | <SimpleChar>}* 
| <Quote1> <CharSet>* {<EscapeChar> <Quote1>}* <Quote1>
 // <CharSet> must not contain unescaped <Quote1> 
 // (note that <Quote2> can appear unescaped)  
| <Quote2> <CharSet>* {<EscapeChar> <Quote2>}* <Quote2>
 // <CharSet> must not contain unescaped <Quote2>
 // (note that <Quote1> can appear unescaped)

<CompositeName> ::=  

NULL 
| <Component> {<ComponentSep> <Component>}*