2.4.1.1 View Syntax

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

Notation

Each rule in the grammar defines one symbol, in the form.

SYMBOL::= expression

Symbols are written with capital 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 (1) 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 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.

A – B: 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 (1) MUST be interpreted in accordance with the target language.

For example, 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 post back model values MUST be as specified in section 2.4.2.29.

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

TEMPLATE_MODE_ID: MUST be _(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 that contains at least one char.

XML_NAMESPACE: Values MUST be as specified in [XML Namespaces].

INPUT_SCOPE_ID: MUST be ANY_STRING.

INPUT_SCOPE_NAME: MUST be ANY_STRING.

INPUT_SCOPE: MUST be the following:

 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: MUST be "left" or "right".

VALIGN: MUST be one of the following values:

  • "middle"

  • "baseline"

  • "bottom"

  • "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.

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

TAB_INDEX<4>: MUST be "-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 in [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] sections 5.5.23.

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

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

STYLE_DISPLAY_NONE: MUST be "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, 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, 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, 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_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 | 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 | super)

STYLE_DIRECTION: (DIRECTION: ltr) | (DIRECTION: rtl)

STYLE_DISABLE_CHILD_XML_TO_EDIT:

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

LEAF_CONTROL_CONDITIONAL_FORMATTING_CAPTION: STYLE_DISPLAY_NONE | semicolon delimited list of (STYLE_FONT?, STYLE_COLOR?, STYLE_BACKGROUND_COLOR?, STYLE_TEXT_DECORATION?)

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 dataObject (section 2.2.36).

LEAF_XPATH: MUST be an extended location XPath expression, which MUST NOT contain XPath predicates, as specified in [XPATH] section 2.4, 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 expression. To alter the context of the XPath expression evaluation, the xdXDocument:GetDOM function (section 2.4.3.9.2) MUST be used before the first XPath expression step.

GROUP_XPATH: MUST be an extended location XPath expression, which MUST NOT contain XPath predicates, as specified in [XPATH] section 2.4, 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 or absolute XPath expression. To alter the context of the XPath evaluation, the xdXDocument:GetDOM function (section 2.4.3.9.2) MUST be used before the first XPath expression step.

RELATIVE_REPEATING_GROUP_XPATH: MUST be a location XPath expression that MUST NOT contain XPath predicates, as specified in [XPATH] section 2.4, 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 expression.

RELATIVE_GROUP_XPATH: MUST be an extended location XPath expression that MUST NOT contain XPath predicates, as specified in [XPATH] section 2.4, 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 expression.

RELATIVE_LEAF_XPATH: MUST be a location XPath expression that MUST NOT contain XPath predicates, as specified in [XPATH] section 2.4, 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 expression.

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 the 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 the position and last functions specified in [XPATH] section 4.1. It MUST NOT use XPath predicates, as 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 the position and last functions specified in [XPATH] section 4.1. It MUST NOT use XPath predicates, as specified in [XPATH] section 2.4.

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 always 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.