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

    >> 关于 XML 的一般性技术讨论,提供 XML入门资料 和 XML教程
    [返回] 计算机科学论坛XML.ORG.CN讨论区 - XML技术『 XML基础 』 → XML的两条路线之争-“平民与贵族” 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 3188 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: XML的两条路线之争-“平民与贵族” 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     teiki 帅哥哟,离线,有人找我吗?
      
      
      等级:大二(研究C++)
      文章:51
      积分:196
      门派:XML.ORG.CN
      注册:2003/11/30

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给teiki发送一个短消息 把teiki加入好友 查看teiki的个人资料 搜索teiki在『 XML基础 』的所有贴子 访问teiki的主页 引用回复这个贴子 回复这个贴子 查看teiki的博客楼主
    发贴心情 XML的两条路线之争-“平民与贵族”

    XML class warfare
    12/1/2002
    By Uche Ogbuji

    该文虽然是两年前的文章,但是涉及到XML的基本设计理念,所以还是很值得一读。XML一直在技术人员中有两种不同的争执,目前这一争执似乎还在继续。
      
    It seems there is no escaping class warfare. XML is a young society, but it is already succumbing to age-old divisions. The most direct roots of XML are in the processing of text documents, and XML is fundamentally a text-processing format. Many XML users, however, come from backgrounds in relational databases and object-oriented development. To some, XML is the perfect technology for managing problems of interoperability and data rot that have plagued programmers for years.

    Consider this: If you want to export a floating point value from C++, Java or a SQL database to XML, you can simply place ''1.0'' into the body of an element. But how do you then indicate that this value is actually a floating point value and not a mere string that happens to look like one?

    You might wish you had a way to mark such a value to be of the particular floating point-type defined in your original system. The W3C XML Schema (WXS) working group decided to address such requirements by building in to schemas the ability to attach data types to XML data. Rather than cobble together one set of data types that matches Java's native types, another set that matches SQL native types and so on, the WXS Data Types (WXSDT) are defined as a single type library that approximates native types from various languages and platforms. The standardization of WXSDT established the gentry in XML -- those users who prefer XML data to be neatly organized according to fixed classes and types.

    But many XML users still come from the document and text-processing world. Some of the most successful XML vocabularies, such as XHTML, SVG and RSS, do not have much to do with data types -- they just deal in plain text.

    Even among those who wish to use XML in conjunction with traditional programming systems, some prefer to minimize the coupling between the data in XML and the associated programming language values. This means that when they write ''1.0'' to the XML document, it's just a string as far as they're concerned, and only a few very specialized portions of the processing need to be concerned that the string can be interpreted as a floating point number.


    These users make up the faction of XML bohemians. They are more concerned with the text content of XML data than they are with any class or type that might be associated. I count myself firmly among the bohemians.

    For a while, these two groups have rubbed elbows in the XML community with a great deal of tension, but with little outright conflict and friction. But this uneasy peace has come to an end. The main battleground is that dutiful engine of so much XML processing, XPath.

    XSLT and XPath are both designed from the bohemian point of view. They deal with text and only worry about the type of the data in a few specialized corners, such as the sum() function in XPath and the element in XSLT.

    The gentry, however, would like more class consciousness from these workhorse technologies. They reason that if they have gone to the trouble of specifying in the schema that ''1.0'' represents a floating point number, the XPath and XSLT processors should make this information available, and the processor should use such type information far more broadly. The gentry take the view that such capabilities should be built into the foundations of XPath and XSLT.

    The XPath 2.0 and XSLT 2.0 drafts are manifestations of this gentrification. They build in extensive facilities for handling WXSDT. Not by coincidence, these specifications are several times larger and more complex than the 1.0 generation of specifications. This added complexity has spurred the bohemians to arms. They are dismayed to see some of the most useful and successful XML technologies compromised by a desire for high-class amenities that not everyone wants, or wants to pay for.

    The bohemians argue that the XPath and XSLT committees are out of control, and that, at the very least, added facilities for WXSDT should be separated into optional modules. They also complain that WXSDT should not be privileged, pointing to areas that WXSDT does not cover -- such as geospatial data or color codes -- or covers rather sloppily, such as dates and times.

    The bohemians have rallied (for the most part) behind a powerful champion -- RELAX NG -- which is an XML schema standard that competes with WXS. It is designed more for document-style XML than for XML born in programming data. It supports type annotations, but only as separate optional modules (which can include WXSDT). The bohemians insist that the next-generation XML technologies should not only learn from RELAX NG's isolation of class consciousness, but should avoid bias toward WXS, supporting RELAX NG and other alternatives as well. The battle rages on at present.

    Certainly, if you want your data to outlast your code, and to be more portable to unforeseen, future uses, you would do well to lower your own level of class consciousness. Strong data typing in XML tends to pigeonhole data to specific tools, environments and situations. This often raises the total cost of managing that data.

    Not everyone will decide to join me in the ranks of the bohemians, but it seems clear that XML is most likely to prosper if its tools continue to be tolerant of varying attitudes toward class.


       收藏   分享  
    顶(0)
      




    ----------------------------------------------
    XML基础的财务报告语言 http://www.xbrl-cn.org

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/4/28 23:43:00
     
     forwar 帅哥哟,离线,有人找我吗?水瓶座1982-1-28
      
      
      威望:4
      等级:大三暑假(TOFEL考了650分!)
      文章:171
      积分:869
      门派:XML.ORG.CN
      注册:2004/3/2

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给forwar发送一个短消息 把forwar加入好友 查看forwar的个人资料 搜索forwar在『 XML基础 』的所有贴子 引用回复这个贴子 回复这个贴子 查看forwar的博客2
    发贴心情 
    它不会避免类的争斗。 可扩展标示语言(XML)是一个年轻的社会,但是它已经正在屈从变老变旧的区分。 可扩展标示语言的最直接的根是在本文文件的处理中,而且可扩展标示语言基本上是一个处理本文的格式。 许多可扩展标示语言使用者,然而,来自表示关系的数据库和物体定向的发展背景。到一些,可扩展标示语言是管理互通性和数据的问题已经折磨程序师长达数数年之久的腐烂完美的技术。

    考虑这: 如果你输出来自 C++的浮点的价值, Java或一个 SQL 数据库到可扩展标示语言,你能只是放置 ''1.0'' 进元素的身体之内。 但是你如何然后指出这价值实际上是浮点的值,而且不只碰巧的字符串看起来像一?

    你可能愿你有要为一个如此价值作标记的一个方法为在你的最初系统中被定义的特别浮点类型。 W3C 可扩展标示语言轮廓 (WXS) 工作小组决定藉由需求构建对轮廓能力把数据类型附在可扩展标示语言数据。并非圆石一起数据类型相配Java的自然类型,相配 SQL 本身类型等等的另外组合,WXS 数据类型 (WXSDT) 被定义为一间接近从各种不同的语言和平台来的自然类型的单一类型图书馆。 WXSDT 的标准化建立了可扩展标示语言的绅士阶级 -- 那些喜欢可扩展标示语言数据胜过的使用者整洁地被依照固定的类和类型组织。

    但是许多可扩展标示语言使用者仍然来自文件和处理本文的世界。 一些最成功的可扩展标示语言字汇, 像是 XHTML , SVG 和 RSS, 不大有关系数据类型 -- 他们仅仅处理简单的本文。

    更甚至在那些之中愿连同传统的规画系统使用可扩展标示语言,一些将可扩展标示语言和联合的规画语言价值的在数据之间的联结减到最少。 这意谓当他们写 ''1.0'' 给可扩展标示语言文件的时候,它只是就他们来说线, 和只有一些非常特殊化处理需要人的部分到是关心的线可能被解释如一个浮点数字。


    这些使用者捏造可扩展标示语言 bohemians 的派系。比较他们是由于任何的班级或可能被联合的类型他们对可扩展标示语言数据的本文内容感到更关心。 我相信我自己坚守在 bohemians 之中。

    前一阵子,这二个团体已经在可扩展标示语言社区发生很多的紧张摩擦, 但是都是些小的直接冲突和摩擦。 但是不安的和平已经结束。 主要的战场是这么多可扩展标示语言的忠实引擎处理, XPath。

    XSLT 和 XPath 两者都在从 bohemian 观点来看被设计。他们处理本文,而且把精力放在处理XSLT 的 XPath 和元素中有关一些被特殊化的角落, 像总数 sum() 的数据类型函数。

    绅士阶级,然而,想要来自这些用于工作之马技术的较多类意识。他们说服如果他们已经去在轮廓中叙述的麻烦 ''1.0'' 表现一个浮点数字,XPath 和 XSLT 处理器应该使这数据可得,而且处理器应该甚远地更宽广使用如此的类型数据。 绅士阶级占据视野如此的能力进入 XPath 和 XSLT 的基础之内应该被建造。

    XPath 2.0 和 XSLT 2.0 草稿是这一个将日渐破败的市区改造为良好的中产阶级居住区的显示。 他们为操作的 WXSDT 在广泛的设备中建立。 不是藉着巧合,这些规格比 1.0 代的规格大和更复杂好几时代。 这一个被增加的复杂已经刺激对双臂的 bohemians 。他们被惊愕一些最有用的和被对高级的适意渴求妥协处理的成功可扩展标示语言技术不每个人 , 或支付的费用。

    bohemians XPath 而且 XSLT 委员会失去控制,而且,在非常最少的, 附加的设备因为 WXSDT 进入可选择的组件之内应该被分开。 他们也 WXSDT 不应该被给与特权, 指出到 WXSDT 不包括的区域 -- 如此的如 geospatial 数据或颜色密码 -- 或宁可被泼水弄湿地包括,像是日期和时代。

    bohemians 已经在一个有力的冠军后面重整旗鼓 (大致上 )-- 放松 NG-- 一个可扩展标示语言轮廓以 WXS 竞争的标准是哪一。 它为文件- 风格可扩展标示语言被设计更多比较为在规画数据方面出生的可扩展标示语言。 它支持键入注解, 但是只有如分开的可选择的组件.( 能包括 WXSDT) bohemians 可扩展标示语言技术应该不但学习从放松班级意识的 NG's 的隔绝 , 而且的下一个- 世代应该避免向 WXS 的偏见, 支援也放松 NG 和其他的替代选择。 在目前的战争愤怒。

    确定地,如果你想你的数据较你的密码经久, 和到对无法预料的, 将来的使用是更手提式的,你会做得好降低你的自己水平的类的意识。 可扩展标示语言的强壮数据打字容易把~分类归档对特定的工具,环境和情形的数据。 这时常举起管理那一笔数据的总费用。

    不是每个人将会决定在 bohemians 的等级中叁加我,但是它如果它的工具改变向班级的态度是宽容的 , 清楚的那一个可扩展标示语言很有可能要兴隆。

    用金山快译大致翻译了一下,专业术语翻译的不到位,大家有兴趣的给改一下吧。

    ----------------------------------------------
    >>>>>>>>    ^o^   <<<<<<<<

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/5/2 0:14:00
     
     GoogleAdSense水瓶座1982-1-28
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 XML基础 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2025/8/29 13:20:09

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

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