Franck,

        in an IMPLICIT TAGGING mode (like yours since it is "FOO DEFINITIONS IMPLICIT 
TAGS ::="), there is no automatic tagging of the elements and there is no need to tag 
your elements since the are different universal type. If the universal types were the 
same then they should be tagged by the syntax specifier; if not, the decoder couldn't 
know what element it receives.
        In an AUTOMATIC TAGGING mode (which is recommended by X680) they would be 
automatically tagged (by the encoder) and the specifier wouldn't have to worry about!

I can suggest you to read either John Larmouth's book 
(http://www.oss.com/asn1/larmouth.htm) or Olivier Dubuisson's book 
(http://www.oss.com/asn1/booksintro.html) about this subject.

> ----------
> De :  Frank Balluffi[SMTP:[EMAIL PROTECTED]]
> R> épondre à :        [EMAIL PROTECTED]
> Date :        mercredi 4 octobre 2000 15:24
> A :   '[EMAIL PROTECTED]'
> Objet :       [ASN.1] Tagging of CHOICE Elements for Which User-Defined Tags are Not 
>Sp ecified
> 
> I am confused about the tagging of CHOICE elements for which user-defined
> tags are not specified.
> 
> It is my understanding that in an environment of implicit tagging, a
> user-defined tag for a CHOICE element must be EXPLICIT:
> 
yes if it is not then the compiler should issue an error (at least a warning to say it 
has transformed the IMPLICIT to EXPLICIT!)

> FOO DEFINITIONS IMPLICIT TAGS ::=
> BEGIN
> 
> Sequence ::= SEQUENCE
> {
>     utf8String [0] IMPLICIT UTF8String OPTIONAL,
>     --  choice must be explicitly tagged.
>     choice     [1] EXPLICIT Choice     OPTIONAL
> }
> 
> Choice ::= CHOICE
> {
>     printableString PrintableString,
>     integer         INTEGER
> }
> 
> END
> 
> and if the EXPLICIT keyword is not specified for the element choice (above),
> the element will be "implicitly" (sorry for the choice of word) tagged
> EXPLICIT.
> 
> What happens if user-defined tags are not specified? In the following
> example, is the element choice implicitly tagged:
> 
> FOO DEFINITIONS IMPLICIT TAGS ::=
> BEGIN
> 
> Sequence ::= SEQUENCE
> {
>     utf8String UTF8String OPTIONAL,
>     choice     Choice     OPTIONAL
> }
> 
> Choice ::= CHOICE
> {
>     printableString PrintableString,
>     integer         INTEGER
> }
> 
> END
> 
> Thanks.
> 
> Frank
> 

Reply via email to