新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 在这里讨论其他W3C规范
    [返回] 中文XML论坛 - 专业的XML技术讨论区W3CHINA.ORG讨论区 - Web新技术讨论『 其他W3C规范 』 → 谁有Xpath2.0的译文吗? 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 23171 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: 谁有Xpath2.0的译文吗? 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     cndev 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:3
      积分:85
      门派:XML.ORG.CN
      注册:2007/9/23

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给cndev发送一个短消息 把cndev加入好友 查看cndev的个人资料 搜索cndev在『 其他W3C规范 』的所有贴子 引用回复这个贴子 回复这个贴子 查看cndev的博客楼主
    发贴心情 谁有Xpath2.0的译文吗?

    谁有Xpath2.0的译文吗?可不可以发给我。我看到W3C上日文的都有,就是没有中文的。在网上也找不到。
    我的邮箱:cndev1◎126.com

       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2007/9/23 11:40:00
     
     cndev 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:3
      积分:85
      门派:XML.ORG.CN
      注册:2007/9/23

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给cndev发送一个短消息 把cndev加入好友 查看cndev的个人资料 搜索cndev在『 其他W3C规范 』的所有贴子 引用回复这个贴子 回复这个贴子 查看cndev的博客2
    发贴心情 
    自己翻译了一点,但自己觉得翻译的不好,请大侠指点一下:
    XML Path Language(Xpath) 2.0
    W3C 推荐标准 2007-1-23
    摘要
    Xpath2.0是一个表达式语言(that allows the processing of values conforming to the data model defined in [XQuery/XPath Data Model (XDM)].)
    1介绍
    Xpath的主要目的是在XML节点树中寻址(The primary purpose of XPath is to address the nodes of [XML 1.0] or [XML 1.1] trees)。Xpath名称的由来是它使用路径的标记法在XML的分级结构中导航(XPath gets its name from its use of a path notation for navigating through the hierarchical structure of an XML document.)。Xpath使用一种简洁的,非XML的语法,以便于它在XML属性值和URIS中使用(XPath uses a compact, non-XML syntax to facilitate use of XPath within URIs and XML attribute values.)。
     Xpath是在XML的文件的抽象的、逻辑的结构上进行操作,而不是在其表面的语法上(XPath operates on the abstract, logical structure of an XML document, rather than its surface syntax.)。这种逻辑结构,称为数据模型,在文档[XQuery/XPath Data Model (XDM)]中定义说明(This logical structure, known as the data model, is defined in [XQuery/XPath Data Model (XDM)])。
     Xpath是被设计为可以嵌入一种如同Xslt和Xquery的宿主语言中的(XPath is designed to be embedded in a host language such as [XSLT 2.0] or [XQuery].)。Xpath拥有一个天然的子集可被用来进行测试一个节点是否匹配一个模式。XSlt2.0中对这种使用进行了描述。(XPath has a natural subset that can be used for matching (testing whether or not a node matches a pattern); this use of XPath is described in [XSLT 2.0].)
     Xquery1.0是Xpath2.0的一个扩展集。无论在Xquey1.0中还是在Xpath2.0中,一个语法上有效和执行成功的表达式将返回相同的结果。由于这两种语言是如此密切相关,他们的语法和语言描述为了确保一致性,故而使他们来自同一份文档源。同时,他们的规范编辑者也是在一起紧密合作的。(XQuery Version 1.0 is an extension of XPath Version 2.0. Any expression that is syntactically valid and executes successfully in both XPath 2.0 and XQuery 1.0 will return the same result in both languages. Since these languages are so closely related, their grammars and language descriptions are generated from a common source to ensure consistency, and the editors of these specifications work together closely.)
     Xpath也依靠并且和以下规范是紧密相关的:
     [XQuery/XPath Data Model (XDM)],定义了数据模型,这是所有Xpath表达式的基础。
     [XQuery 1.0 and XPath 2.0 Formal Semantics],定义了Xpath的静态语义和包含了一个正式的但非规范的动态语义描述。这些语义描述可能被实现者和那些需要正式定义的人使用。
     Xpath的类型系统是基于[XML Schema].。
     Xpath支持的内建的操作和函数库在[XQuery 1.0 and XPath 2.0 Functions and Operators]中定义。

    XPath also depends on and is closely related to the following specifications:
     [XQuery/XPath Data Model (XDM)] defines the data model that underlies all XPath expressions.
     [XQuery 1.0 and XPath 2.0 Formal Semantics] defines the static semantics of XPath and also contains a formal but non-normative description of the dynamic semantics that may be useful for implementors and others who require a formal definition.
     The type system of XPath is based on [XML Schema].
     The built-in function library and the operators supported by XPath are defined in [XQuery 1.0 and XPath 2.0 Functions and Operators].

     这个文档使用和XML1.0中相同的标准EBNF记法定义Xpath的语法。除非另有说明(见A.2 Lexical structure)空白符在表达式中是无意义的。语法产生式和他们描述的特性将在一起被介绍,而且在附录中形成一个完整的语法规范。这个附录是一个标准的版本。

    This document specifies a grammar for XPath, using the same basic EBNF notation used in [XML 1.0]. Unless otherwise noted (see A.2 Lexical structure), whitespace is not significant in expressions. Grammar productions are introduced together with the features that they describe, and a complete grammar is also presented in the appendix [A XPath Grammar]. The appendix is the normative version.

     在本文档的语法产生式中,非终结符用加下划线的符号表示,终结符被包含在双引号中。举例说明如下,下面的产生式描述的是函数调用的语法:
     [48]   FunctionCall   ::=   QName "(" (ExprSingle ("," ExprSingle)*)? ")"
    此产生式按如下方式理解:一个函数调用是由下面的元素组成:一个Qname后跟一个open-parenthesis,这个open-parenthesis后面跟着一个可选的参数列表,这个参数列表(如果出现)包含一个或多个表达式,使用逗号分隔。最后是一个close-parenthesis。

    The production should be read as follows: A function call consists of a QName followed by an open-parenthesis. The open-parenthesis is followed by an optional argument list. The argument list (if present) consists of one or more expressions, separated by commas. The optional argument list is followed by a close-parenthesis.

     在本规范中,某些语言实现的方面作为实现定义和实现依靠被描述:
     实现定义:实现定义指的是那些在各种实现中不一样,但必须由每个特殊的实现的实现者指定的内容。
     实现依靠:实现依靠指的是那些在各种实现中不一样,但不是由这里和任何W3C规范指定的和不是必须由每个特殊的实现的实现者指定的内容。
    本规范中作为实现定义和实现依靠描述的语言的方面可能被Xpath的宿主语言的规范更进一步所强制。
    本文档规范的定义了Xpath语言的动态语义。Xpath的静态语义在文档[XQuery 1.0 and XPath 2.0 Formal Semantics]中被定义。

    Certain aspects of language processing are described in this specification as implementation-defined or implementation-dependent.
    [Definition: Implementation-defined indicates an aspect that may differ between implementations, but must be specified by the implementor for each particular implementation.]
    [Definition: Implementation-dependent indicates an aspect that may differ between implementations, is not specified by this or any W3C specification, and is not required to be specified by the implementor for any particular implementation.]
    A language aspect described in this specification as implementation-defined or implementation dependent may be further constrained by the specifications of a host language in which XPath is embedded.
    This document normatively defines the dynamic semantics of XPath. The static semantics of XPath are normatively defined in [XQuery 1.0 and XPath 2.0 Formal Semantics]. In this document, examples and material labeled as "Note" are provided for explanatory purposes and are not normative.

    2.基础
     Xpath的基本元件是表达式,是由Unicode字符组成的字符串(使用的Unicode版本是实现定义的)。本语言提供由关键字、标志符、操作数构成的几种类型的表达式。作为表达式操作数的通常也是表达式。Xpath的表达式允许嵌套组成。

    The basic building block of XPath is the expression, which is a string of [Unicode] characters (the version of Unicode to be used is implementation-defined.) The language provides several kinds of expressions which may be constructed from keywords, symbols, and operands. In general, the operands of an expression are other expressions. XPath allows expressions to be nested with full generality.

     注意:本规范没有包含任何假设或要求有关Unicode字符串的字符集编码。

    Note:
    This specification contains no assumptions or requirements regarding the character set encoding of strings of [Unicode] characters.

    Like XML, XPath is a case-sensitive language. Keywords in XPath use lower-case characters and are not reserved—that is, names in XPath expressions are allowed to be the same as language keywords, except for certain unprefixed function-names listed in A.3 Reserved Function Names.

     和XML一样,Xpath是大小写敏感的语言。关键字在Xpath中使用小写字符,而且是不被保留的。也就是说,在Xpath表达式中,允许使用和语言关键字相同的名字命名标志符,除了某些列在A.3 Reserved Function Names无前缀的函数名。

    [Definition: In the data model, a value is always a sequence.] [Definition: A sequence is an ordered collection of zero or more items.] [Definition: An item is either an atomic value or a node.] [Definition: An atomic value is a value in the value space of an atomic type, as defined in [XML Schema].] [Definition: A node is an instance of one of the node kinds defined in [XQuery/XPath Data Model (XDM)].] Each node has a unique node identity, a typed value, and a string value. In addition, some nodes have a name. The typed value of a node is a sequence of zero or more atomic values. The string value of a node is a value of type xs:string. The name of a node is a value of type xs:QName.

     定义:在数据模型中,一个值通常是一个序列。
     定义:一个序列是一个包含0个或多个项目的有序集。
     定义:一个项目或者是一个原子值或者是一个节点。
     定义:一个原子值是一个处于原子类型值域中的值。原子类型定义在XML Schemal。
     定义:一个节点是由XDM定义的节点类型的一个实例。Each node has a unique node identity, a typed value, and a string value 。另外,一些节点有一个名称。The typed value of a node是一个包含0个或多个原子值的序列。节点的字符串值是xs:string类型的值。节点名是xs:Qname类型的值。

    [Definition: A sequence containing exactly one item is called a singleton.] An item is identical to a singleton sequence containing that item. Sequences are never nested—for example, combining the values 1, (2, 3), and ( ) into a single sequence results in the sequence (1, 2, 3). [Definition: A sequence containing zero items is called an empty sequence.]

     定义:一个序列刚好包含一个项目被称为singleton。一个项目和包含那个项目的singleton序列是同一的。序列是非嵌套的,例如,将值1,(2,3),和()插入一个序列将得到结果为(1,2,3)。
     定义:一个序列包含0个项目被称为空序列。

    [Definition: The term XDM instance is used, synonymously with the term value, to denote an unconstrained sequence of nodes and/or atomic values in the data model.]

     定义:术语XDM instance被用来表示一个非受限的包含数据模型中定义的节点或/和原子值的序列。它是术语Value的同义词。
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2007/9/23 11:55:00
     
     ds22gbz 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:8
      积分:86
      门派:XML.ORG.CN
      注册:2007/12/4

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给ds22gbz发送一个短消息 把ds22gbz加入好友 查看ds22gbz的个人资料 搜索ds22gbz在『 其他W3C规范 』的所有贴子 引用回复这个贴子 回复这个贴子 查看ds22gbz的博客3
    发贴心情 
    高手云集
    哈哈交流下哦
    www.8xian.net

    ----------------------------------------------
    www.8xian.net

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2007/12/4 13:56:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 其他W3C规范 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/11/26 7:34:01

    本主题贴数3,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    82.031ms