2.4.1.1 View Syntax

The formal grammar of a view XSL file is given in this specification using an Extended Backus-Naur Form (EBNF) notation. The EBNF notation is used instead of ABNF or XML schema to enhance the clarity of the constructs used in the XSLT transformation.

Notation

 SYMBOL ::= expression

Each rule in the grammar defines one symbol, in the following form:

  • Symbols are written with upper case and bold letters (SYMBOL). If a symbol has a subscript in a rule (1), the symbol MUST be expanded to the same yield in all places inside the rule (1).

  • #xN -where N is a hexadecimal integer, the expression matches the character whose number, or code point, in [ISO-10646] is N. The number of leading zeros in the #xN form is insignificant.

  • [a-zA-Z], [#xN-#xN]: Matches any character with a value in the range(s) indicated (inclusive).

  • [abc], [#xN#xN#xN]: Matches any character with a value among the characters enumerated. Enumerations and ranges can be mixed in one set of brackets.

  • [^a-z], [^#xN-#xN]: Matches any character with a value outside the range indicated.

  • [^abc], [^#xN#xN#xN]: Matches any character with a value not among the characters given. Enumerations and ranges of forbidden values can be mixed in one set of brackets.

  • "string": Matches a literal string matching that given inside the double quotes.

  • 'string': Matches a literal string matching that is given inside the single quotes.

To match more complex patterns these symbols MUST be combined as follows, where A and B represent simple expressions:

  • (expression): Expression is treated as a unit and MUST be combined as specified in this list.

  • semicolon-delimited list((expression)(, expression)*): Matches a semicolon-delimited list of expressions.

  • A?: Matches A or nothing; optional A.

  • A B: Matches A followed by B. This operator has higher precedence than alternation; thus A B | C D is identical to (A B) | (C D).

  • A | B: Matches A or B.

  • AB: Matches any string that matches A but does not match B.

  • A+: Matches one or more occurrences of A. Concatenation has higher precedence than alternation; thus A+ | B+ is identical to (A+) | (B+).

  • A*: Matches zero or more occurrences of A. Concatenation has higher precedence than alternation; thus A* | B* is identical to (A*) | (B*).

text: The text that does not match any production specified earlier MUST be interpreted as a literal. Additionally, any construct that has the same semantics in the target language ([HTML], [CSS-LEVEL1] , [W3C-XML] [XMLSCHEMA1] [XPATH] and [W3C-XSLT]) can substitute the literal text.

The order and value of element attributes in the EBNF rules MUST be interpreted in accordance with the target language.

For example in HTML, as specified in [HTML], as a target language, the following constructs are semantically equivalent:

 <span  class="xdTextBox xdBehavior_Formatting"/>
 <span CLASS="xdTextBox xdBehavior_Formatting"/>
 <span Class="xdTextBox      xdBehavior_Formatting"/>

This is true because the class attribute is specified in HTML and the syntax of the attribute is case-insensitive. Also the number of white spaces or tabs between xdTextBox and xdBehavior_Formatting is not important as long as there is at least one. The syntax for the values of class attributes MUST be as specified in [HTML] section 7.5.2.

The following productions MUST be used for the controls representation:

 ISO_646_DIGIT::= [#x0030-#x0039]
 LATIN_CHARACTER::= [#x0041-#x005A] | [#x0061- #x007a]
 SINGLE_CHARACTER  ::= LATIN_ CHARACTER | ISO_646_DIGIT
 BUTTON_POSTBACKMODEL ::= always | auto
 POSTBACKMODEL ::= never | BUTTON_POSTBACKMODEL

The semantics of the postback model values MUST be as specified in section 2.4.2.29.

CONTROL_ID: (LATIN_CHARACTER) (LATIN_CHARACTER|ISO_646_DIGIT|_)*. The value of CONTROL_ID MUST be a valid value for type xsf:xdTitle.

TEMPLATE_MODE_ID: _(ISO_646_DIGIT)*.

ANY_STRING: MUST be a value of Reference, as specified in [W3C-XML] section 4.1.

NON_EMPTY_STRING: MUST be a value of Reference, as specified in [W3C-XML] section 4.1, which contains at least one char.

XML_NAMESPACE values MUST be as specified in [XML Namespaces].

INPUT_SCOPE_ID: ANY_STRING.

INPUT_SCOPE_NAME: ANY_STRING.

INPUT_SCOPE:

 xd:inputScopeId="INPUT_SCOPE_ID" (xd:inputScope="INPUT_SCOPE_NAME")?  (xd:allowNonMatching="yes")?

The semantics of the input scope attributes MUST be as specified in section 2.4.2.21, section 2.4.2.20, and section 2.4.2.2.

ALIGN: "left" or "right".

VALIGN: "middle" or "baseline" or "bottom" or "top".

SIZE: Values MUST be as specified in [HTML] section 17.4.

ANCHOR_TEXT: Values MUST be as specified in [HTML] section 12.2. MUST NOT contain an anchor tag, as specified in [HTML] section 12.2.

FONT_COLOR: Values MUST be as specified in [HTML] section 15.2.2.

FONT_FACE: Values MUST be as specified in [HTML] section 15.2.2.

XML_TO_EDIT_NAME: Nmtoken, as specified in [W3C-XML] and MUST match the name of a corresponding xmlToEdit entry, as specified in section 2.4.2.36, in the XSF file.

TAB_INDEX<4>: "-1" or as specified in [HTML] section 17.11.

HEIGHT: Value pairs MUST be as specified in [HTML] section 13.7.1.

MIN_HEIGHT: Values MUST be as specified in [CSS-LEVEL2] section 10.7.

WIDTH: Value pairs MUST be as specified in [HTML] section 13.7.1.

COLSPAN: Value pairs MUST be as specified in [HTML] section 11.2.6.

ROWSPAN: Value pairs MUST be as specified in [HTML] section 11.2.6.

STYLE_SIZE: Value pairs MUST be as specified by [HTML] section 17.4 and [CSS-LEVEL1] sections 5.5.23 and 5.5.24.

STYLE_WIDTH: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.5.23.

STYLE_HEIGHT: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.5.24.

CSS1_STYLE: Values MUST be as specified in [CSS-LEVEL1].

STYLE_DISPLAY_NONE: DISPLAY: none, as specified in [CSS-LEVEL1] section 5.6.1.

STYLE_MARGIN: Value pairs MUST be as specified in [CSS-LEVEL1] sections 5.5.1, 5.5.2, 5.5.3, 5.5.4, and 5.5.5.

STYLE_PADDING: Value pairs MUST be as specified in [CSS-LEVEL1] sections 5.5.6, 5.5.7, 5.5.8, 5.5.9, and 5.5.10.

STYLE_TEXT_DECORATION: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.4.3.

STYLE_BACKGROUND_COLOR: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.3.2.

STYLE_BORDER: Value pairs MUST be as specified in [CSS-LEVEL1] sections 5.5.11, 5.5.12, 5.5.13, 5.5.14, 5.5.15, 5.5.16, 5.5.17, 5.5.18, 5.5.19, 5.5.20, 5.5.21, and 5.5.22.

STYLE_BORDER_STYLE: Value pairs MUST be as specified in [CSS-LEVEL2] section 8.5.3.

STYLE_BORDER_COLLAPSE: Value pairs MUST be as specified in [CSS-LEVEL2] section 17.6.

STYLE_FONT: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.2.

STYLE_FONT_STYLE: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.2.3.

STYLE_FONT_FAMILY: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.2.2.

STYLE_FONT_SIZE: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.2.6.

STYLE_COLOR: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.3.1.

STYLE_FONT_WEIGHT: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.2.5.

STYLE_TEXT_ALIGN: Value pairs MUST be as specified in [CSS-LEVEL1] section 5.4.6

STYLE_WRAP: WHITE-SPACE: normal or WHITE-SPACE: nowrap; WORD-WRAP: normal

STYLE_OVERFLOW: Value pairs MUST be as specified in [CSS-LEVEL2] section 11.1.1.

STYLE_VERTICAL_ALIGN: VERTICAL-ALIGN: ("sub" or "super").

STYLE_DIRECTION: (DIRECTION: ltr) or (DIRECTION: rtl).

STYLE_DISABLE_CHILD_XML_TO_EDIT:

 msos-(xOptional|xCollection)-XML_TO_EDIT_NAME-editing:disabled;

STYLE_CAPTION: caption: NON_EMPTY_STRING(;valid: false). STYLE_CAPTION contains one required sub caption. Its name is caption and its value is NON_EMPTY_STRING. STYLE_CAPTION also contains one optional sub caption. Its name is valid, and its value is false.

STYLE_XD_BACKGROUND_COLOR:= xdBackgroundColor: Value MUST be as specified in [CSS-LEVEL1] section 5.3.2.

LEAF_CONTROL_CONDITIONAL_FORMATTING_CAPTION: Semicolon-delimited list of ((STYLE_DISPLAY_NONE | (STYLE_FONT?, STYLE_COLOR?, STYLE_BACKGROUND_COLOR?, STYLE_TEXT_DECORATION?)), STYLE_CAPTION)

AUX_DOM_SOURCE_NAME: (LATIN_CHARACTER |_) (LATIN_CHARACTER|ISO_646_DIGIT|_)*. The value of AUX_DOM_SOURCE_NAME MUST be a valid name attribute of the dataObject element, as specified in section 2.2.1.2.17.

LEAF_XPATH: MUST be an extended location XPath expression, as specified in [XPATH], and MUST use only the child and attribute XPath axes, as specified in [XPATH] section 2.2. The generated node-set MUST have only 1 element. The XPath expression MUST be a relative or absolute XPath. To alter the context of the XPath evaluation, the xdXDocument:getDOM function, as specified in section 2.4.3.9.2, MUST be used before the first XPath step.

GROUP_XPATH: MUST be an extended location XPath expression and MUST use only the child XPath axes, as specified in [XPATH] section 2.2. There are no restrictions for the number of elements in the generated node-set. The XPath MUST be a relative or absolute XPath. To alter the context of the XPath evaluation, the xdXDocument:getDOM function MUST be used before the first XPath step.

RELATIVE_REPEATING_GROUP_XPATH: MUST be a location XPath expression and MUST use only the child XPath axes, as specified in [XPATH] section 2.2. There are no restrictions for the number of elements in the generated node-set. The XPath expression MUST be a relative XPath.

RELATIVE_GROUP_XPATH: MUST be an extended location XPath expression and MUST use only the child XPath axes, as specified in [XPATH] section 2.2. There are no restrictions for the number of elements in the generated node-set. The XPath expression MUST be a relative XPath.

RELATIVE_LEAF_XPATH: MUST be a location XPath expression and MUST use only the child and attribute XPath axes, as specified in [XPATH] section 2.2. The XPath expression MUST be a relative XPath.

REPEATING_LEAF_XPATH: MUST be an extended location XPath expression, as specified in [XPATH] and MUST use only the child and attribute XPath axes, as specified in [XPATH] section 2.2. There are no restrictions for the number of elements in the generated node-set. The XPath expression MUST be a relative or absolute XPath. To alter the context of the XPath evaluation, the xdXDocument:getDOM function MUST be used before the first XPath step.

PREDICATE_XPATH: MUST be an expression XPath expression. The predicate expression MUST NOT use the following functions:

  • position()

  • last()

  • The [n] syntax where n is a positive integer.

The expression MUST NOT contain user-defined variable references, as specified in [XPATH] section 2.4.

BOOLEAN_XPATH_EXPRESSION: MUST be an XPath expression that yields an object that MUST be a Boolean basic type. Boolean is specified in [XPATH] section 3.4. To extend the syntax of XPath expression, the XSL function extensions specified in section 2.4.3 MUST be used. The XPath expression MUST be less than 100 in depth. It MUST NOT use position and last functions, as specified in [XPATH] section 4.1. It MUST NOT use XPath predicates. XPath predicates are specified in [XPATH] section 2.4.

STRING_XPATH_EXPRESSION: MUST be an XPath expression that yields an object that has a String basic type. String is specified in [XPATH] section 3.6. To extend the syntax of XPath expressions, the XSL function extensions specified in section 2.4.3 MUST be used. The XPath expression MUST be less than 100 in depth. It MUST NOT use position and last functions, as specified in [XPATH] section 4.1. It MUST NOT use XPath predicates. XPath predicates are specified in [XPATH] section 2.4.

HIDDEN_FORMATTING_CAPTION: (xd:caption_(ISO_646_DIGIT)+="NON_EMPTY_STRING")+. The first instance of the attribute MUST be named "xd:caption_0" and subsequent instances MUST be named with consecutive integers. The value of this attribute MUST be ignored by the form server. See section 2.4.2.37.11 for more details.

CHECK_FOR_GETDOM_BEGIN:

 (<xsl:if test="function-available('xdXDocument:getDOM')">)?.

CHECK_FOR_GETDOM_END:

 (</xsl:if>)?.

CHECK_FOR_GETDOM_BEGIN and CHECK_FOR_GETDOM_END symbols appear in pairs in the EBNF rules in the following sections. Subscripts are used to mark the pairs.

If the yield of CHECK_FOR_GETDOM_BEGIN in one production is empty, the yield of the pairing CHECK_FOR_GETDOM_END MUST be empty.

If the yield of CHECK_FOR_GETDOM_END in one production is empty, the yield of the pairing CHECK_FOR_GETDOM_BEGIN MUST be empty.

FONT: ANY_STRING without a comma.

FONT_ITALIC: Specifies if the text is shown in italic or not. The following table lists the possible values and explanations.

Value

Description

"0"

not italic

"1"

Italic

FONT_SIZE: All integers and all real numbers, ending in .5, between 1 and 2000, inclusive.

FONT_STRIKETHROUGH: Specifies if the text is shown with a strike though line or not. The following table lists the possible values and explanations.

Value

Description

"0"

no strike through

"1"

strike through

FONT_UNDERLINE: Specifies if the text shown is underlined or not. The following table lists the possible values and explanations.

Value

Description

"0"

not underlined

"1"

Underlined

FONT_WEIGHT: Specifies if the text shown is bold or not. The following table lists the possible values and explanations.

Value

Description

"400"

not bold

"700"

Bold

CHARACTER_SET: ANY_STRING without a comma.