Tải bản đầy đủ (.pdf) (1,188 trang)

OReilly office 2003 XML may 2004 ISBN 0596005385

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (11.36 MB, 1,188 trang )










TableofContents
Index
Reviews
ReaderReviews
Errata
Academic

Office2003XML
ByEvanLenz,MaryMcRae,SimonSt.

Laurent

Publisher :O'Reilly
PubDate :June2004
ISBN :0-596-00538-5
Pages :576


Thisbookexplorestherelationshipbetween
XMLandOffice2003,examininghowthe
variousproductsintheOfficesuiteboth
produceandconsumeXML.Beginningwith


anoverviewoftheXMLfeaturesincludedin
thevariousOffice2003components,Office
2003XMLprovidesquickandclearguidance
toanyonewhoneedstoimportorexport


informationfromOfficedocumentsintoother
systems.











TableofContents
Index
Reviews
ReaderReviews
Errata
Academic

Office2003XML
ByEvanLenz,MaryMcRae,SimonSt.

Laurent


Publisher :O'Reilly
PubDate :June2004
ISBN :0-596-00538-5
Pages :576



Copyright

Preface
WhoShouldReadThisBook

WhoShouldNotReadThisBook




OrganizationofThisBook




ConventionsUsedinThisBook




HowtoContactUs


SupportingBooks
UsingCodeExamples
Acknowledgments


Chapter1.MicrosoftOfficeandXML
Section1.1.WhyXML?

Section1.2.DifferentFacesofXML





Section1.3.DifferentXMLFacesofOffice



Section1.4.OpeningOfficetotheWorld


Chapter2.TheWordprocessingMLVocabulary
Section2.1.IntroductiontoWordprocessingML

Section2.2.TipsforLearningWordprocessingML




Section2.3.WordprocessingML'sStyleofMarkup





Section2.5.DocumentStructureandFormatting



Section2.7.MoreonStyles

Section2.4.ASimpleExampleRevisited
Section2.6.AuxiliaryHintsinWordprocessingML


Chapter3.UsingWordprocessingML
Section3.1.EndlessPossibilities

Section3.2.CreatingWordDocuments




Section3.3.ExtractingInformationfromWordDocuments



Section3.5.ConvertingBetweenWordprocessingMLandOtherFormats

Section3.4.ModifyingWordDocuments



Chapter4.CreatingXMLTemplatesinWord
Section4.1.ClarifyingUseCases

Section4.2.AWorkingExample




Section4.3.Word'sProcessingModelforEditingXML




Section4.5.HowtheonloadXSLTStylesheetIsSelected




Section4.7.AttachingSchemastoaDocument



Section4.9.SchemaValidation




Section4.10.DocumentProtection





Section4.12.ReviewingtheXML-SpecificDocumentOptions




Section4.14.DeployingtheTemplate

Section4.4.TheSchemaLibrary
Section4.6.MergedXMLandWordprocessingML
Section4.8.Schema-DrivenEditing

Section4.11.XMLSaveOptions
Section4.13.StepstoCreatingtheonloadStylesheet
Section4.15.LimitationsofWord2003'sXMLSupport


Chapter5.DevelopingSmartDocumentSolutions
Section5.1.What'saSmartDocument?

Section5.2.CreatingaSmartDocumentSolution




Section5.3.CodingtheSmartDocument





Section5.5.ManifestFiles

Section5.4.CodinginVB.NET
Section5.6.OtherFiles





Section5.7.AttachingtheSmartDocumentExpansionPack




Section5.9.AFewLastWordsonSmartDocuments

Section5.8.DeployingYourSmartDocumentSolution
Section5.10.SomeFinalThoughts


Chapter6.WorkingwithXMLDatainExcelSpreadsheets
Section6.1.SeparatingDataandLogic

Section6.2.LoadingXMLintoanExcelSpreadsheet





Section6.3.EditingXMLDocumentsinExcel
Section6.4.LoadingandSavingXMLDocumentsfromVBA


Chapter7.UsingSpreadsheetML
Section7.1.SavingandOpeningXMLSpreadsheets

Section7.2.ReadingXMLSpreadsheets




Section7.3.ExtractingInformationfromXMLSpreadsheets



Section7.5.EditingXMLMapswithSpreadsheetML

