Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: charstring/universal charstring and ranges of values

charstring/universal charstring and ranges of values 07 Jul 2008 10:02 #7376

  • Iv
  • Iv's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
Hello,



When the user defines a subtype of charstring or universal charstring it has
the possibility of defining a range of values. I have few questions related
to the behavior of these ranges.



The standard says Core Language page 30:

type charstring MyCharString ("a" .. "z");

// Defines a string type of any length with each character within the
specified range

type universal charstring MyUCharString1 ("a" .. "z");

// Defines a string type of any length with each character within the range
from a to z

// (character codes from 97 to 122), like "abxyz";

// strings containing any other character (including control characters),
like

// "abc2" are disallowed.



I suppose you can define as many ranges as needed, like for example type
charstring MyCharString (("a" .. "d"), (“f” .. ”z”)) where the type accepts
any value that does not contains the character “e”. Is it correct?



What is the behavior when the range is define with more than one character?,
we have for example:



type charstring MyCharString ("abc" .. "cba");



Is this possible?, Does the upper and lower value of the range have to be of
the same length?



If we try to imitate the behavior of the example given by the standard and
apply it to our new example, should any value:

Have an implicit restriction length where its length is a multiple of three
or just three.

Which are de range of values it supports, abc, abd, abe, abf,..., abz, aca,
..., azz, baa, ..



Best regards,
Iván









Iván Navarro Azurmendi



cid:part2.03090808.07000509@mtp.es



Pº de la Castellana, 182 - 10ª planta

28046 - Madrid

Tel.: +34 913531564

Fax: +34 913596179

<www.mtp.es> www.mtp.es
The administrator has disabled public write access.

charstring/universal charstring and ranges of values 08 Jul 2008 12:57 #7377

Hi Ivan,

> I suppose you can define as many ranges as needed,
yes you can define multiple ranges for charstrings.

> *type charstring *MyCharString ("abc" .. "cba");
> Is this possible?,
No this is not possible.

I conclude this from:
6.1.2.2. saying:
"the range restricts the allowed values for each separate character in
the strings ..."
nothing more complex is stated in the standard.

Furthermore I would like to add that the desired restrictions can be
easily achieved by using "pattern type restrictions" as defined in 6.1.2.4.

Best regards,
Theo

Iván Navarro Azurmendi schrieb:
> Hello,
>
>
>
> When the user defines a subtype of charstring or universal charstring it
> has the possibility of defining a range of values. I have few questions
> related to the behavior of these ranges.
>
>
>
> The standard says Core Language page 30:
>
> *type charstring *MyCharString ("a" .. "z");
>
> // Defines a string type of any length with each character within the
> specified range
>
> *type universal charstring *MyUCharString1 ("a" .. "z");
>
> // Defines a string type of any length with each character within the
> range from a to z
>
> // (character codes from 97 to 122), like "abxyz";
>
> // strings containing any other character (including control
> characters), like
>
> // "abc2" are disallowed.
>
>
>
> I suppose you can define as many ranges as needed, like for example
> *type charstring *MyCharString (("a" .. "d"), (“f” .. ”z”)) where the
> type accepts any value that does not contains the character “e”. Is it
> correct?
>
>
>
> What is the behavior when the range is define with more than one
> character?, we have for example:
>
> * *
>
> *type charstring *MyCharString ("abc" .. "cba");
>
>
>
> Is this possible?, Does the upper and lower value of the range have to
> be of the same length?
>
>
>
> If we try to imitate the behavior of the example given by the standard
> and apply it to our new example, should any value:
>
> Have an implicit restriction length where its length is a multiple of
> three or just three.
>
> Which are de range of values it supports, abc, abd, abe, abf,..., abz,
> aca, ..., azz, baa, ..
>
>
>
> Best regards,
> Iván
>
>
>
>
>
>
>
>
>
> *Iván Navarro Azurmendi*
>
>
>
> cid:part2.03090808.07000509@mtp.es
>
>
>
> Pº de la Castellana, 182 - 10ª planta
>
> 28046 - Madrid
>
> Tel.: +34 913531564
>
> Fax: +34 913596179
>
> *www.mtp.es* <www.mtp.es>
>
>
>
The administrator has disabled public write access.

