XML,XSD,XSL
发布时间:2020-12-15 23:52:09 所属栏目:百科 来源:网络整理
导读:Please describe the different between XML,XSD,XSL through their definition. XSL 指扩展样式表语言( E Xtensible S tylesheet L anguage)。 XSL - 不仅仅是样式表语言 XSL 包括三部分: XSLT 一种用于转换 XML 文档的语言。 XPath 一种用于在 XML 文档
Please describe the different between XML,XSD,XSL through their definition.
XSL 指扩展样式表语言(EXtensible Stylesheet Language)。
XSL - 不仅仅是样式表语言XSL 包括三部分:
<?xml version="1.0" encoding="ISO-8859-1"?> <catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> . . . </catalog> <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <html> <body> <h2>My CD Collection</h2> <table border="1"> <tr bgcolor="#9acd32"> <th align="left">Title</th> <th align="left">Artist</th> </tr> <xsl:for-each select="catalog/cd"> <tr> <td><xsl:value-of select="title"/></td> <td><xsl:value-of select="artist"/></td> </tr> </xsl:for-each> </table> </body> </html> </xsl:template> </xsl:stylesheet> <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="cdcatalog.xsl"?> <catalog> <cd> <title>Empire Burlesque</title> <artist>Bob Dylan</artist> <country>USA</country> <company>Columbia</company> <price>10.90</price> <year>1985</year> </cd> . . . </catalog> 什么是 XPath?
XPath 在 XSLT 中使用XPath 是 XSLT 标准中的主要元素。如果没有 XPath 方面的知识,您就无法创建 XSLT 文档。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |