JSP规范

以下是资料介绍,如需要完整的请充值下载. 本资料已审核过,确保内容和网页里介绍一致.  
无需注册登录,支付后按照提示操作即可获取该资料.
资料介绍:

 

JSP.1.3.10 JSP句法语法这个部分提出JSP简单的EBNF语法,它提供简明的句法概要并解决所有句法二义性,其它部分对句法进一步进行制约。例如,制约一个合法属性值页的方向性。其它语法在解决句法问题时采取优先次序的方法。这个语法的记法和第六章XML1.0规格描述是相同的,可利用在以下路径::http://www.w3c.org/TR/2000/REC-xml-20001006#sec-notation 另外, 也适用于以下注释和规则: l JSPPage由JSP页的根产生。 l XML前缀:: 被使用到定义在XML 1.0 规格的一个EBNF。参见http://www.w3.org/TR/REC-xml. l 解决语法二义性同样也适用这个问题, 必需要遵循生产的第一匹配。 l 如果< TRANSLATION_ERROR > 生产被跟随, 页无效,并且结果将是翻译错误。 l 许多生产利用XML样式属性,这些属性按顺序出现,由whitespace从彼此分离, 但属性不能重覆多次使用。 l 使这些XML样式属性规格更加简明和更加容易读, 句法ATTR[attrset]被使用在EBNF语句中,去定义一套被认可的,特殊属性的XML生产。在方括号(attrset之内)列出一张用逗号分离的名单,casesensitive是合法的属性名字。每个属性名代表一个唯一XML属性。如果属性名加前缀=, 生产属性(下面被定义)必须被匹配(接受rtexprvalue或静止价值) ,否则, NonRTAttribute生产必须被匹配(唯一静态价值被接受)。如果属性名被加前缀a!, 为了和这生产匹配该属性必须要出现。如果属性以名字匹配生产属性,而这个名字不出现在任何其它属性中, 则生产不被匹配。例如, 考虑一个含ATTR的生产[ !name, =value,=!repeat ], 只有当以下所有条件为真,这个生产将被匹配:

外文原文 JSP.1.3.10 JSP Syntax Grammar This section presents a simple EBNF grammar for the JSP syntax. The grammaris intended to provide a concise syntax overview and to resolve any syntax ambiguities present in this specification. Other sections may apply further restrictions to this syntax, for example to restrict what represents a valid attribute value for a page directive. In all other cases the grammar takes precedence in resolving syntax questions. The notation for this grammar is identical to that described by Chapter 6 of the XML 1.0 specification, available at the following URL: http://www.w3c.org/TR/2000/REC-xml-20001006#sec-notation In addition, the following notes and rules apply: • The root production for a JSP page is JSPPage. • The prefix XML:: is used to refer to an EBNF definition in the XML 1.0 specification.Refer to http://www.w3.org/TR/REC-xml. • Where applicable, to resolve grammar ambiguities, the first matching production must always be followed. This is commonly known as the “greedy” algorithm. • If the production is followed, the page is invalid,and the result will be a translation error. • Many productions make use of XML-style attributes. These attributes can appear in any order, separated from each other by whitespace, but no attribute can be repeated more than once. To make these XML-style attribute specifica tions more concise and easier to read, the syntax ATTR[attrset] is used in the EBNF to define a set of XML attributes that are recognized in a particular production. Within the square brackets (attrset) is listed a comma-separated list of casesensitive attribute names that are valid. Each attribute name represents a single XML attribute. If the attribute name is prefixed with an =, the production Attribute (defined below) must be matched (either a rtexprvalue or a static value is accepted). If not, the production NonRTAttribute must be matched (only static values are accepted). If the attribute name is prefixed with a !, the attribute is required and must appear in order for this production to be matched. If an attribute that matches the Attribute production with a name not listed appears adjacent to any of the other attributes, the production is not matched. For example, consider a production that contains ATTR[ !name, =value,=!repeat ]. This production is matched if and only if all of the following hold true: • The name attribute appears exactly once and matches the NonRTAttribute production. • The value attribute appears at most once. If it appears, the Attribute production must be matched.