解压在c盘

源代码在线查看: copy.xtp

软件大小: 4683 K
上传用户: xufengping716
关键词: 解压
下载地址: 免注册下载 普通下载 VIP

相关代码

												Stylesheets can use xsl:copy to copy nodes from the XTP file to				the generated HTML.  The most common use of xsl:copy creaes a default				rule to copy the input to the output, i.e. the identity transformation.								In the previous examples, the default rule omitted				unknown elements.  For most XTP pages, a better default rule copies				the input to the output.  That way the page can use XTP as little				as it wants and mix and match JSP and HTML with custom tags.								The following example creates a default identity pattern and a				single custom tag.  The match pattern "*|@*" matches any element (the "*")				and any attribute (the "@*").  The vertical bar is a union operator.				The node is copied using xsl:copy and the contents apply the				stylesheet recursively.								xsl:apply-templates has an optional select pattern.  The selected				nodes will have the stylesheet recursively applied.  The default				pattern selects all children nodes.  The identity template needs to				select children nodes and attribute nodes.  "node()" selects any child				nodes and "@*" selects attributes.												<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">								<xsl:template match="*|@*">				  <xsl:copy>				    <xsl:apply-templates select="node()|@*"/>				  </xsl:copy>				</xsl:template>								<xsl:template match="hello">				  <xsl:text>Hello</xsl:text>				</xsl:template>								</xsl:stylesheet>																Testing <font color="red"><hello/></font>																<html>				<body>				Testing <font color="red">Hello</font>				</body>				</html>																				The StyleScript equivalent for $apply-templates uses the select attribute as				its first parameter.  $copy acts like any typical element.												$template(*|@*) <<				  $copy << $apply-templates(node()|@*); >>				>>								$template(hello) <<Hello>>																																The XPath pattern  matches any element.				The XPath pattern  matches any attribute.				The XPath pattern  matches pattern  or 				 copies XML nodes to the output.				 can select the nodes to evaluate.				XTP pages are parsed as HTML, automatically expanding optional tags, like				 and .				Specific templates override general templates.				Later templates override earlier ones.				 expands to 				 expands to 																							

相关资源