Section7.4.CreatingXMLSpreadsheets


Chapter8.ImportingandExportingXMLwithMicrosoftAccess
Section8.1.AccessXMLExpectations

Section8.2.ExportingXMLfromAccessUsingtheGUI




Section8.3.ImportingXMLintoAccessUsingtheGUI

Section8.4.AutomatingXMLImportandExport


Chapter9.UsingWebServicesinExcel,Access,andWord
Section9.1.WhatAreWebServices?

Section9.2.TheMicrosoftOfficeWebServicesToolkit




Section9.3.AccessingaSimpleWebServicefromExcel




Section9.5.AccessingRESTWebServiceswithVBA



Section9.7.UsingWebServicesinWord

Section9.4.AccessingMoreComplexWebServices
Section9.6.UsingWebServicesinAccess


Chapter10.DevelopingInfoPathSolutions
Section10.1.WhatIsInfoPath?

Section10.2.InfoPathinContext





Section10.3.ComponentsofanInfoPathSolution



Section10.5.UsingInfoPathDesignMode

Section10.4.AMoreCompleteExample


AppendixA.TheXMLYouNeedforOffice
SectionA.1.WhatIsXML?

SectionA.2.AnatomyofanXMLDocument




AppendixB.TheXSLTYouNeedforOffice
SectionB.1.SortingOuttheAcronyms






SectionB.2.ASimpleTemplateApproach





SectionB.4.AMoreAdvancedExample

SectionB.3.ARule-BasedStylesheet
SectionB.5.Conclusion


AppendixC.TheXSDYouNeedforOffice
SectionC.1.WhatIsXSD?

SectionC.2.CreatingaSimpleSchema




SectionC.3.SchemaParts
SectionC.4.WorkingwithXMLSchema



AppendixD.UsingDTDsandRELAXNGSchemaswithOffice
SectionD.1.WhatAreDTDs?

SectionD.2.WhatIsRELAXNG?






SectionD.3.HowDoIConvertDTDsandRELAXNGtoXSD?
Colophon
Index


Copyright©2004O'ReillyMedia,Inc.
PrintedintheUnitedStatesofAmerica.
PublishedbyO'ReillyMedia,Inc.,1005GravensteinHighway
North,Sebastopol,CA95472.
O'Reillybooksmaybepurchasedforeducational,business,or
salespromotionaluse.Onlineeditionsarealsoavailablefor
mosttitles().Formoreinformation,
contactourcorporate/institutionalsalesdepartment:(800)
998-9938or
NutshellHandbook,theNutshellHandbooklogo,andthe
O'ReillylogoareregisteredtrademarksofO'ReillyMedia,Inc.
Office2003XML,theimageofaMalaypalmcivet,andrelated
tradedressaretrademarksofO'ReillyMedia,Inc.
Manyofthedesignationsusedbymanufacturersandsellersto
distinguishtheirproductsareclaimedastrademarks.Where
thosedesignationsappearinthisbook,andO'ReillyMedia,Inc.
wasawareofatrademarkclaim,thedesignationshavebeen
printedincapsorinitialcaps.
Whileeveryprecautionhasbeentakeninthepreparationofthis
book,thepublisherandauthorsassumenoresponsibilityfor
errorsoromissions,orfordamagesresultingfromtheuseof
theinformationcontainedherein.



Preface
Formanyusers,theappearanceofOffice2003hasmeanta
slightlyupdatedversionofafamiliartool,anotherepisodein
thecontinuousdevelopmentofapopularandwidely-usedpiece
ofsoftware.Forsomeusers,however,theappearanceofOffice
2003isaheraldoftumultuouschange.ThisversionofOffice
liberatestheinformationstoredinmillionsofdocuments
createdusingMicrosoft'sOfficesoftwareoverthepast15years
andmakesitreadilyavailabletoawidevarietyofsoftware.At
thesametime,Office2003hassubstantiallyimprovedits
abilitiesforworkingwithdatathatcomesfromexternal
sources,makingitmucheasiertouseOfficeforthe
examinationandanalysisofinformationthatcamefromother
sources.
XML,theExtensibleMarkupLanguage,liesattheheartofthis
newopenness.XMLhastakenmuchoftheworldbystormsince
itspublicationin1998asaWorldWideWebConsortium(W3C)
Recommendation.XMLprovidesastandardtext-basedformat
forstoringlabeledstructuredcontent.Anenormousvarietyof
toolsforprocessing,creating,andstoringXMLhasappeared
overthelastfewyears,andXMLhasbecomealinguafranca
thatletsdifferentkindsofcomputersanddifferentkindsof
softwarecommunicatewitheachotherallwhilepreservinga
substantiallevelofhumanaccessibility.
ThisbookexplorestheintersectionbetweenOffice2003and
XMLindepth,examininghowthevariousproductsintheOffice
suitecanbothproduceandconsumeXML.Whilethisbook
generallyfocusesonOffice2003itself,somesupporting
technologieswillbeimportantpiecesoftheintegrationpuzzle.

