: Selection(Ctrl-A)
: Selection(DragAndDrop)
: UI movingHandlers

What is it and TODO's (click me)

XML parse XPath exec XSLT exec step (ms)
log check
Start at: Stop at: Exec.(ms):
RawView TreeView


Some notes

Extensions:

XPath
extending standart XPath functions with own function(s)

	exxpfn = jsX.xpath.FunctionCallExpr.prototype.xpathfunctions
	exxpfn.myOwn = function(ctx){return new NumberValue(1234) }
	exxpfn.myOwn()
	

XSLT
extending standart XSLT with own script function(s)

    <xsl:script type="text/javascript" name="counting" function="init read incr"></xsl:script>
	
	....
	
	  <xsl:script-value-of name="counting" function="read">
            <xsl:with-param name="name" select="'index'"/>
	  </xsl:script-value-of>
	
	....
	
	  <xsl:call-script name="counting" function="incr">
            <xsl:with-param name="name" select="'index'"/>
	  </xsl:call-script>
	

5.2 Patterns

Template rules identify the nodes to which they apply by using a pattern. As well as being used in template rules, patterns are used for numbering (see [7.7 Numbering]) and for declaring keys (see [12.2 Keys]). A pattern specifies a set of conditions on a node. A node that satisfies the conditions matches the pattern; a node that does not satisfy the conditions does not match the pattern. The syntax for patterns is a subset of the syntax for expressions. In particular, location paths that meet certain restrictions can be used as patterns. An expression that is also a pattern always evaluates to an object of type node-set. A node matches a pattern if the node is a member of the result of evaluating the pattern as an expression with respect to some possible context; the possible contexts are those whose context node is the node being matched or one of its ancestors.

Here are some examples of patterns:

5.5 Conflict Resolution for Template Rules

It is possible for a source node to match more than one template rule. The template rule to be used is determined as follows:

  1. First, all matching template rules that have lower import precedence than the matching template rule or rules with the highest import precedence are eliminated from consideration.

  2. Next, all matching template rules that have lower priority than the matching template rule or rules with the highest priority are eliminated from consideration. The priority of a template rule is specified by the priority attribute on the template rule. The value of this must be a real number (positive or negative), matching the production Number with an optional leading minus sign (-). The default priority is computed as follows:

    • If the pattern contains multiple alternatives separated by |, then it is treated equivalently to a set of template rules, one for each alternative.

    • If the pattern has the form of a QName preceded by a ChildOrAttributeAxisSpecifier or has the form processing-instruction(Literal) preceded by a ChildOrAttributeAxisSpecifier, then the priority is 0.

    • If the pattern has the form NCName:* preceded by a ChildOrAttributeAxisSpecifier, then the priority is -0.25.

    • Otherwise, if the pattern consists of just a NodeTest preceded by a ChildOrAttributeAxisSpecifier, then the priority is -0.5.

    • Otherwise, the priority is 0.5.

    Thus, the most common kind of pattern (a pattern that tests for a node with a particular type and a particular expanded-name) has priority 0. The next less specific kind of pattern (a pattern that tests for a node with a particular type and an expanded-name with a particular namespace URI) has priority -0.25. Patterns less specific than this (patterns that just tests for nodes with particular types) have priority -0.5. Patterns more specific than the most common kind of pattern have priority 0.5.

It is an error if this leaves more than one matching template rule. An XSLT processor may signal the error; if it does not signal the error, it must recover by choosing, from amongst the matching template rules that are left, the one that occurs last in the stylesheet.


Code: Theme:
@ :
]]>