Closed GladeDiviney closed 4 years ago
Another idea from #58 is to add a priority to each attribute type, but ordering requirements only apply to the operation group, and only to tiny fraction of available attributes. So a few special-case builders are perhaps a simpler approach.
I think only attributes-charset
and attributes-natural-language
needs be taken care of (1st and 2nd). Otherwise the order should not have an impact. You should handle those attribute values more specific anyway. To me it makes sense to exclude them from the generic handling.
In theory, I agree with you on attributes-charset
. In practice, are there really implementations that don't use utf-8
? Seems pretty ubiquitous these days, and it's required for both clients and printers as per https://tools.ietf.org/html/rfc8011#section-4.1.4.1.
https://tools.ietf.org/html/rfc8011#section-4.1.4 specifies required ordering for
attributes-charset
,attributes-natural-language
,*-uri
andjob-id
attributes.But
groupOf
, while flexible, allows you to toss any old order in there.Let's add these to the DSL:
An error would be thrown if the "others" attributes were to contain attributes-charset, attributes-natural-language, or any out-of-order -uri attributes.