ExtensibleStylesheetLanguageTransformations(XSLT)and
W3CXMLSchema(whichMicrosoftabbreviatesXSD,forXML
SchemaDescriptions)aretwocriticalpiecesforteaching


variouspartsofOfficeaboutthestructuresofXMLdocuments,
whileSOAP(anacronymthatnolongermeansanything)and
HTTPwillbeimportantsupportingtechnologiesfor
communicationsbetweenOfficeandotherprograms.


WhoShouldReadThisBook
Thisbookiswrittenfordeveloperswhowanttobeableto
combineOfficewithothersourcesofinformationand
informationprocessing.Forexample,youmaybeasystems
integratortryingconnectOfficetootherworkflowprocessing,
youmaybeapower-userwhowantstoanalyzeXMLdatasets
inExcelorAccess,oryoumaybeanarchivistwhoneedsto
extractcrucialinformationfromexistingOfficedocuments.
Therearemanymorepossibilitiesoutthere,ofcourse.
Thisbookiswrittenfordeveloperswhoalreadyhavean
understandingofhowtousethevariousprogramsinthe
MicrosoftOfficesuite.SomebasicinstructioninXML,XSLT,and
schema-relatedtechnologiesisprovidedintheappendixes,but
forthemostpartthisbookassumesthatyoucomewithan
understandingofXMLandrelatedtechnologies.


WhoShouldNotReadThisBook
IfallofyourworkiscompletelycontainedwithintheOfficesuite

itself,youprobablydon'tneedthisbookunlessyouhavea
particularlytrickyproblemintegratinginformationamongthe
programs.If,forinstance,youjustcreateWorddocuments
usingtemplates,youmayevenbeabletocreateXML
documentsusingthosetemplateswithoutreadingthisbook.
Similarly,developerswhocreateself-containedspreadsheets
anddatabaseswillmostlikelynotneedtolearnaboutthese
technologies.
IfyouhaveneverusedMicrosoftOfficeorXMLbefore,youmay
wanttoconsiderexploringthosetechnologiesingreaterdepth
beforereadingthisbook.


OrganizationofThisBook
ThisbookstartsinChapter1withanoverviewoftheXML
featuresincludedinthevariousOffice2003components.While
mostofthecomponentshaveXMLfeatures,theyallinteract
withXMLquitedifferently,andcomparingthestoriesofeachof
theproductsmakessensebeforeleapingintothecomponentspecificdetails.
Therestofthebookexplorestheindividualapplicationsinthe
MicrosoftOfficeSuite,asallofthemtakedifferentapproaches
toworkingwithXML.AslearningMicrosoftWord'sinternalXML
format,WordprocessingML,isacrucialfirststepfordeveloping
anyXMLapplicationsaroundit,Chapter2examineshowWord
representsitsdocumentsinXML.Chapter3explorestheuseof
XSLTtoconvertWordMLtootherformsofXML,andthen
Chapter4returnstoWordtocombineWordML,XSLT,XML
Schema,andtheWorduserinterfacetocreateenvironments
whereuserscancreatecustomXMLdocuments.Chapter5
takesalookatSmartDocuments,amuchmorelabor-intensive

butverypowerfulcombinationofWord'sfeatureswithexternal
code.
Exceloffersaslightlydifferentsetoffeaturesforanalyzingand
processingXMLandforsavingspreadsheetsasXML.Chapter6
exploreshowExcelletsusersloadandworkwithXMLdataina
varietyofvocabularies,andChapter7takesacloselookat
creatingandconsumingSpreadsheetML.
TheXMLcapabilitiesofMicrosoftAccesshavebeenenhanced
forOffice2003,andthosefeaturesaredescribedinChapter8.
Chapter9takesalookatadifferentsetofXMLfeaturesin
Office,thosespecifictoWebServices,andexamineshowtouse
theminExcel,Access,andWord.
Chapter10takesacloselookatInfoPath,anapplication


