简体   繁体   English

是否有人为RFC3382中描述的Internet打印协议集合记录写了BNF语法?

[英]Has anyone written out the grammar in BNF for the Internet Printing Protocol Collections record described in RFC3382?

I am having a little trouble generating the Collection records described in Internet Printing Protocol definition RFC3382. 我在生成Internet打印协议定义RFC3382中描述的收集记录时遇到了一些麻烦。 Has anyone written out the grammar in BNF? 有人用BNF编写语法吗?

It's hard to say! 很难说! I frequently research the internet about IPP and have not come across any work related to IPP and BNF (Backus-Naur-Form) so far. 我经常在Internet上研究有关IPP的内容,到目前为止,还没有涉及到与IPP和BNF(Backus-Naur-Form)有关的任何工作。

I guess the PWG IPP mailing list would be a better audience for this question. 我想PWG IPP邮件列表将是此问题的更好听众。 Most ipp implementations don't use a scanner or parser to deal with ipp messages. 大多数ipp实施都不使用扫描仪或解析器来处理ipp消息。 I assume you implement an ipp server and have covered the ipp parsing already. 我假设您实现了一个ipp服务器,并且已经介绍了ipp解析。

Sometimes it is a good approach to capture an ipp message (response) of a real printer and have a look at its byte sequence. 有时,这是捕获真实打印机的ipp消息(响应)并查看其字节序列的好方法。 On request (personal mail) I can provide such a response in binary format (including a media-col-default and media-col-database attribute) 根据请求(个人邮件),我可以以二进制格式(包括media-col-default和media-col-database属性)提供此类响应

I got an answer from the Printer Working Group (PWG) site. 我从打印机工作组(PWG)网站获得了答案。 The short answer is that a RFC-in-progress has a more precise grammar for Collections. 简短的答案是,进行中的RFC对于集合具有更精确的语法。

From Michael Sweet: 来自Michael Sweet:

There is an updated ABNF grammar in the upcoming RFC 8010 (which replaces RFCs 2910 and 3382) along with better examples that might be of some help. 即将发布的RFC 8010(代替RFC 2910和3382)中有一个更新的ABNF语法,以及可能会有所帮助的更好示例。 Here is a link to the authors' review copy (it should be published very soon!): 这是作者评论副本的链接(应该很快发布!):

 https://www.rfc-editor.org/authors/rfc8010.txt 

Sections 3.1.6 and 3.1.7 cover the encoding of the collection attribute and its member attributes, respectively. 第3.1.6节和第3.1.7节分别介绍了collection属性及其成员属性的编码。

FWIW, the "design" of collections in 3382 was done specifically to make them look like a 1setOf attribute with a mix of values so that existing clients/printers could more easily deal with them. FWIW是在3382年专门设计的集合“设计”,目的是使它们看起来像具有值混合的1setOf属性,以便现有的客户/打印机可以更轻松地处理它们。 In practice this makes supporting collections a little more difficult (and the encoding of collection values a little more verbose) than is ideal... :/ 实际上,这使支持集合比理想情况要困难一些(集合值的编码也更加冗长)...:/

(Mr Sweet, I apologize for redistributing your information without consulting you) (Sweet先生,对于在不咨询您的情况下重新分发您的信息,我深表歉意)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM