XSLT 2.0 新特性分析
对于XSLT 2.0中的新特性,本文将除开那些现在无益的特性,主要讨论那些能够立即满足应用程序开发需求的特性……
列表C——XSLT 2.0中的分组
|
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes"> <xsl:template match="/"> |
虽然这些分组方法各不相同,但它们的最终结果是一样的,如列表D所示。
列表D——分组结果
| <?xml version="1.0" encoding="UTF-8"?> <world> <country name="Japan" continent="Asia"> <city>Tokyo</city> <city>Osaka</city> </country> <country name="France" continent="Europe"> <city>Paris</city> <city>Nice</city> </country> <country name="United Kingdom" continent="Europe"> <city>London</city> <city>Dundee</city> </country> <country name="Canada" continent="North America"> <city>Toronto</city> <city>Vancouver</city> </country> <country name="Jamaica" continent="North America"> <city>Kingston</city> <city>Ocho Rios</city> </country> <country name="United States" continent="North America"> <city>Allentown</city> <city>Mobile</city> </country> </world> |
- 本文关键词:

