Subject: Re: IPP> Re: draft-mutz-http-attributes-02.txt [ISSUE: resolution as a pair of integers]

From: Tom Hastings <[email-masked]>
Date: Thu, 19 Jun 1997 11:09:57 PDT

Larry is suggesting that FAX, IPP, and scanning all need resolutions in
x and y that might differ, though usually they are the same.  Having
integers, instead of enums, gets us out of the registration business, but
slighlty complicates the attribute representation into needing a way to
represent pairs of integers as an attribute value.

If we wanted IPP to represent resolution as a pair of integers,
what would the structure and encoding be?

We already have to be able to represent a range of integers, which
is a pair of integers.  With Larry's proposalwe would need to be able to 
represent a 1SetOf RangeOf Integer.

One crude way to do it would be to make resolution a multi-valued
attribute that the requester can supply one or two integer values and no more.

If one value, x and y are the same. If two values, x and y could be
different.

For the corresponding "resolutions-supported" Printer attribute,
we could have a multi-valued integer in which the values come in pairs
(really crude!).  
I.e., "printer-supported" = '300' '300' '300' '600' '600' '600'
for a printer that supports the three pairs: 300x300, 300x600, and 600x600.
If the printer supports 600x300 (x by y), then it would have to add a
two more values:  '600' '300'.

A more elegant solution requires some more structure to representing
pairs of integer values.

One way is to introduce the notation of an attribute whose values
are themselves attributes:

So the "resolution" attribute could have as values the attrbutes:
   "x-resolution" and "y-resolution".  The "resolution-supported"
attribute would be multi-valued, where each value is an attribute
set containing "x-resolution" and "y-resolution".  The encoding
techinque with a length for the outer value (and each inner value) means
that a recipient that doesn't support this attribute would still be able to
step over the entire value to look at the next attribute supplied by the
requester.  Remember that a client requesting all attributes of a Printer
might get back such an attribute that the client doesn't recognize/support.

Pictorally the encoding would be something like:

  "resolution" <SP> <value-len> 
       "x-resolution" <SP> <value-len> '300'
       "y-resolution" <SP> <value-len> '600'

and

  "resolution-supported <SP> <value-len>
       "x-resolution" <SP> <value-len> '300'
       "y-resolution" <SP> <value-len> '300'
  "" <SP> <value-len>
       "x-resolution" <SP> <value-len> '300'
       "y-resolution" <SP> <value-len> '600'
  "" <SP> <value-len
       "x-resolution" <SP> <value-len> '600'
       "y-resolution" <SP> <value-len> '600'

At 19:31 06/05/97 PDT, Larry Masinter wrote:
>> None of these solutions solve the problem of the Printer's 
>> resolutions-supported attribute which, hopefully, tells the
>> client exactly what resolutions the Printer supports without
>> any extraneous values and without a complicated structure
>> for the attribute.
>
>I think this is the same problem fax has, though.
>Why would a list of pairs of integers (x-res/y-res)
>or integer & ratio (x-res, aspect ratio) have 'extraneous
>values'? Or be a 'complicated structure'?
>
>-- 
>http://www.parc.xerox.com/masinter
>
>

>Return-Path: <[email-masked]>
>Date: Thu, 5 Jun 1997 19:31:12 PDT
>From: Larry Masinter <[email-masked]>
>Organization: Xerox PARC
>To: Robert Herriot <[email-masked]>
>Cc: [email-masked], [email-masked], [email-masked],
>        [email-masked], [email-masked], [email-masked]
>Subject: Re: IPP> Re: draft-mutz-http-attributes-02.txt
>References: <[email-masked]>
>Sender: [email-masked]
>
>> None of these solutions solve the problem of the Printer's 
>> resolutions-supported attribute which, hopefully, tells the
>> client exactly what resolutions the Printer supports without
>> any extraneous values and without a complicated structure
>> for the attribute.
>
>I think this is the same problem fax has, though.
>Why would a list of pairs of integers (x-res/y-res)
>or integer & ratio (x-res, aspect ratio) have 'extraneous
>values'? Or be a 'complicated structure'?
>
>-- 
>http://www.parc.xerox.com/masinter
>
>