Anonymous - 2013-01-04

I am trying to print out the following CHOICE structure, which icludes CHOICEs of SEQUENCEs.

IRIsContent ::= CHOICE
{
iRIContent IRIContent,
--irrelevant
}
IRIContent ::= CHOICE
{
iRI-Begin-record [1] IRI-Parameters,
-- At least one optional parameter must be included within the iRI-Begin-Record.
iRI-End-record [2] IRI-Parameters,
iRI-Continue-record [3] IRI-Parameters,
-- At least one optional parameter must be included within the iRI-Continue-Record.
iRI-Report-record [4] IRI-Parameters,
-- At least one optional parameter must be included within the iRI-Report-Record.
...
}
IRI-Parameters ::= SEQUENCE
{
domainID [0] OBJECT IDENTIFIER (hi2OperationId) OPTIONAL,
lawfulInterceptionIdentifier [1] LawfulInterceptionIdentifier,
--... goes on
}

xer_fprint works just fine:

xer_fprint(stdout, &asn_DEF_IRIsContent, &ics);
<IRIsContent>
    <iRIContent>
        <iRI-Begin-record>
            <lawfulInterceptionIdentifier>101</lawfulInterceptionIdentifier>
.....

but trying the same thing with asn_fprintf doesnt print which choice iRIContent has:

asn_fprint(stdout, &asn_DEF_IRIsContent, &ics);
IRI-Parameters ::= {
    lawfulInterceptionIdentifier: 101

moreover, printing the sub-Structure iRIContent instead of IRIsContent gives the exactly output as above.

Feel like it can be solved by modifying the CHOICE_print method, but couldn\'t figure out how