XSL简介 种方式变换XML文档 服务器上 服务器程序完成变换后发送到客户端程序 Servlet: IBM XML Enabler 客户端 E n应用独立的程序 James clark的XT IBM LotusXsL
XSL简介 ◼ 三种方式变换XML文档 ◼ 服务器上 ◼ 服务器程序完成变换后发送到客户端程序 Servlet: IBM XML Enabler ◼ 客户端 ◼ IE ◼ 应用独立的程序 ◼ James Clark的XT ◼ IBM LotusXSL
XSL简介 模板驱动( template- driven模型 XSL最基本的功能是提供了一种归并功能。XSL样式表 包含了一个描述结果结构的模板,并描述了如何从原文 档中选取数据插入这个模板。这个归并数据的模型和模 板被称为是模板驱动
XSL简介 ◼ 模板驱动(template-driven)模型 XSL最基本的功能是提供了一种归并功能。XSL样式表 包含了一个描述结果结构的模板,并描述了如何从原文 档中选取数据插入这个模板。这个归并数据的模型和模 板被称为是模板驱动
Xpath XPath是一种专门用来在XML文档中查找信息的语言,提供了 种简单的在Xm文档中鉴别节点的查询语言,这种语言基于 节点的类型、名称、数值以及文档中节点与节点之间的关系 1999.1116通过1.0标准, XPath2.0将成为推荐标准,是XSLT20和 xQuery1.0的基础。这两种语言都以XPah作为核心查询引擎 Ref:http://www.w3.org/tr/xpath XPath主要与XSLT一起使用,另外与 XPointer, XML Schema, XQuery等技术有密切联系 XPath是基于XML文档的层次结构的体现了XML文档的抽象逻 辑结构 In relational databases, parts of a database can be selected and retrieved us ing query languages such as SQl. The same is true for XML documents which there exist a number of proposals for query languages, such as X XML-QL, and XQuery The central concept of XMl query languages is a path expression that spec ifies how a node, or a set of nodes, in the tree representation of the XML document can be reached
Xpath ◼ XPath是一种专门用来在XML文档中查找信息的语言,提供了 一种简单的在Xml文档中鉴别节点的查询语言,这种语言基于 节点的类型、名称、数值以及文档中节点与节点之间的关系 ◼ 1999.11.16通过1.0标准, XPath 2.0将成为推荐标准,是XSLT 2.0 和 XQuery 1.0 的基础。这两种语言都以XPath 作为核心查询引擎 Ref: http://www.w3.org/TR/XPath ◼ XPath主要与XSLT一起使用,另外与XPointer, XML Schema, XQuery等技术有密切联系 ◼ XPath是基于XML文档的层次结构的,体现了XML文档的抽象逻 辑结构
Xpath <? xml version=“1.0” encoding=“UTF-8”2> glossary> <item> <title> text </title> <definition><title></title></definition> /ite <item> <title> text </title> <definition><title></title></definition> </item> < item version=“9.9”> <title> text </title> <definition><title></title></definition> </item> </glo
Xpath <?xml version=“1.0” encoding=“UTF-8”?> <glossary> <item> <title> text </title> <definition><title></title></definition> </item> <item> <title> text </title> <definition><title></title></definition> </item> <item version=“9.9” > <title> text </title> <definition><title></title></definition> </item> </glossary>
here is exactly one root There are no cycles Xpath Each node, other than the root, has exactly one parent. · Each node has a label. MM文档树形结构root The order of elements is important 将整个XM文档 <?xm?> 看成树形结构 glossary tem Item Item version definition title definition title definition title text title text title Ie title
Xpath ◼ XML文档树形结构 root <?xml?> glossary item item item title title title definition definition definition 将整个XML文档 看成树形结构 text title text title text title version