charstring/universal charstring and ranges of values 15 Jul 2008 13:08 #7378

  • György Réthy
  • György Réthy's Avatar
  • OFFLINE
  • Moderator
  • Posts: 189
  • Thank you received: 1
  • Karma: 1
Hi Ivan,

There seems to be misunderstanding related to character string range restrictions. The standard says:
"In the case of charstring and universal charstring types, the range restricts the allowed values for each separate character in the strings. The boundaries shall evaluate to valid character positions according to the coded character set table(s) of the type (e.g. the given position shall not be empty). Empty positions between the lower and the upper boundaries are not considered to be valid values of the specified range."

While e.g. the list restriction specifies concrete strings as the allowed values of the type, the range restriction does NOT specify strings but the characters allowed in (at any position of) the strings that compose the set of values of the type. The length of the strings are still from 0 to infinity(unless you limit the length in addition to the characters allowed). Hence range boundaries always shall be one character only, anything else is an error.

BR, Gyorgy

>
Original Message
> From: active_ttcn3 : mts stf133 ttcn version 3 - active
> members only [This email address is being protected from spambots. You need JavaScript enabled to view it.] On Behalf Of
> Theofanis Vassiliou-Gioles
> Sent: Tuesday, 08 July, 2008 2:57 PM
> To: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Subject: Re: charstring/universal charstring and ranges of values
>
> Hi Ivan,
>
> > I suppose you can define as many ranges as needed, yes you
> can define multiple ranges for charstrings.
>
> > *type charstring *MyCharString ("abc" .. "cba"); > Is
> this possible?, No this is not possible.
>
> I conclude this from:
> 6.1.2.2. saying:
> "the range restricts the allowed values for each separate
> character in the strings ..."
> nothing more complex is stated in the standard.
>
> Furthermore I would like to add that the desired restrictions
> can be easily achieved by using "pattern type restrictions"
> as defined in 6.1.2.4.
>
> Best regards,
> Theo
>
> Iván Navarro Azurmendi schrieb:
> > Hello,
> >
> >
> >
> > When the user defines a subtype of charstring or universal
> charstring
> > it has the possibility of defining a range of values. I have few
> > questions related to the behavior of these ranges.
> >
> >
> >
> > The standard says Core Language page 30:
> >
> > *type charstring *MyCharString ("a" .. "z");
> >
> > // Defines a string type of any length with each character
> within the
> > specified range
> >
> > *type universal charstring *MyUCharString1 ("a" .. "z");
> >
> > // Defines a string type of any length with each character
> within the
> > range from a to z
> >
> > // (character codes from 97 to 122), like "abxyz";
> >
> > // strings containing any other character (including control
> > characters), like
> >
> > // "abc2" are disallowed.
> >
> >
> >
> > I suppose you can define as many ranges as needed, like for example
> > *type charstring *MyCharString (("a" .. "d"), ("f" .. "z"))
> where the
> > type accepts any value that does not contains the character
> "e". Is it
> > correct?
> >
> >
> >
> > What is the behavior when the range is define with more than one
> > character?, we have for example:
> >
> > * *
> >
> > *type charstring *MyCharString ("abc" .. "cba");
> >
> >
> >
> > Is this possible?, Does the upper and lower value of the
> range have to
> > be of the same length?
> >
> >
> >
> > If we try to imitate the behavior of the example given by
> the standard
> > and apply it to our new example, should any value:
> >
> > Have an implicit restriction length where its length is a
> multiple of
> > three or just three.
> >
> > Which are de range of values it supports, abc, abd, abe,
> abf,..., abz,
> > aca, ..., azz, baa, ..
> >
> >
> >
> > Best regards,
> > Iván
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > *Iván Navarro Azurmendi*
> >
> >
> >
> > cid:part2.03090808.07000509@mtp.es
> >
> >
> >
> > Pº de la Castellana, 182 - 10ª planta
> >
> > 28046 - Madrid
> >
> > Tel.: +34 913531564
> >
> > Fax: +34 913596179
> >
> > *www.mtp.es* <www.mtp.es>
> >
> >
> >
>
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin