Confirmed users
716
edits
No edit summary |
|||
| Line 16: | Line 16: | ||
Both the '''xslt-param''' and the '''xslt-param-namespace''' PIs must appear in the prolog of the document, i.e. before the first element tag. All PIs in the prolog must be honored, both ones occuring before and onces occuring after any xml-stylesheet PIs. | Both the '''xslt-param''' and the '''xslt-param-namespace''' PIs must appear in the prolog of the document, i.e. before the first element tag. All PIs in the prolog must be honored, both ones occuring before and onces occuring after any xml-stylesheet PIs. | ||
If there are multiple xml-stylesheet PIs the parameters apply to all stylesheet as a consequence of that all stylesheets are imported into a single stylesheet per the XSLT spec. | |||
=== xslt-param === | === xslt-param === | ||
| Line 40: | Line 42: | ||
* The context position is the position of the context node in the initial current node list used when executing the stylesheet. | * The context position is the position of the context node in the initial current node list used when executing the stylesheet. | ||
* The context size is the size of the initial current node list used when executing the stylesheet. | * The context size is the size of the initial current node list used when executing the stylesheet. | ||
* | * Variables: see TODO. | ||
* The function library is the standard XPath function library. | * The function library is the standard XPath function library. | ||
* The namespace declarations are determined by the xslt-param-namespace PIs, see below. | * The namespace declarations are determined by the xslt-param-namespace PIs, see below. | ||
| Line 58: | Line 60: | ||
If either '''prefix''' or '''namespace''' is missing or empty the PI is ignored. If '''prefix''' is not a valid NCName it is ignored. | If either '''prefix''' or '''namespace''' is missing or empty the PI is ignored. If '''prefix''' is not a valid NCName it is ignored. | ||
== TODO == | |||
Should we allow variable references in the expression? The current patch for mozilla does allow any toplevel variable and parameter in the stylesheet, but it might be a tough requirement on other XSLT engines. Especially since that allows any parameter to reference any other parameter so evaluation order is tricky. | |||
Should we allow any XSLT functions in the expression? document() seems useful, but it seems tricky to maintain the invariant that generate-id() should produce the same string for the same document. | |||