Printer Services Mail Archive: PS> Revised PWG std MIME para

PS> Revised PWG std MIME parameters ABNF (23 Oct 2002)

From: McDonald, Ira (imcdonald@sharplabs.com)
Date: Wed Oct 23 2002 - 19:10:37 EDT

  • Next message: McDonald, Ira: "PS> Further Revised PWG std MIME parameters ABNF (25 Oct 2002)"

    Hi folks, Wednesday (23 October 2002)

    [Per my action item from the PWG PSI Telecon on 8 October 2002)]

    After talking with Tom Hastings about CIP4 JDF needs, some revised ABNF
    for IEEE/ISTO "IPP: PWG Standard MIME Parameters for Document Formats".
    All but one of these parameters were derived from the InterpreterTable
    defined in Printer MIB [RFC 1759].

    Problem Statement: Registered MIME types (for example, used as values
    of the 'document-format' Job attribute in IPP/1.1 [RFC 2910, RFC 2911])
    are imprecise. PWG PSI, CIP4 JDF, FSG PAPI, and FSG Job Ticket working
    groups have all identified a requirement for document format metadata.

    Rejected Solution: A data structure with the required metadata - works
    well within a given interface - but incompatible with 'cut-and-paste'.

    Proposed Solution: PWG standard optional MIME parameters - may be
    appended to _any_ registered MIME type to add the required metadata -
    compatible with 'cut-and-paste' across all applications (because the
    parameters are actually _part of_ the same MIME type "word" in the
    source text).

    Tom Hastings and I plan to write IEEE/ISTO 5100.10 "IPP: PWG Standard
    MIME Parameters for Document Formats". Watch for an announcement.

    Cheers,
    - Ira McDonald, co-editor of Printer MIB v2
      High North Inc

    ------------------------------------------------------------------------
                    [PWG Standard MIME Parameters]

    In the printer industry, a document format MIME type is one of:

    (a) PDL - page description language (e.g., HTML or Adobe PostScript)
    (b) JCL - job control language (e.g., HP PJL)
    (c) JDL - job definition language (e.g., CIP4 JDF)
    (d) text - plaintext, richtext, HTML, SGML, XML, etc.

    Any PWG standard MIME parameter MAY be appended (unordered) to any
    document format, for example:

      application/vnd.hp-pcl;pwg-lang-res="400,400,dpi" (HP PCL 400x400 dpi)

    These PWG parameters are specified in Augmented Backus-Naur Form (ABNF,
    RFC 2234). Every element used in one of these PWG parameter ABNF
    productions is defined in an excerpt from ABNF (RFC 2234), MIME Part One
    (RFC 2045), or Internet Message Format (RFC 2822) at the end of this
    note.

    Each parameter name begins with a "pwg-" (namespace) prefix, to ensure
    that it is safely ignored by existing MIME-enabled software and systems.

    According to RFC 2045:

    (1) Parameters MUST be ignored when unrecognized;
    (2) Parameters MUST be ignored when comparing values of MIME types;
    (3) MIME type names MUST be treated as case-insensitive;
    (4) MIME parameter names MUST be treated as case-insensitive;
    (5) MIME parameter values MUST be treated as case-sensitive.

    document-format = type "/" subtype *[parameter] *[pwg-parameter]
                    ; MIME type (plus optional parameters)

    pwg-parameter = ";" pl-level / pl-build / pl- prof / pl-desc / pl-res
                    ; PWG standard parameter with a 'quoted-string' value

    Desc: Document format

    See: Section 5.1 in MIME Part One [RFC 2045]
            for ABNF definition of 'type', 'subtype', and 'parameter'
    See: Section 4.1.9 in IPP/1.1 Model and Semantics [RFC 2911]
            for definition of 'mimeMediaType' syntax

    pl-level = "pwg-lang-level" "=" quoted-string

    Desc: Language level (not applicable for 'text/plain').
            Human-readable information, suitable for client UI and debug.
            Not suitable for use by automata.

    See: Section 3.2.5 of Internet Message Formats [RFC 2822]
            for ABNF definition of 'quoted-string'
    See: Section 19 'The Interpreter Group' in Printer MIB [RFC 1759]
            for definition of 'prtInterpreterLangLevel'

    Examples:

      application/postscript;pwg-lang-level="2" (Adobe PostScript Level 2)

      application/vnd.hp-pcl;pwg-lang-level="5e" (HP PCL 5e)

      application/vnd.cip4-jdf+xml;pwg-lang-level="1.1" (CIP4 JDF 1.1)

    pl-prof = "pwg-lang-profile" "=" quoted-string

    Desc: Language profile (not applicable for 'text/plain').
            Human-readable information, suitable for client UI and debug.
            Not suitable for use by automata.

    See: Section 3.2.5 of Internet Message Formats [RFC 2822]
            for ABNF definition of 'quoted-string'

    Examples:

      application/pdf;pwg-lang-profile="ISO-15930-3" (PDF-X3:2002)

    pl-build = "pwg-lang-build" "=" quoted-string

    Desc: This implementation's build ID (i.e., date code or version).
            Human-readable information, suitable for client UI and debug.
            Not suitable for use by automata.

    See: Section 3.2.5 of Internet Message Formats [RFC 2822]
            for ABNF definition of 'quoted-string'
    See: Section 19 'The Interpreter Group' in Printer MIB [RFC 1759]
            for definition of 'prtInterpreterLangVersion'

    Examples:

      application/vnd.hp-pcl;pwg-lang-build="20021025" (HP PCL)

      application/postscript;pwg-lang-build="AP4027.45..3" (Adobe PS)

    pdl-lang-res = "pwg-lang-resolution" "=" res-value

    res-value = DQUOTE res-xfeed "," res-feed "," res-units DQUOTE
                    ; quoted string

    res-xfeed = 1*DIGIT
                    ; cross-feed direction resolution

    res-feed = 1*DIGIT
                    ; feed direction resolution

    res-units = "dpi" / "dpcm"
                    ; resolution units of dots/inch or dots/centimeter

    Desc: Language resolution, expressed as "xfeed,feed,units".
            Human-readable information, suitable for client UI and debug.
            Also suitable for use by automata.

    See: Section 3.2.5 of Internet Message Formats [RFC 2822]
            for ABNF definition of 'quoted-string'
    See: Section 4.2.12 in IPP/1.1 Model and Semantics [RFC 2911]
            for definition of 'printer-resolution'
    See: Section 19 'The Interpreter Group' in Printer MIB [RFC 1759]
            for definition of 'prtInterpreterXFeedAddressability'
            and 'prtInterpreterFeedAddressability'
    See: Section 14 'The Marker Group' in Printer MIB [RFC 1759]
            for definition of 'prtMarkerAddressabilityUnit'

    Examples:

      application/postscript;pwg-lang-res="300,600,dpi" (300x600 dpi)

      application/vnd.hp-pcl;pwg-lang-res="400,400,dpi" (400x400 dpi)

    pl-desc = "pwg-lang-desc" "=" quoted-string

    Desc: Language description.
            Human-readable information, suitable for client UI and debug.
            Not suitable for use by automata.

    Note: This parameter should be _last_, since embedded whitespace may
            terminate 'cut-and-paste'.

    See: Section 3.2.5 of Internet Message Formats [RFC 2822]
            for ABNF definition of 'quoted-string'
    See: Section 19 'The Interpreter Group' in Printer MIB [RFC 1759]
            for definition of 'prtInterpreterDescription'

    Examples:

      application/postscript;pwg-lang-desc="Adobe PostScript Level 2"

      application/vnd.hp-pcl;pwg-lang-desc="HP PCL Level 5e - 25 Oct 2002"

    The following Interpreter attributes from the Printer MIB are omitted
    (for the reasons noted below):

    'prtInterpreterLangFamily'
        - language family (i.e., simple MIME type)
        - see 'document-format' in IPP/1.1 Model [RFC 2911]

    'prtInterpreterVersion'
        - more free-form interpreter language version info
        - redundant with 'prtInterpreterLangVersion' in Printer MIB

    'prtInterpreterDefaultOrientation'
        - default orientation (portrait or landscape)
        - see "orientation-requested-default" in IPP/1.1 Model [RFC 2911]

    'prtInterpreterDefaultCharSetIn'
        - default input charset (to avoid charset 'guessing')
        - see 'charset-configured' in IPP/1.1 Model [RFC 2911]

    'prtInterpreterDefaultCharSetOut'
        - default output charset,
        - only useful for softcopy output (i.e., 'print-to-file')
        - not supported in IPP/1.1 Model [RFC 2911]

    'prtInterpreterTwoWay'
        - indicates support for bidirectional print channel
        - not supported in IPP/1.1 Model [RFC 2911]

    ------------------------------------------------------------------------
    [from "MIME Part Two: Media Types", RFC 2046]

    > Parameters are modifiers of the media subtype, and as such do not
    > fundamentally affect the nature of the content. The set of
       meaningful parameters depends on the media type and subtype. Most
       parameters are associated with a single specific subtype. However, a
       given top-level media type may define parameters which are applicable
       to any subtype of that type. Parameters may be required by their
    > defining media type or subtype or they may be optional. MIME
    > implementations must also ignore any parameters whose names they do
    > not recognize.

    ------------------------------------------------------------------------
    [from "Augmented BNF for Syntax Specifications (ANBF)", RFC 2234]

    DIGIT = %x30-39

    DQUOTE = %x22

    ------------------------------------------------------------------------
    [from "MIME Part One: Format of Internet Message Bodies", RFC 2045]

    parameter = attribute "=" value
      
    attribute = token
                 ; Matching of attributes
                 ; is ALWAYS case-insensitive.

    value = token / quoted-string

    token = 1*<any (US-ASCII) CHAR except SPACE, CTLs,
                or tspecials>

    tspecials = "(" / ")" / "<" / ">" / "@" /
                  "," / ";" / ":" / "\" / <">
                  "/" / "[" / "]" / "?" / "="
                  ; Must be in quoted-string,
                  ; to use within parameter values

    ------------------------------------------------------------------------
    [from "Internet Message Format", RFC 2822]

    quoted-string = [CFWS]
                            DQUOTE *([FWS] qcontent) [FWS] DQUOTE
                            [CFWS]

       A quoted-string is treated as a unit. That is, quoted-string is
       identical to atom, semantically. Since a quoted-string is allowed to
       contain FWS, folding is permitted. Also note that since quoted-pair
       is allowed in a quoted-string, the quote and backslash characters may
       appear in a quoted-string so long as they appear as a quoted-pair.

       Semantically, neither the optional CFWS outside of the quote
       characters nor the quote characters themselves are part of the
       quoted-string; the quoted-string is what is contained between the two
       quote characters. As stated earlier, the "\" in any quoted-pair and
       the CRLF in any FWS/CFWS that appears within the quoted-string are
       semantically "invisible" and therefore not part of the quoted-string
       either.

    <...>

    CFWS = *([FWS] comment) (([FWS] comment) / FWS)

    FWS = ([*WSP CRLF] 1*WSP) / ; Folding white space
                            obs-FWS

    ctext = NO-WS-CTL / ; Non white space controls

                            %d33-39 / ; The rest of the US-ASCII
                            %d42-91 / ; characters not including "(",
                            %d93-126 ; ")", or "\"

    ccontent = ctext / quoted-pair / comment

    comment = "(" *([FWS] ccontent) [FWS] ")"

       Throughout this standard, where FWS (the folding white space token)
       appears, it indicates a place where header folding, as discussed in
       section 2.2.3, may take place. Wherever header folding appears in a
       message (that is, a header field body containing a CRLF followed by
       any WSP), header unfolding (removal of the CRLF) is performed before
       any further lexical analysis is performed on that header field
       according to this standard. That is to say, any CRLF that appears in
       FWS is semantically "invisible."

       A comment is normally used in a structured field body to provide some
       human readable informational text. Since a comment is allowed to
       contain FWS, folding is permitted within the comment. Also note that
       since quoted-pair is allowed in a comment, the parentheses and
       backslash characters may appear in a comment so long as they appear
       as a quoted-pair. Semantically, the enclosing parentheses are not
       part of the comment; the comment is what is contained between the two
       parentheses. As stated earlier, the "\" in any quoted-pair and the
       CRLF in any FWS that appears within the comment are semantically
       "invisible" and therefore not part of the comment either.

       Runs of FWS, comment or CFWS that occur between lexical tokens in a
       structured field header are semantically interpreted as a single
       space character.

    ------------------------------------------------------------------------



    This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 19:11:01 EDT