XSLT is part of XSL, which is an application of XML that specifies the rules for converting an XML document into another XML document. An XSLT document is an XML document and a style sheet, which contains a series of templates. The XSLT processor compares the elements in the input XML document with the templates in the style sheet. If they match, the template's content is
XSLT is a part of XSL, which is an application of XML that specifies the rules for converting one XML document into another XML document. An XSLT document is an XML document and a style sheet, which contains a series of templates. The XSLT processor compares elements in the input XML document with templates in the style sheet, and if they match, writes the contents of the template into an output tree. Finish
XSLT is part of XSL. It is an application of XML that specifies the rules for converting an XML document into another XML document. An XSLT document is an XML document and a style sheet, which contains a series of templates. The XSLT processor compares elements in the input XML document with templates in the style sheet, and if they match, writes the contents of the template into an output tree. After completing the processing, serialize the output tree into an XML document or
other format document, such as HTML or rtf. Several key terms of XSLT
form", so all XSLT elements have the xsl prefix. A minimized XSLT document:
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> </xsl:stylesheet>
xsl:apply-imports xsl:attribute-set xsl:decimal-format xsl:import xsl:include xsl:key xsl:namespace-alias xsl:output xsl:param xsl:preserve-space xsl:strip-space xsl:template模板元素,用于匹配XML文档中的元素。如:<xsl:template match="person">, 匹配XML文档中的person元素。 xsl:variable
xsl:apply-imports xsl:apply-template应用模板元素,用于显示指定的元素值(内容)。 如:<xsl:apply-template select="name">,显示name元素的值。 xsl:attribute xsl:call-template xsl:choose xsl:comment xsl:copy xsl:copy-of xsl:element xsl:fallback xsl:for-each xsl:if xsl:message xsl:number xsl:otherwise xsl:processing-instruction xsl:text xsl:value-of选择元素,用于计算元素的值(内容)。 如:<xsl:value-of select="name">,获得XML文档中name元素的值(内容)。 xsl:variable xsl:when XSLT函数
The above is the detailed content of XML introductory tutorial: XSLT-XML/XSLT code examples. For more information, please follow other related articles on the PHP Chinese website!