XSL简介 三种方式变换XML文档 服务器上 服务器程序完成变换后发送到客户端程序 Servlet: IBM XML Enabler 客户端 lE 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 (template-driven)模型 XSL最基本的功能是提供了一种归并功能。XSL样式表 包含了 个描述结果结构的模板 一个描述结果结构的模板,并描述了如何从原文 档中选取数据插入这个模板。这个归并数据的模型和模 板被称为是模板驱动
Xpath XPah是一种专门用来在XML文档中查找信息的语言,提供了 种简单的在Xm文档中鉴别节点的查询语言,这种语言基于 节点的类型、名称、数值以及文档中节点与节点之间的关系 19991116通过1.0标准, XPath2.0将成为推荐标准,是XLT20和 XQuery1.0的基础。这两种语言都以 XPath作为核心查询引擎 Ref:http:/www.w3.org/tr/xpath XPah主要与XSLT一起使用,另外与 XPointer, XML Schema, XQuery等技术有密切联系 XPath是基于XML文档的层次结构的体现了XML文档的抽象逻 辑结构 n 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, for which there exist a number of proposals for query languages, such as XQL, 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
X th pa XPath是 种专门用来在 一种专门用来在XML文档中 找信息的语言 查找信息的语言,提供了 一种简单的在Xml文档中鉴别节点的查询语言,这种语言基于 节点的类型、名称、数值以及文档中节点与节点之间的关系 1999 11 16 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> </item> item> <title> text </title> <definition><title></title></definition> </item> item version=“9.9”> <title> text </title> <definition><title></title></definition> </item> gl
X th pa <?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>
There is exactly one root · There are no cycles. Xpath Each node, other than the root, has exactly one parent · Each node has a label. XML文档树形结构root· The order of elements is important 将整∧XML文档 <?xml?> glossary 看成树形结构 item Item Item Ⅴ ersion title definition title definition title definition text title title text title
X th pa XML文档树形结构 root <? ?> l 将整个XML文档 glossary 看成树形结构 <?xml?> 看成树形结构 item item item version title title title definition definition definition title e text title text title text title