I have not yet tried any of the suggestions that were made here (but I
am going to real soon). In the mean time, here is some other info.
> Would you mind sending us a sample of an encoded message?
Not at all. :)
Below is a sequence starting off with a tag representing a color space
(as text, so it simply says "CMYK"). This is followed by 4 color
components which are not separately encapsulated in a SEQUENCE OF. In
this case, each color component is a number between 0 and 1 represented
as text.
a2 36
81 04 43 4d 59 4b
82 0a 20 20 20 30 2e 37 38 34 33 31
82 0a 20 20 30 2e 37 32 31 35 36 34
82 0a 20 20 30 2e 36 39 34 31 31 33
82 0a 20 20 30 2e 39 39 32 31 35 37
The same thing in XML looks like this:
<setColor>
<colorSpace>CMYK</colorSpace>
<component1> 0.78431</component1>
<component2> 0.721564</component2>
<component3> 0.694113</component3>
<component4> 0.992157</component4>
</setColor>
In my abstract syntax I use:
SetColor ::= SEQUENCE {
colorSpace [1] GeneralString,
component1 [2] ColorComponent,
component2 [2] ColorComponent OPTIONAL,
component3 [2] ColorComponent OPTIONAL,
component4 [2] ColorComponent OPTIONAL
}
but that gets a bit tedious for some other tags which can have an
arbitrary number of tags. As a stopgap I created another component with
100 OPTIONALs. Not exactly
--
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