[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


To: "'Mike Lampson'" <lampson@iaregistry.com>, "'ietf-provregcafaxse'" <ietf-provreg@cafax.se>
From: "Hollenbeck, Scott" <shollenbeck@verisign.com>
Date: Fri, 23 May 2003 13:40:48 -0400
Sender: owner-ietf-provreg@cafax.se
Subject: RE: [ietf-provreg] Question about e164StringType definition

> I am working on upgrading our EPP implementation to support 
> the PIR Registry
> and have come across an issue that I'm not sure is a problem with the
> protocol definition or the implementation.
> 
> Both contact-05 (which PIR uses) and contact-07 describe the 
> e164StringType
> as follows:
> 
>     <simpleType name="e164StringType">
>       <restriction base="token">
>         <pattern value="(\+[0-9]{1,3}\.[0-9]{1,14})?"/>
>         <maxLength value="17"/>
>       </restriction>
>     </simpleType>
> 
> Should be maxLength be 19 instead of 17 to allow for the 2 
> fixed characters?

This might be confusing because of the way E.164 (included in the spec as an
informative reference) defines number syntax.  The maximum total length of
an E.164 number is 15 digits (add the two for the separators we're using and
you get the 17 that you see in the spec), with the maximum length of the
national destination code (the part to the right of the ".") _dependent_ on
the country code -- it's defined as "maximum 15-cc digits".  If you have a
one-digit country code the national destination code can contain up to 14
digits, if you have a two-digit country code the national destination code
can contain up to 13 digits, and if you have a three-digit country code the
national destination code can contain up to 12 digits.

So, the protocol spec is accurate.  The length of the country code
determines the maximum length of the national destination code, and the
pattern specified is general to allow all of the legal combinations.
Unfortunately regexp syntax doesn't allow if-then constructs to make the max
length of the second field dependent on the length of the first.

-Scott-

Home | Date list | Subject list