XSLT References-from w3schools.com

来源:互联网 发布:js遍历div的子元素 编辑:程序博客网 时间:2024/05/22 02:09

XSLT Elements Reference

prev next

The XSLT elements from the W3C Recommendation (XSLT Version 1.0).


XSLT Elements

The links in the "Element" columns point to attributes and more useful information about the specific element.

  • NN: indicates the earliest version of Netscape that supports the tag
  • IE: indicates the earliest version of Internet Explorer that supports the tag

Note: All elements supported in IE 5.X may have NON-standard behavior, because IE 5.X was released before XSLT became a W3C Recommendation!

ElementDescriptionIENN
apply-importsApplies a template rule from an imported style sheet6.0 
apply-templatesApplies a template rule to the current element or to the current element's child nodes5.06.0
attributeAdds an attribute5.06.0
attribute-setDefines a named set of attributes6.06.0
call-templateCalls a named template6.06.0
chooseUsed in conjunction with <when> and <otherwise> to express multiple conditional tests5.06.0
commentCreates a comment node in the result tree5.06.0
copyCreates a copy of the current node (without child nodes and attributes)5.06.0
copy-ofCreates a copy of the current node (with child nodes and attributes)6.06.0
decimal-formatDefines the characters and symbols to be used when converting numbers into strings, with the format-number() function6.0 
elementCreates an element node in the output document5.06.0
fallbackSpecifies an alternate code to run if  the processor does not support an XSLT element6.0 
for-eachLoops through each node in a specified node set5.06.0
ifContains a template that will be applied only if a specified condition is true5.06.0
importImports the contents of one style sheet into another. Note: An imported style sheet has lower precedence than the importing style sheet6.06.0
includeIncludes the contents of one style sheet into another. Note: An included style sheet has the same precedence as the including style sheet6.06.0
keyDeclares a named key that can be used in the style sheet with the key() function6.06.0
messageWrites a message to the output (used to report errors)6.06.0
namespace-aliasReplaces a namespace in the style sheet to a different namespace in the output6.0 
numberDetermines the integer position of the current node and formats a number6.06.0
otherwiseSpecifies a default action for the <choose> element5.06.0
outputDefines the format of the output document6.06.0
paramDeclares a local or global parameter6.06.0
preserve-spaceDefines the elements for which white space should be preserved6.06.0
processing-instructionWrites a processing instruction to the output5.06.0
sortSorts the output6.06.0
strip-spaceDefines the elements for which white space should be removed6.06.0
stylesheetDefines the root element of a style sheet5.06.0
templateRules to apply when a specified node is matched5.06.0
textWrites literal text to the output5.06.0
transformDefines the root element of a style sheet6.06.0
value-ofExtracts the value of a selected node5.06.0
variableDeclares a local or global variable6.06.0
whenSpecifies an action for the <choose> element5.06.0
with-paramDefines the value of a parameter to be passed into a template6.06.0


XSLT Functions

Previous Next

XSLT supplies a number of functions.


XSLT Functions

NameDescription
current()Returns the current node
document()Used to access the nodes in an external XML document
element-available()Tests whether the element specified is supported by the XSLT processor
format-number()Converts a number into a string
function-available()Tests whether the function specified is supported by the XSLT processor
generate-id()Returns a string value that uniquely identifies a specified node
key()Returns a node-set using the index specified by an <xsl:key> element
system-property()Returns the value of the system properties
unparsed-entity-uri()Returns the URI of an unparsed entity


Inherited XPath Functions

You can also use ALL the XPath functions in XSLT. Look at the XPath functions.


原创粉丝点击