多语言展示
当前在线:901今日阅读:60今日分享:41

XSL最全基础教程之xsl:copy元素

元素将当前节点从源复制到输出文件。
工具/原料
1

Notepad++

2

Firefox

方法/步骤
1

语法 

3

要点     元素在输出中创建一个与当前节点的名称、命名空间和类型相同的节点。 属性和子元素不会自动复制。 通过此元素可以转换标识。

4

示例创建XML文件(books.xml)            Gambardella, Matthew        XML Developer's Guide        Computer        44.95        2000-10-01                An in-depth look at creating applications with XML.                Ralls, Kim        Midnight Rain        Fantasy        5.95        2000-12-16        A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.                Corets, Eva        Maeve Ascendant        Fantasy        5.95        2000-11-17        After the collapse of a nanotechnology society in England, the young survivors lay the foundation for a new society.   

5

创建XSLT文件(books.xsl)                 

6

输出此为格式输出的一部分,在右边截断:Gambardella, MatthewComputer44.952000-10-01An in-depth look and her own childhood to become queen of the world.Corets, EvaFa处理器输出格式:Gambardella,MatthewXML Developer'sGuideComputer44.952000-10-01An in-depth look at creatingapplications withXML....

推荐信息