The XSLT elements from the W3C Recommendation (XSLT Version 1.0).
À´×ÔW3C²Î¿¼±ê×¼Ëù¶¨Ò壨XSLT°æ±¾1.0£©µÄXSLTÔªËØ¡£
XSLT Elements
XSLTÔªËØ
The links in the "Element" column point to attributes and more useful information about each specific element.
“ÔªËØ”ÁÐÖеÄÁ´½ÓÖ¸³öÿ¸öÌØÊâÔªËØµÄÊôÐԺ͸ü¶àÓÐÓõÄÐÅÏ¢¡£
- N: indicates the earliest version of Netscape that supports the tag
N: Ö¸³öNetscape×îÔç°æ±¾µÄÖ§³Ö±êÇ©¡£ - IE: indicates the earliest version of Internet Explorer that supports the tag
IE: Ö¸³ö×îÔçµÄÖ§³Ö±êÇ©µÄIE°æ±¾¡£
Note: Elements supported in IE 5 may have NON-standard behavior, because IE 5 was released before XSLT became an official W3C Recommendation.
×¢Òâ: ÔÚIE5Öб»Ö§³ÖµÄÔªËØ¿ÉÄܺ¬ÓзDZê×¼µÄÐÐΪ£¨NON-standard behavior£©£¬ÒòΪIE5ÔÚXSLT³ÉΪW3CµÄ¹Ù·½²Î¿¼±ê׼֮ǰ¾ÍÒѾ·¢²¼ÁË¡£
| Element ÔªËØ |
Description ÃèÊö |
IE | N |
|---|---|---|---|
| apply-imports | Applies a template rule from an imported style sheet Ó¦ÓÃÊäÈëÑùʽ±íµÄÄ£°æ¹æÔò |
6.0 | |
| apply-templates | Applies a template rule to the current element or to the current element's child nodes °ÑÄ£°æ¹æÔòÓ¦Óõ½µ±Ç°ÔªËØ»òµ±Ç°ÔªËصÄ×ÓÔªËØ |
5.0 | 6.0 |
| attribute | Adds an attribute Ìí¼ÓÊôÐÔ |
5.0 | 6.0 |
| attribute-set | Defines a named set of attributes ¶¨ÒåÖ¸¶¨ÊôÐÔ |
6.0 | 6.0 |
| call-template | Calls a named template µ÷ÓÃÖ¸¶¨Ä£°æ |
6.0 | 6.0 |
| choose | Used in conjunction with <when> and <otherwise> to express multiple conditional tests ͨ¹ýÓë<when> ºÍ<otherwise>ÅäºÏʹÓÃÀ´±í´ï¶àÖÖÌõ¼þ²âÊÔ |
5.0 | 6.0 |
| comment | Creates a comment node in the result tree ÔÚ½á¹ûÊ÷Öд´½¨Ò»¸ö×¢Êͽڵã |
5.0 | 6.0 |
| copy | Creates a copy of the current node (without child nodes and attributes) ¸´ÖÆÕýÈ·½Úµã£¨²»ÐèÒª×Ó½ÚµãºÍÊôÐÔ£© |
5.0 | 6.0 |
| copy-of | Creates a copy of the current node (with child nodes and attributes) ¸´ÖÆÕýÈ·½Úµã£¨ÐèÒª×Ó½ÚµãºÍÊôÐÔ£© |
6.0 | 6.0 |
| decimal-format | Defines the characters and symbols to be used when converting numbers into strings, with the format-number() function ¶¨Òå×Ö·ûºÍ·ûºÅ£¨ÔÚͨ¹ýformat-number() º¯Êý£¬°ÑÊý×Öת»»³É×Ö·ûµÄÇé¿öÏ£© |
6.0 | |
| element | Creates an element node in the output document ÔÚÊä³öÎĵµÖд´½¨Ò»¸öÔªËØ½Úµã |
5.0 | 6.0 |
| fallback | Specifies an alternate code to run if the processor does not support an XSLT element Èç¹û´¦ÀíÆ÷²»Ö§³ÖXSLTÔªËØ£¬ÔòÔËÐÐÖ¸¶¨µÄÔ¤±¸´úÂë |
6.0 | |
| for-each | Loops through each node in a specified node set ÔÚÖ¸¶¨µÄ½ÚµãÉèÖÃÖÐͨ¹ýÿ¸ö½Úµã×öÑ»· |
5.0 | 6.0 |
| if | Contains a template that will be applied only if a specified condition is true °üº¬Ò»¸öÖ»µ±Ö¸¶¨Ìõ¼þΪtrueʱ²ÅÓ¦ÓõÄÄ£°æ |
5.0 | 6.0 |
| import | Imports the contents of one style sheet into another. Note: An imported style sheet has lower precedence than the importing style sheet °ÑÒ»¸öÑùʽ±íÄÚÈÝÊäÈëµ½ÁíÍâÒ»¸öÑùʽ±íÈ¥¡£×¢Ò⣺ÓëÒÑÊäÈëµÄÑùʽ±íÏà±È£¬ÕýÔÚÊäÈëµÄÑùʽ±í¸ü¾ßÓÐÓÅÏÈȨ¡£ |
6.0 | 6.0 |
| include | Includes the contents of one style sheet into another. Note: An included style sheet has the same precedence as the including style sheet °ÑÒ»·ÝÑùʽ±íµÄÄÚÈÝǶµ½ÁíÒ»·ÝÖÐÈ¥ ¡£×¢Ò⣺ÕâÁ½·ÝÑùʽ±íÓÐÏàͬµÄÓÅÏȼ¶¡£ |
6.0 | 6.0 |
| key | Declares a named key that can be used in the style sheet with the key() function ͨ¹ýkey() º¯Êý£¬ÉùÃ÷¿ÉÒÔÓÃÓÚÑùʽ±íµÄÖ¸¶¨¼ü |
6.0 | 6.0 |
| message | Writes a message to the output (used to report errors) ±àдÐÅÏ¢µ½Êä³ö£¨ÓÃÓÚ±¨¸æ´íÎó£© |
6.0 | 6.0 |
| namespace-alias | Replaces a namespace in the style sheet to a different namespace in the output ÔÚÑùʽ±íÖаÑÃüÃû¿Õ¼ä£¨namespace£©Ìæ»»³ÉÒ»¸ö²»Í¬µÄÃüÃû¿Õ¼äÊä³ö |
6.0 | |
| number | Determines the integer position of the current node and formats a number È·¶¨µ±Ç°½ÚµãºÍ¸ñʽÊý×ÖµÄÕûÐÎλÖà |
6.0 | 6.0 |
| otherwise | Specifies a default action for the <choose> element Ö¸¶¨<choose>ÔªËØµÄ´íÎóÐÐΪ |
5.0 | 6.0 |
| output | Defines the format of the output document ¶¨ÒåÊä³öÎļþµÄ¸ñʽ |
6.0 | 6.0 |
| param | Declares a local or global parameter ÉùÃ÷±¾µØ»òÊÇÈ«ÇòµÄ²ÎÊý |
6.0 | 6.0 |
| preserve-space | Defines the elements for which white space should be preserved ¶¨Òå´¢´æ¿Õ°×Ò³µÄÔªËØ |
6.0 | 6.0 |
| processing-instruction | Writes a processing instruction to the output ±àдÊä³öµÄ´¦Àí½á¹¹ |
5.0 | 6.0 |
| sort | Sorts the output ·ÖÀàÊä³ö |
6.0 | 6.0 |
| strip-space | Defines the elements for which white space should be removed ¶¨ÒåÒÆ³ý¿Õ°×Ò³µÄÔªËØ |
6.0 | 6.0 |
| stylesheet | Defines the root element of a style sheet ¶¨ÒåÑùʽ±íµÄ¸ùÔªËØ |
5.0 | 6.0 |
| template | Rules to apply when a specified node is matched µ±Ö¸¶¨½ÚµãÆ¥ÅäʱӦÓõĹæÔò |
5.0 | 6.0 |
| text | Writes literal text to the output ±àдÎÄ×ÖÎı¾µ½Êä³ö |
5.0 | 6.0 |
| transform | Defines the root element of a style sheet ¶¨ÒåÑùʽ±íµÄ¸ùÔªËØ |
6.0 | 6.0 |
| value-of | Extracts the value of a selected node ժȡѡ¶¨½ÚµãÖµ |
5.0 | 6.0 |
| variable | Declares a local or global variable ¶¨Òå±¾µØ»òÈ«Çò±äÁ¿ |
6.0 | 6.0 |
| when | Specifies an action for the <choose> element Ö¸¶¨<choose>ÔªËØµÄÐÐΪ |
5.0 | 6.0 |
| with-param | Defines the value of a parameter to be passed into a template ¶¨ÒåÄ£°æÄڵIJÎÊýÖµ |
6.0 | 6.0 |