可扩展性标记语言XML中英文资料外文翻译文献.docx
《可扩展性标记语言XML中英文资料外文翻译文献.docx》由会员分享,可在线阅读,更多相关《可扩展性标记语言XML中英文资料外文翻译文献.docx(9页珍藏版)》请在冰豆网上搜索。
可扩展性标记语言XML中英文资料外文翻译文献
可扩展性标记语言XML中英文资料外文翻译文献
UnderstandingtheExtensibleMarkupLanguage(XML)
ThisappendixtakesalookattheExtensibleMarkupLanguage(XML)—asuperbstructureddocumentformatstandardthatbusinessesareusingtoexchangebusinessdata.XMLcomplementsEJBnicelyaswell;infact,theEJB1.1specificationusesXMLasadocumentformatfordeploymentdescriptors.
Byreadingthisappendix,youwilllearnthefollowing:
■■WhybusinessesneedXML■■ThecoreconceptsbehindXMLprogramming■■HowEJBandXMLarerelated(whichwe’llexpanduponinAppendixD,coveringEJB1.1)XMLisanextremelyimportanttechnologyfortheInternet,anditisdestinedtobecomethede-factostandardforstructuringdocumentcontent.IfyoualreadyknowXML,feelfreetoskiptothesecondhalfofthisappendix,wherewediscusshowXMLandEJBarerelated.Otherwise,readon,andwewillexplainXMLfromtheground-up.ThisappendixexplainsenoughXMLforyoutobeginprogrammingwithEJB1.1.ForafulltourofXML,seethebook’saccompanyingWebsiteforlinkstoexternalresources.
BusinessNeedsforXMLWebeginbystudyingtheneedsofthebusinesscommunitythatmakeXMLsuchausefulstandard.WhyisXMLimportant?
Whatbusinessproblemsdoesitsolve?
WhydidweneedtocreateXMLratherthanuseexistingtechnology?
Thosearethequestionswewillanswerinthissection.ElectronicCommerceThebusinessneedforastandardsuchasXMLhasarisenwiththeadventofelectroniccommerce(alsocallede-commerce,e-business,oryourfavoritebuzzword).Whenmostpeopleheartheword“electroniccommerce”,theyusuallythinkofWebstorefrontsthatyoucanvisittopurchasegoodselectronically.Thisiscalledbusiness-to-consumere-commercebecauseabusinessisconductingatransactionwithaconsumer.Examplesofbusiness-to-consumerWebsitesareA(),B(),andcarO(www.carO).Bute-commerceextendsbeyondsimplythebusiness-to-consumermodel.Forinstance,anonlineauctionhousesuchaseBay()facilitatestrans-actionsbetweenconsumersbyhostingauctions.Thisiscalledconsumer-to-consumere-commercebecausegoodsareexchanginghandsbetweenconsumers.Abusinessmayalsosellgoodstootherbusinessesandtakeconsumersoutofthepicturealtogether.Thiseconomicmodeliscalledbusiness-to-businesse-commerce,andiswheremostofthemoneychangeshandsbyfar,becauseeverybusinessneedstoconductinter-businesstransactionstosurvive.Manufacturersneedtobuypartsfromsuppliers.Resellersneedtobuyproductsfrommanufacturers.Andallcorporationsneedtobuyofficesuppliesandfurniture.Geographicallydistributedcompanies,conglomeratesandevenwholeindustries(suchasaerospace)relyoncommunication,andtheabilitytodistributemanufacturingactivitiesgivessomecompaniesanessentialeconomicadvantage.Business-to-businesse-commerceisthesinglelargestfinancialimpacttheInternetismakingontheworldeconomy,andhasbeenestimatedtobe20timesaslargeastheotherInterneteconomicmodels.Aswewillsee,business-to-businesse-commerceiswhereXMLhasthelargestimpactaswell.InadequacieswithExistingTechnologyThechallengeforbusinessestoconductaffairselectronicallyisforbusinessestounderstandeachother’sdata,suchasproducts,customers,andfinancialdata.Withapaper-basedsystem,ahumanbeingalwaysintervenedandcouldmakeGobacktothefirstpageforaquicklinktobuythisbookonline!
logicalguessesaboutambiguousdata.Withelectronicbusiness,however,computerprogramsneedtoreceiveaccurate,structureddata,ormillionsofdollarscouldbelostduetoincorrecttransactions.
Thus,astructureddatadocumentstandardisneededthatbusinessescanusetoshareinformation.Thisdocumentstandardshouldbesimpleenoughforanyonetouseelegantly,yetbepowerfulenoughtorepresentanybusinessdata.Acomputerprogramshouldbeabletoreadanelectronicdocumentstructuredinthislanguageandfigureoutthesemanticdetailsofthedocumentbasedonitsstructure.Forexample,anapplicationshouldbeabletoqueryadigitalpurchaseorderdocumentanddeterminewhatproductandquantitythepurchaseorderisfor.Let’stakealookattheexistingtechnologystandardsandexaminewhytheyareinadequateforourneeds.VANsandEDIElectronicbusinessisnotanewconcept.Companieshavealreadybeendoingitforyearsinaveryproprietaryway.BeforetheInternethitmainstream,twocorporationswouldconductbusinesselectronicallyusingathird-partyvendor’svalue-addednetwork(VAN),orprivatenetworkthatlinkscompaniestogether.ThelargestfourVANvendorsareGeneralElectricInformationServices,IBMGlobalInformationNetwork,SterlingCommerce,Inc.,andHarbingerCorporation.ThestandardforconductingbusinessoverVANsiscalledElectronicDataEx-change(EDI),astandardforfacilitatingtheelectronicexchangeofdata.EDIhastraditionallybeenusedoverVANsalthoughitisbeenextendedtorunovertheInternetaswell.EDIhaswidespreaduseinmultipleverticalindustries,fromthebusinesssector(transferringbusinessdocuments)totheeducationalsector(transferringstudentrecords,transcripts,andtestscores).TheproblemswithVANsandEDIareasfollows:
■■VANsusingEDIareaveryexpensivesubscriptionservice,andchargebusinessesoutrageouspertransactionfees.■■VANsareachallengetolinktootherbusinessesthatarealreadyontheInternet.■■VANsaredesignedforbatch-modeprocessing(ratherthanjust-in-timeprocessing,whichisnecessaryforefficienttransactions).■■Withinindustries,largecompaniestypicallydefineasetofEDItemplatesthatlockothercompaniesintoproprietarystandardsfordataexchange.
■■EDIisanoutdated,cumbersome,andnon-extensibleformatfortransferringdata.NotethatthereisdefinitelyalottobesaidaboutVANsandEDI.Manybusinessesrunquitesmoothlyonthesetechnologiestoday,asVANsusingEDIarequitereliableandsecure.Manycorporationsarealsoveryconcernedaboutgamblingtheirbusinessesonanythingnew.Duetothesefactors,plustheslowrateoftechnologyadoption,theEDImarketisgrowingrapidlyaswespeak.Inthelongrun,though,VANsandEDIarelikelytodieoffinfavorofnewertechnologyevolutions.WhatwouldyoudotoreplaceVANsandEDIwithanInternet-basedmodel?
FirstyouwouldneedtoreplacetheproprietaryVANnetworkswithanInternetlink.That’ssimplyahardwareproblem.ThelargerissueisreplacingorenhancingEDIwithanefficient,modern,structureddatadocumentstandardthatbusinesscanusetoexchangeinformation.Aswewillsee,XMListhatstandard,anditiswhatearlyadoptingbusinessesaretacklingasanintegrationmethod,evenaswespeak.SGMLTheStandardGeneralizedMarkupLanguage(SGML)isameta-markuplanguage—youcanuseameta-markuplanguagetodesignyourownmarkuplanguage(suchasXMLorHTML).SGMLprovidesamechanismtoaddstructuretoyourdocuments,andhasagreattrackrecordofsuccessfuldeploymentsofapplications,especiallyinthepublishingrealm.But,unfortunately,SGMLhasneverbecomemainstream,largelybecauseofitscomplexity.SGMLisquitepowerful,anditcouldeasilybeusedtorepresentbusinessdata.Itspowercomesatthecostofeaseofuse,asSGMLisabittoopowerfulforeverydaybusinessapplications.Theramp-upcurveforprogrammingwithSGMLisparticularlysteep,andthehighcostofleveragingSGMLisveryprohibitive.FewpeopleuseSGMLinitsrawform,buteveryoneusesimplementationsofSGML,suchasHTMLandXML.HTMLTheHyperTextMarkupLanguage(HTML)isthepredominantstandardforWebdocuments.HTMLisanapplicationofSGMLthatisintendedformultimediapresentationofinformationovertheInternet.HTMLisaninappropriatemarkuplanguageforelectronicdata,primarilybecauseHTMLwasdesignedaroundtheuseofGUItags,ratherthanbusinessdatacontent.HTMLisgreatfordisplayingdocumentstoendusers,butitisverypoorfordefiningotherstructureinadocument.Forexample,considerthefollowingHTMLsnippet:
JohnDoeTheDoeCorporationHere,Theandtagstelltheclient-sidebrowsertorepresenttheassociatedtextinboldanditalics,respectively.However,thestructureendsthere.Thebrowserhasnowayofstructuringthesemanticmeaningofthetextwithinthedocument.Forexample,byglancingatthiscode,there’snowaywecanautomaticallyidentifythatthestring“JohnDoe”isthenameofaperson.Norcanacomputerprogramdiscernthat“TheDoeCorporation”isthenameofacompany.Notethatthereareclunkywaysaroundthis(forexample,youcouldaddIDattributes).Similary,HTMLisnotextensible.Ifabusinessneedstoaddnewtagstoaccommodateitsneeds,thatbusinesswillrunintoawallwithHTML.ThisisbecauseHTMLisamarkuplanguage,butisnotameta-markuplanguage.XMLTheExtensibleMarkupLanguage(XML)isauniversalstandardforstructuringcontentinelectronicdocuments.XMLisextensible,enablingbusinessestoaddnewstructuretotheirdocumentsasneeded.TheXMLstandarddoesnotsuffertheversioncontrolproblemsofothermarkuplanguagessuchasHTMLbecauseithasnopredefinedtags.Rather,withXMLyoudefineyourowntagsforyourbusinessneeds.XMLisameta-markuplanguagebecauseyoucandefineyourownmarkuplanguagewhichisself-describing.ThismakesXMLtheidealdocumentformatfortransferringbusinessdataelectronically,andithasawidevarietyofotherapplicationsaswell.
BenefitsofXMLFromabusinessperspective,XMLiscompellingbecauseitallowsbusinessestostructuredatainanelegant,ex