Hi Manuel,
Your email suggests that you are using XML encoding rules. My following
response assumes that.
To get rid of the <body> tag, you will need to use Extended XML Encoding
Rules (E-XER) of ASN.1, and apply the UNTAGGED XER encoding instruction on
the body field, like this:
MyMod DEFINITIONS XER INSTRUCTIONS ::= BEGIN
Chunk ::= SEQUENCE {
head [TAG: 1] OCTET STRING,
body [UNTAGGED] [TAG: 2] SEQUENCE OF BodyChunk
}
BodyChunk ::= [TAG: 1] OCTET STRING
value Chunk ::= { head '0102'H, body { '0304'H, '0506'H }}
ENCODING-CONTROL XER
GLOBAL-DEFAULTS MODIFIED-ENCODINGS
END
The E-XER encoding of the value will be like this:
<?xml version="1.0" encoding="UTF-8"?>
<Chunk>
<head>0102</head>
<BodyChunk>0304</BodyChunk>
<BodyChunk>0506</BodyChunk>
</Chunk>
which is what you are looking for. Note that, since tags and XER
instructions are written within []'s, you will need to add TAG before the
tag values to differentiate those from the XER instructions.
If you would like to learn more about the E-XER, there is a tutorial with
several examples at http://www.oss.com/xml/index.html. Click on the E-XER
pdf on the right column of this page.
Rajul Gupta
OSS Nokalva
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
> Manuel Polling
> Sent: Thursday, July 05, 2007 8:01 AM
> To: [email protected]
> Subject: Re: [Asn1] can repeating tags occur outside of SEQUENCE or SET?
>
> Ramaswamy R wrote:
> > Have you tried a construction like this?
> >
> > Chunk ::= SEQUENCE
> > {
> > head [1] OCTET STRING,
> > body [2] SEQUENCE OF [2] BodyChunk
> > }
> Wouldn't that result in a structure like this:
> 1 <Chunk>
> 1 <head>
> 2 <body>
> 2 <BodyChunk>
> 2 <BodyChunk>
> 2 <BodyChunk>
> I need to lose that tag for <body>:
> 1 <Chunk>
> 1 <head>
> 2 <BodyChunk>
> 2 <BodyChunk>
> 2 <BodyChunk>
>
> --
> drs. Manuel Polling
> Consultant/Software Engineer
> Edmond Research & Development B.V.
> /The Document Solutions Specialist/
> http://www.edmond.nl/
>
> _______________________________________________
> Asn1 mailing list
> [email protected]
> http://lists.asn1.org/mailman/listinfo/asn1
_______________________________________________
Asn1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1