欢迎来到麦多课文档分享! | 帮助中心 海量文档,免费浏览,给你所需,享你所想!
麦多课文档分享
全部分类
  • 标准规范>
  • 教学课件>
  • 考试资料>
  • 办公文档>
  • 学术论文>
  • 行业资料>
  • 易语言源码>
  • ImageVerifierCode 换一换
    首页 麦多课文档分享 > 资源分类 > PPT文档下载
    分享到微信 分享到微博 分享到QQ空间

    Interfacing XML and ErlangUlf Wiger, Senior Systems .ppt

    • 资源ID:376499       资源大小:193.50KB        全文页数:17页
    • 资源格式: PPT        下载积分:2000积分
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    二维码
    微信扫一扫登录
    下载资源需要2000积分(如需开发票,请勿充值!)
    邮箱/手机:
    温馨提示:
    如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如需开发票,请勿充值!如填写123,账号就是123,密码也是123。
    支付方式: 支付宝扫码支付    微信扫码支付   
    验证码:   换一换

    加入VIP,交流精品资源
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    Interfacing XML and ErlangUlf Wiger, Senior Systems .ppt

    1、XMerL,Interfacing XML and ErlangUlf Wiger, Senior Systems Architect Network Architecture and Product Strategies Data Backbone and Optical Networks Division Ericsson Telecom AB,Executive Summary,Erlang/OTP is moving into vertical applications XML is fast becoming an important standard Erlang and XML

    2、fit very well together,Number of Requests to www.erlang.org,The Reason for XMerL,Interest in Erlang is growing No longer just for embedded systems New interfaces must evolve Powerful GUI components Data exchange (COM, ODBC, XML, ) XML is a logical addition to OTP (ASN.1, HTTP, IDL, CORBA, )Real reas

    3、on: I bought a book and became curious,What is XML?,“A Stricter HTML” “A Simpler SGML” Relatively Easy to Parse Content OrientedXML springs mostly from SGML All non-essential SGML features have been removed Web address support taken from HTML, HyTime and TEI Some new functionality added Modularity E

    4、xtensibility through powerful linking International (Unicode) support Data orientation,Where is XML used?,Large Web sites HTML is generated via special (XSL) stylesheets Internet Explorer has built-in support for XML Document management When machines must be able to read the documents Machine-to-mac

    5、hine communication XML RPC, SOAP XML processors exist in many languages (even Erlang!),A Simple XML Document,Welcome to My Home PageSorry, this home page is still under construction. Please come back soon!,All elements must have a start tag and an end tag (exception: ) An element can have a list of

    6、attributes,Erlang analogy: Tag, Attributes, Content,A Simple Erlang-XML Document,Welcome to My Home PageSorry, this home page is still under construction. Please come back soon!,XML,Almost equivalent,The Complete Picture,XML is more complex than that External DTDs Global namespace Language encoding

    7、Structural information should be optimized for queries To parse XML properly, we use records To output to XML (or similar), we may use the simple form,XMerL Status,A fast XML processor produces an Erlang representation of the XML document Lets call this representation a “complete form” Erlang progra

    8、ms can use an XML-like representation Lets call this a “simple form” An export tool can take either form and output almost anything Plans to support XML Stylesheets (XSL, more on that later) Basic support for XPATH (needed for XSL, Xlink, Xpointer, ),The XMerL Processor,Vsn 0.6 is a single-pass scan

    9、ner/parser implementing XML 1.0 Has been tested on thousands of XML documents Appears to handle lots of different documents Appears to be fast and flexible There are two ways to process an XML document: Tree-based parsing; the whole document at once Event-based parsing; one element at a time The XMe

    10、rL processor can do either The behaviour is specified through higher-order functions (“funs”) Validation can also be carried out in funs,The XMerL Processor (2),Proper handling of Global namespace Entity expansion External and internal DTDs Conditional processing UniCode Some support for infinite st

    11、reams,The XMerL Export Tool,The export tool takes a complete or simple form and outputs some (almost arbitrary) data structure Translation takes place in callback modules: CBModule:Tag(Content, Attributes, Parents, CompleteRecord) A callback module can inherit other callback modules A callback funct

    12、ion can do three things: Return data on some output format Point to another callback function (alias) Return a modified (simple or complete) form for re-processing Existing callback modules HTML (not yet complete) XML (generic, not complete),Simple Export Tool Example,foo() -xmerl:export_simple(simp

    13、le(), xmerl_html, title, “Doc Title“).foo2() -xmerl:export_simple(simple(), xmerl_xml, title, “Doc Title“).simple() -document, title, “Doc Title“, author, “Ulf Wiger,section, heading, “heading1“,P, “This is a paragraph of text.“,section, heading, “heading2“,P, “This is another paragraph.“,table, bor

    14、der, 1, heading, col, “head1“,col, “head2“,row, col, “col11“,col, “col12“,row,col, “col21“,col, “col22“.,Export to HTML,foo() -xmerl:export_simple(simple(), xmerl_html, title, “Doc Title“).foo2() -xmerl:export_simple(simple(), xmerl_xml, title, “Doc Title“).simple() -document, title, “Doc Title“, au

    15、thor, “Ulf Wiger,section, heading, “heading1“,P, “This is a paragraph of text.“,section, heading, “heading2“,P, “This is another paragraph.“,table, border, 1, heading, col, “head1“,col, “head2“,row, col, “col11“,col, “col12“,row,col, “col21“,col, “col22“.,Sample Code:% section/3 is to be used instea

    16、d of headings. section(Data, Attrs, section,_, section,_, section,_ | _, E) -opt_heading(Attrs, “, “, Data); section(Data, Attrs, section,_, section,_ | _, E) -opt_heading(Attrs, “, “, Data); section(Data, Attrs, section,_ | _, E) -opt_heading(Attrs, “, “, Data); section(Data, Attrs, Parents, E) -op

    17、t_heading(Attrs, “, “, Data).opt_heading(Attrs, StartTag, EndTag, Data) -case find_attribute(heading, Attrs) ofvalue, Text -StartTag, Text, EndTag, “n“ | Data;false -Dataend.,Export to XML,foo() -xmerl:export_simple(simple(), xmerl_html, title, “Doc Title“).foo2() -xmerl:export_simple(simple(), xmer

    18、l_xml, title, “Doc Title“).simple() -document, title, “Doc Title“, author, “Ulf Wiger,section, heading, “heading1“,P, “This is a paragraph of text.“,section, heading, “heading2“,P, “This is another paragraph.“,table, border, 1, heading, col, “head1“,col, “head2“,row, col, “col11“,col, “col12“,row,co

    19、l, “col21“,col, “col22“.,This is a paragraph of text.This is another paragraph.head1head2col11col12col21col22,Sample Code:% The #root# tag is called when the entire structure has been exported. % It does not appear in the structure itself. #root#(Data, Attrs, , E) -“n“, Data.#element#(Tag, , Attrs,

    20、Parents, E) -TagStr = mk_string(Tag),“n“; #element#(Tag, Data, Attrs, Parents, E) -TagStr = mk_string(Tag),“n“, Data, opt_newline(Data),“n“.,XML Stylesheets,Stylesheet support is clearly needed Interpreting XML stylesheets is slow and cumbersome (lots of independent, heavy XPATH queries) Possible ap

    21、proach: Read the stylesheets using the XMerL processor Translate them into an Erlang program Optimization opportunity: convert xsl:match statements into match criteria for a single scan function Lots more work is needed here.,More Examples.,Current xmerl version, 0.6, is on Open Source Thanks to the beta testers: Mickael Remond Luc Taesch,


    注意事项

    本文(Interfacing XML and ErlangUlf Wiger, Senior Systems .ppt)为本站会员(sofeeling205)主动上传,麦多课文档分享仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文档分享(点击联系客服),我们立即给予删除!




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
    备案/许可证编号:苏ICP备17064731号-1 

    收起
    展开