MicrosofthasaddedtotheEnterpriseversionoftheOfficesuite
specificallytoletusersinteractwithXMLandWebServices
throughaforms-basedinterface.
Thelastsectionofthebookisacollectionofappendixes,
introducingvariousXMLtechnologiesthatmaybeusefulin
workingwithOffice.Theyaren'tintendedtosubstitutefora
thoroughunderstanding,buthopefullytheywillbeenoughto
getyoustarted.


SupportingBooks
Evenifyoufeelyouarereadyforthisbook,youmaywantto
exploresomeoftheXMLtechnologiesingreaterdepththanis
possiblehere.Thefollowinglistsoffersomegoodplacesto
start.

AppendixAprovidesabrieforientationtoXML,butotherbooks
thatgointofarmoredeptharereadilyavailable.Forasolid
groundinginXML,considerthesebooks:
ErikRay,LearningXML(O'Reilly)
ElliotteRustyHarold&W.ScottMeans,XMLinaNutshell
(O'Reilly)
ElizabethCastro,XMLfortheWorldWideWeb:Visual
QuickStartGuide(PeachpitPress)
AppendixBprovidesabrieforientationtoXSLT,butmany
projectsmayrequireamoresophisticatedunderstandingof
XSLT.FormoreinformationonXSLT,trythesebooks:
MichaelFitzgerald,LearningXSLT(O'Reilly)
DougTidwell,XSLT(O'Reilly)
SalMangano,XSLTCookbook(O'Reilly)
MichaelKay,XSLTProgrammer'sReference(Wrox)
JeniTennsion,XSLT&XPath:OntheEdge(JohnWiley&
Sons)


JohnE.Simpson,XPathandXPointer(O'Reilly)
AppendixCexploresW3CXMLSchemabriefly,butthistopicis
definitelyworthyofamuchlargerbook.Somegoodoptions
include:
EricvanderVlist,XMLSchema(O'Reilly)
PriscillaWalmsley,DefinitiveXMLSchema(Prentice-Hall)
AppendixDbrieflydescribeshowtouseRELAXNG,asimpler
alternativetoW3CXMLSchema,tocreateW3CXMLSchema
files.ForamorethoroughexplanationofRELAXNG,see:
EricvanderVlist,RELAXNG(O'Reilly)
YoumayalsowanttocomplementyourXMLknowledgewith

moreinformationontherapidlygrowingworldofWebServices.
Foralotmoredetail,see:
EthanCerami,WebServicesEssentials(O'Reilly)
JamesSnell,DougTidwell,andPavelKulchenko,
ProgrammingWebServiceswithSOAP(O'Reilly)
EricNewcomer,UnderstandingWebServices:SOAP,WSDL,
andUDDI(AddisonWesley)
AlexFerraraandMatthewMacDonald,Programming.NET
WebServices(O'Reilly)
O'ReillyalsooffersacollectionofprogrammingbooksonXML
thatmayproveuseful.Theyinclude:


NielM.Bornstein,.NET&XML(O'Reilly)
BrettMcLaughlin,Java&XML(O'Reilly)
ErikT.RayandJasonMcIntosh,Perl&XML(O'Reilly)
ChristopherJonesandFredL.Drake,Jr.,Python&XML
(O'Reilly)
TherearealsomanyonlineresourcesforXML.Twoparticularly
goodplacestostartlookingareXML.comandxmlhack.com.
XML.comispartoftheO'ReillyNetwork,andcoversthelatest
newsinXMLonaweeklybasis.Forsmallerstoriesandaless
formalapproach,tryxmlhack.com.Bothhaveavarietyoflinks
tootherXMLresourcesandmailinglists.
ThereisanenormousnumberofbooksonMicrosoftOfficeand
itscomponentapplications.Mybestadviceinthisfieldistovisit
abookstoreandexamineafewbookstoseewhichbestfits
yourlearningstyleandyourinterests.(Thesameistrueofthe
XMLbooks,butthelistaboveprovidesastartingpoint.)Also,if
you'dliketoknowmoreabouthowOffice'scompetitor

OpenOffice.orghandlesXMLprocessing,seeJ.David
Eisenberg'sexcellentOpenOffice.orgXMLEssentialsat
o/.


ConventionsUsedinThisBook
Thefollowingfontconventionsareusedinthisbook:
Italicisusedfor:
Pathnames,filenames,programnames,andstylesheet
names
Internetaddresses,suchasdomainnamesandURLs
Newitemswheretheyaredefined
ConstantWidthisusedfor:
Commandlinesandoptionsthatshouldbetypedverbatim
Namesandkeywordsinprograms,includingmethod
names,variablenames,andclassnames
XMLelementtags
Constant-WidthBoldisusedforemphasisinprogramcode
lines.
Constant-WidthItalicisusedtoindicatereplaceable
argumentswithinprogramcode.


UsingCodeExamples
Thisbookisheretohelpyougetyourjobdone.Ingeneral,you
mayusethecodeinthisbookinyourprogramsand
documentation.Youdonotneedtocontactusforpermission
unlessyou'rereproducingasignificantportionofthecode.For
example,writingaprogramthatusesseveralchunksofcode
fromthisbookdoesnotrequirepermission.Sellingor

distributingaCD-ROMofexamplesfromO'Reillybooksdoes
requirepermission.Answeringaquestionbycitingthisbook
andquotingexamplecodedoesnotrequirepermission.
Incorporatingasignificantamountofexamplecodefromthis
bookintoyourproduct'sdocumentationdoesrequire
permission.
Weappreciate,butdonotrequire,attribution.Anattribution
usuallyincludesthetitle,author,publisher,andISBN.For
example:"Office2003XML,byEvanLenz,MaryMcRae,and
SimonSt.Laurent.Copyright2004O'ReillyMedia,Inc.,0-59600538-5."
Ifyoufeelyouruseofcodeexamplesfallsoutsidefairuseor
thepermissiongivenabove,feelfreetocontactusat



HowtoContactUs
Wehavetestedandverifiedtheinformationinthisbooktothe
bestofourability,butyoumayfindthatfeatureshavechanged
(oreventhatwehavemadeafewmistakes!).Pleaseletus
knowaboutanyerrorsyoufind,aswellasyoursuggestionsfor
futureeditions,bywritingto:
O'ReillyMedia,Inc.
1005GravensteinHighwayNorth
Sebastopol,CA95472
1-800-998-9938(intheU.S.orCanada)
1-707-829-0515(international/local)
1-707-829-0104(fax)
Youcanalsosendusmessageselectronically.Tobeputonthe
mailinglistorrequestacatalog,sendemailto:


Toasktechnicalquestionsorcommentonthebook,sendemail
to:

Wehaveawebsiteforthebook,wherewe'lllistexamples,
errata,andanyplansforfutureeditions.Youcanaccessthis
pageat:
/>Formoreinformationabutthisbookandothers,seetheO'Reilly
website:



Acknowledgments
FromEvanLenz
Thisprojecthasbeenawonderfulchallengeandpersonal
learningexperience.Thankyou,Simon,forinvitingmetohelp
writethisbook.You'vebeenajoytoworkwith,bothasmy
editorandasmyco-author.ThanksalsotoMaryMcRaefor
joiningusonshortnotice,bringingtolightsomeimportant
areasweweretooscaredtotouch.Iwouldalsoliketothank
technicalreviewersJeniTennisonandJeffMaggardfortheir
helpfulinsights.Jeni'scommentsinparticularwereprompt,
thorough,and(asalways)spot-on.
Thereareanumberofotherpeoplewho,directlyorindirectly,
madeitpossibleformetohelpwritethisbook.Specialthanks
goto:JamesCooperatSeattleUniversitySchoolofLaw,forso
generouslyallowingmetimetoworkonthisbook;writerslike
MichaelKayandMeroldWestphal,whoshowedmethatit's
possibletobeclearwithoutcompromisingrigor;mydad,
HerbertA.Lenz,whoalwaysencouragedmetowrite;my
grandfather,HerbertJ.Lenz,wholivedhislifeasanexampleof

whatitmeanstogiveandlovesacrificially;mybeautifulwife,
Lisa,andpreciouschildren,SamuelandMorgan,forbeing
patientandtolerantofDaddy'sextraworkinghours;and,
finally,tomyLord,whoisleadingmeonajourneyajourneyon
whichthisprojecthasbeenanimportantstep.

FromMaryMcRae
Learningtheintricaciesofanewly-developedapplicationduring
betatestingisnevereasy,andwouldnothavebeenpossible
withoutthehelpofseveralindividualsatMicrosoft,including


JeanPaoli,JoeAndreshak,BrianJones,MartinSawicki,and
AchintSrivastava.Myco-workers,DaveGiusto,RicoMcCahon,
andJeffPouliot,werenotonlysupportive,butalsoinstrumental
inhelpingtoresolvetechnicalchallenges.Specialthanksgoto
co-authorsSimonSt.LaurentandEvanLenzforinvitingmeto
beapartofthisproject,andmostimportantlytomyfamily,
SteveandHeather,fortheirloveandsupport,andforkeeping
thecoffeeflowing.

FromSimonSt.Laurent
I'dliketothankmywife,TraceyCranston,forputtingupwith
meoverthecourseofwritingthisbook.Withoutherkindness,
asusual,I'msureIwouldhavedisappearedinapuffofflame
andsmokesometimearoundthemiddleofthelastchapter.I'm
delightedtohavehadEvanLenzandMaryMcRaeascoauthors,andwouldliketothankJeniTennison,JeffMaggard,
andJeffWebbfortheirtechnicalinsightsoverthecourseof
reviewingthisbook.EddDumbillcontributedalargeportionof
AppendixAandwaskindenoughtoonlygentlychidemefor

pursuingandwritingthisbook.


Chapter1.MicrosoftOfficeandXML
MostpeoplewhouseMicrosoftOfficeseetheindividual
applicationsastoolsforgettingtheirworkdone,notasgeneralpurposeinterfacestoinformation.Sure,peopleregularly
exchangeWord,Excel,andPowerPointfilesoveremail,and
therearelotsoftimeswhenyouneedtoreusefilesyoucreated
earlier,butforthemostpartinformationcreatedinMicrosoft
OfficestaysinMicrosoftOffice,comingorgoingfromelsewhere
largelybycut-and-pasteorbyoftenimperfectfileconversions.
WiththelatestWindows-basedversionofOffice,Microsofthas
takenariskystep,openingupOfficequitedrastically.
Developers,eventhosewhoaren'tusingMicrosoftOfficeoreven
MicrosoftWindowswillbeabletoeasilyprocesstheinformation
insideofWordandExcelfiles.InsteadofjustcreatingWord
documents,userswillbeabletocreatedatafilesthatcanbe
sharedwithotherprocessesandsystems.Exceluserswillbe
abletoanalyzedatafromamuchwidervarietyofsources,and
Accessuserswillbeabletoexchangeinformationwithother
databasesandprogramsmuchmoreeasilythanbefore.Users
oftheEnterpriseEditionofOfficewillalsohaveanewformsbasedinterface,InfoPath,forworkingwithotherprograms.
AllofthesethingsarepossiblebecauseMicrosofthaschosento
integrateXMLdeeplyintothecoreofMicrosoftOffice.


1.1WhyXML?
ExtensibleMarkupLanguage(XML)definesatext-basedformat
containinglabelsandstructures.XMLlooksalotlikeHTML,the
primarylanguageusedbywebbrowsers,butXMLletsusers

anddeveloperscreatetheirownformatsratherthanlimiting
themtoasinglevocabulary.TheXML1.0specificationappeared
in1998,andawidevarietyofapplicationshaveaddedXML
functionalityorbeenbuiltaroundXMLsincethen,from
databasestostocktickerstoeditorstowebbrowsersto
inventorysystems.WhileXMLstillrequiresreadersandwriters
ofdocumentstohavesomesharedunderstandingsaboutthe
documentstheycreateandinterpret,itprovidesabasicformat
thatiseasilyprocessedinawidevarietyofdifferent
environmentsit'sevenfrequentlyhuman-readable.

Ifyou'veneverworkedwithXMLandneedtoknowthetechnicaldetails
ofhowtoreadandcreateXMLdocuments,youshouldreadAppendixA
ofthisbook.Thischapterprovidesahigh-levelviewofwhatXML
makespossibleandwhyitmakessenseforOffice,notadetailed
explanationofwhatXMLis.

MicrosofthasbeeninvolvedwithXMLforalongtime.A
Microsoftemployee,JeanPaoli(lateraproductmanagerfor
MicrosoftOffice),wasoneoftheeditorsoftheXML1.0
specificationattheWorldWideWebConsortium(W3C).
MicrosofthasbeeninvolvedwithnearlyeveryXMLspecification
attheW3Csince,andhasparticipatedinawidevarietyofXMLrelatedprojectsatotherorganizationsaswell.Microsoftbegan
workonXMLtoolsbeforethespecificationwascomplete,
buildingtheMSXMLtoolkitintoInternetExplorerandthen
expandinginto.NETandWebServicesdevelopment.Moreand


moreMicrosoftsoftwarehasXMLatitscore,andthislatest
versionofOfficejoinsalargegroupofMicrosoftapplications

usingXML.
XMLhasbeenacrucialpartofMicrosoft'sdrivetoputits
programsinmoreandmoreenvironments.XMLmakesit
possibleforMicrosoftprogramstocommunicatewithprograms
fromIBM,Sun,Oracle,andothers,andgreatlysimplifiesthe
taskofintegratingnewtoolswithcustomcode.Developerscan
buildapplicationsaroundXML,anddon'thavetoworryabout
theinternaldetailsofcomponentswithwhichtheyshareXML.
Equallyimportant,developersusingXMLdon'thavetoworry
aboutbeinglockedintoaformatthat'sproprietarytoasingle
vendor,becauseXMLisopenbydesign.Therulesforwhatis
andwhatisnotalegitimateXMLdocumentareveryclear,and
whileit'spossibletocreateXMLthatisdifficulttoread,a
combinationofstrictgrammaticalrulesandwidely-sharedbest
practicesencouragesdeveloperstocreateformatsthatareeasy
toworkworth.XMLalsoincludesfeaturesthatsupport
internationalizationandlocalization,makingitmucheasierto
consistentlyrepresentinformationacrosslanguageboundaries
aswellasprogramboundaries.
ByaddingXMLtotheMicrosoftOfficemix,Microsoftboth
makesitmucheasiertointegrateOfficewithMicrosoft
programsthatalreadyunderstandXML(likeSQLServer,
SharePointServer,andthetoolkitsinVisualStudio)andfor
developerstocreatetheirowncombinationsofMicrosoftOffice
andothersoftware.ThisallowsMicrosofttoconnecttoamuch
widervarietyofsoftwarewithoutmakingusersworryabout
whetherthey'llbeabletousethatinformationelsewhere.XML
alsoletsusersgomuchfurtherinbuildingcustomapplications
aroundMicrosoftOffice.
XMLitselfisonlyonepieceofalargerXMLpuzzle.Extensible

StylesheetLanguageTransformations(XSLT)isanXML-based
languagefortransformingoneXMLdocumentintoanother,
usingtemplates.XSLTisattheheartofmuchoftheOfficeXML


work,akeyingredientformovingfromtheXMLyouhavetothe
XMLOfficeneedsandvice-versa.Anotherspecification,W3C
XMLSchema,providesdescriptionsofdocumentstructures
whichthevariousOfficeapplicationscanuseasafoundationfor
theirprocessing.MicrosoftreferstothisasXMLSchema
Definitionlanguage,orjustXSD,buttheW3Citselfdidn't
provideanacronym.SomesourcesrefertoitasWXS(forW3C
XMLSchema),othersasXSD,someasXSDL,andsomejustas
XMLSchema.BecauseMicrosoftgenerallyreferstoitasXSD,
thisbookwilldothesame.
OneaspectofXMLdevelopmentinparticulardeservesspecial
mention,becauseMicrosofthasintegrateditintoOffice
alongsidethemoregenericXMLeditingandanalysisfunctions.
WebServices,builtontheSOAP,WSDL,andUDDI
specifications,provideasetoftoolsforcommunicatingwith
otherprogramsusingXML.Youcanstillreadandwritefiles
fromyourlocalcomputer,afileserver,orawebserver,butWeb
Servicesexposeadditionalfunctionalityofprogramslocated
anywhereonthenetwork.


×