1. Trang chủ
  2. » Công Nghệ Thông Tin

OReilly office 2003 XML may 2004 ISBN 0596005385

1,2K 138 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 1.188
Dung lượng 11,36 MB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

For example, you may be a systemsintegrator trying connect Office to other workflow processing,you may be a power-user who wants to analyze XML data sets in Excel or Access, or you may b

Trang 2

information from Office documents into other systems.

Trang 7

Printed in the United States of America

Published by O'Reilly Media, Inc., 1005 Gravenstein HighwayNorth, Sebastopol, CA 95472

O'Reilly books may be purchased for educational, business, orsales promotional use Online editions are also available for

most titles (http://safari.oreilly.com) For more information,contact our corporate/institutional sales department: (800)

While every precaution has been taken in the preparation of thisbook, the publisher and authors assume no responsibility forerrors or omissions, or for damages resulting from the use ofthe information contained herein

Trang 8

For many users, the appearance of Office 2003 has meant aslightly updated version of a familiar tool, another episode inthe continuous development of a popular and widely-used piece

of software For some users, however, the appearance of Office

2003 is a herald of tumultuous change This version of Officeliberates the information stored in millions of documents

created using Microsoft's Office software over the past 15 yearsand makes it readily available to a wide variety of software Atthe same time, Office 2003 has substantially improved its

abilities for working with data that comes from external

sources, making it much easier to use Office for the

examination and analysis of information that came from othersources

XML, the Extensible Markup Language, lies at the heart of thisnew openness XML has taken much of the world by storm sinceits publication in 1998 as a World Wide Web Consortium (W3C)Recommendation XML provides a standard text-based formatfor storing labeled structured content An enormous variety oftools for processing, creating, and storing XML has appearedover the last few years, and XML has become a lingua francathat lets different kinds of computers and different kinds of

software communicate with each otherall while preserving asubstantial level of human accessibility

This book explores the intersection between Office 2003 andXML in depth, examining how the various products in the Officesuite can both produce and consume XML While this book

generally focuses on Office 2003 itself, some supporting

technologies will be important pieces of the integration puzzle.Extensible Stylesheet Language Transformations (XSLT) andW3C XML Schema (which Microsoft abbreviates XSD, for XMLSchema Descriptions) are two critical pieces for teaching

Trang 9

communications between Office and other programs

Trang 10

This book is written for developers who want to be able to

combine Office with other sources of information and

information processing For example, you may be a systemsintegrator trying connect Office to other workflow processing,you may be a power-user who wants to analyze XML data sets

in Excel or Access, or you may be an archivist who needs toextract crucial information from existing Office documents.There are many more possibilities out there, of course

This book is written for developers who already have an

understanding of how to use the various programs in the

Microsoft Office suite Some basic instruction in XML, XSLT, andschema-related technologies is provided in the appendixes, butfor the most part this book assumes that you come with anunderstanding of XML and related technologies

Trang 11

If all of your work is completely contained within the Office suiteitself, you probably don't need this book unless you have a

particularly tricky problem integrating information among theprograms If, for instance, you just create Word documents

using templates, you may even be able to create XML

documents using those templates without reading this book.Similarly, developers who create self-contained spreadsheetsand databases will most likely not need to learn about thesetechnologies

If you have never used Microsoft Office or XML before, you maywant to consider exploring those technologies in greater depthbefore reading this book

Trang 12

This book starts in Chapter 1 with an overview of the XML

features included in the various Office 2003 components Whilemost of the components have XML features, they all interactwith XML quite differently, and comparing the stories of each ofthe products makes sense before leaping into the component-specific details

The rest of the book explores the individual applications in theMicrosoft Office Suite, as all of them take different approaches

to working with XML As learning Microsoft Word's internal XMLformat, WordprocessingML, is a crucial first step for developingany XML applications around it, Chapter 2 examines how Wordrepresents its documents in XML Chapter 3 explores the use ofXSLT to convert WordML to other forms of XML, and then

Chapter 4 returns to Word to combine WordML, XSLT, XML

Schema, and the Word user interface to create environmentswhere users can create custom XML documents Chapter 5

takes a look at Smart Documents, a much more labor-intensivebut very powerful combination of Word's features with externalcode

Excel offers a slightly different set of features for analyzing andprocessing XML and for saving spreadsheets as XML Chapter 6explores how Excel lets users load and work with XML data in avariety of vocabularies, and Chapter 7 takes a close look at

creating and consuming SpreadsheetML

The XML capabilities of Microsoft Access have been enhancedfor Office 2003, and those features are described in Chapter 8.Chapter 9 takes a look at a different set of XML features in

Office, those specific to Web Services, and examines how to usethem in Excel, Access, and Word

Chapter 10 takes a close look at InfoPath, an application

Trang 13

through a forms-based interface

The last section of the book is a collection of appendixes,

introducing various XML technologies that may be useful in

working with Office They aren't intended to substitute for athorough understanding, but hopefully they will be enough toget you started

Trang 14

Even if you feel you are ready for this book, you may want toexplore some of the XML technologies in greater depth than ispossible here The following lists offer some good places to

start

Appendix A provides a brief orientation to XML, but other booksthat go into far more depth are readily available For a solidgrounding in XML, consider these books:

Trang 15

Appendix C explores W3C XML Schema briefly, but this topic isdefinitely worthy of a much larger book Some good optionsinclude:

Eric van der Vlist, XML Schema (O'Reilly)

Priscilla Walmsley, Definitive XML Schema (Prentice-Hall)

Appendix D briefly describes how to use RELAX NG, a simpleralternative to W3C XML Schema, to create W3C XML Schemafiles For a more thorough explanation of RELAX NG, see:

Eric van der Vlist, RELAX NG (O'Reilly)

You may also want to complement your XML knowledge withmore information on the rapidly growing world of Web Services.For a lot more detail, see:

Trang 16

OpenOffice.org handles XML processing, see J David

Eisenberg's excellent OpenOffice.org XML Essentials at

http://books.evc-cit.info/

Trang 17

The following font conventions are used in this book:

Italic is used for:

Pathnames, filenames, program names, and stylesheetnames

Constant-Width Italic is used to indicate replaceable

arguments within program code

Trang 18

This book is here to help you get your job done In general, youmay use the code in this book in your programs and

documentation You do not need to contact us for permissionunless you're reproducing a significant portion of the code Forexample, writing a program that uses several chunks of codefrom this book does not require permission Selling or

distributing a CD-ROM of examples from O'Reilly books does

require permission Answering a question by citing this bookand quoting example code does not require permission

Incorporating a significant amount of example code from this

book into your product's documentation does require

permission

We appreciate, but do not require, attribution An attributionusually includes the title, author, publisher, and ISBN For

example: "Office 2003 XML, by Evan Lenz, Mary McRae, and

00538-5."

Simon St.Laurent Copyright 2004 O'Reilly Media, Inc., 0-596-If you feel your use of code examples falls outside fair use orthe permission given above, feel free to contact us at

permissions@oreilly.com

Trang 19

We have tested and verified the information in this book to thebest of our ability, but you may find that features have changed(or even that we have made a few mistakes!) Please let us

know about any errors you find, as well as your suggestions forfuture editions, by writing to:

info@oreilly.com

To ask technical questions or comment on the book, send emailto:

bookquestions@oreilly.com

We have a web site for the book, where we'll list examples,

errata, and any plans for future editions You can access thispage at:

http://www.orelly.com/catalog/officexml

For more information abut this book and others, see the O'Reillyweb site:

http://www.oreilly.com

Trang 20

From Evan Lenz

This project has been a wonderful challenge and personal

learning experience Thank you, Simon, for inviting me to helpwrite this book You've been a joy to work with, both as myeditor and as my co-author Thanks also to Mary McRae for

joining us on short notice, bringing to light some important

areas we were too scared to touch I would also like to thanktechnical reviewers Jeni Tennison and Jeff Maggard for theirhelpful insights Jeni's comments in particular were prompt,thorough, and (as always) spot-on

There are a number of other people who, directly or indirectly,made it possible for me to help write this book Special thanks

go to: James Cooper at Seattle University School of Law, for sogenerously allowing me time to work on this book; writers likeMichael Kay and Merold Westphal, who showed me that it's

possible to be clear without compromising rigor; my dad,

Herbert A Lenz, who always encouraged me to write; my

grandfather, Herbert J Lenz, who lived his life as an example ofwhat it means to give and love sacrificially; my beautiful wife,Lisa, and precious children, Samuel and Morgan, for being

patient and tolerant of Daddy's extra working hours; and,

finally, to my Lord, who is leading me on a journeya journey onwhich this project has been an important step

From Mary McRae

Learning the intricacies of a newly-developed application duringbeta testing is never easy, and would not have been possiblewithout the help of several individuals at Microsoft, including

Trang 21

in helping to resolve technical challenges Special thanks go toco-authors Simon St.Laurent and Evan Lenz for inviting me to

be a part of this project, and most importantly to my family,Steve and Heather, for their love and support, and for keepingthe coffee flowing

From Simon St.Laurent

I'd like to thank my wife, Tracey Cranston, for putting up with

me over the course of writing this book Without her kindness,

as usual, I'm sure I would have disappeared in a puff of flameand smoke sometime around the middle of the last chapter I'mdelighted to have had Evan Lenz and Mary McRae as co-

authors, and would like to thank Jeni Tennison, Jeff Maggard,and Jeff Webb for their technical insights over the course ofreviewing this book Edd Dumbill contributed a large portion ofAppendix A and was kind enough to only gently chide me forpursuing and writing this book

Trang 22

Most people who use Microsoft Office see the individual

purpose interfaces to information Sure, people regularly

applications as tools for getting their work done, not as general-exchange Word, Excel, and PowerPoint files over email, and

there are lots of times when you need to reuse files you createdearlier, but for the most part information created in MicrosoftOffice stays in Microsoft Office, coming or going from elsewherelargely by cut-and-paste or by often imperfect file conversions

With the latest Windows-based version of Office, Microsoft hastaken a risky step, opening up Office quite drastically

Developers, even those who aren't using Microsoft Officeor evenMicrosoft Windowswill be able to easily process the informationinside of Word and Excel files Instead of just creating Worddocuments, users will be able to create data files that can beshared with other processes and systems Excel users will beable to analyze data from a much wider variety of sources, andAccess users will be able to exchange information with otherdatabases and programs much more easily than before Users

based interface, InfoPath, for working with other programs

of the Enterprise Edition of Office will also have a new forms-All of these things are possible because Microsoft has chosen tointegrate XML deeply into the core of Microsoft Office

Trang 23

Extensible Markup Language (XML) defines a text-based formatcontaining labels and structures XML looks a lot like HTML, theprimary language used by web browsers, but XML lets usersand developers create their own formats rather than limitingthem to a single vocabulary The XML 1.0 specification appeared

environmentsit's even frequently human-readable

If you've never worked with XML and need to know the technical details

of how to read and create XML documents, you should read Appendix A

of this book This chapter provides a high-level view of what XML makes possible and why it makes sense for Office, not a detailed explanation of what XML is.

Microsoft has been involved with XML for a long time A

Microsoft employee, Jean Paoli (later a product manager forMicrosoft Office), was one of the editors of the XML 1.0

specification at the World Wide Web Consortium (W3C)

Microsoft has been involved with nearly every XML specification

related projects at other organizations as well Microsoft beganwork on XML tools before the specification was complete,

at the W3C since, and has participated in a wide variety of XML-building the MSXML toolkit into Internet Explorer and then

expanding into NET and Web Services development More and

Trang 24

version of Office joins a large group of Microsoft applicationsusing XML

XML has been a crucial part of Microsoft's drive to put its

programs in more and more environments XML makes it

possible for Microsoft programs to communicate with programsfrom IBM, Sun, Oracle, and others, and greatly simplifies thetask of integrating new tools with custom code Developers canbuild applications around XML, and don't have to worry aboutthe internal details of components with which they share XML.Equally important, developers using XML don't have to worryabout being locked into a format that's proprietary to a singlevendor, because XML is open by design The rules for what isand what is not a legitimate XML document are very clear, andwhile it's possible to create XML that is difficult to read, a

combination of strict grammatical rules and widely-shared bestpractices encourages developers to create formats that are easy

to work worth XML also includes features that support

internationalization and localization, making it much easier toconsistently represent information across language boundaries

XML itself is only one piece of a larger XML puzzle ExtensibleStylesheet Language Transformations (XSLT) is an XML-basedlanguage for transforming one XML document into another,

using templates XSLT is at the heart of much of the Office XML

Trang 25

which the various Office applications can use as a foundation fortheir processing Microsoft refers to this as XML Schema

Definition language, or just XSD, but the W3C itself didn't

provide an acronym Some sources refer to it as WXS (for W3CXML Schema), others as XSD, some as XSDL, and some just asXML Schema Because Microsoft generally refers to it as XSD,this book will do the same

One aspect of XML development in particular deserves specialmention, because Microsoft has integrated it into Office

alongside the more generic XML editing and analysis functions.Web Services, built on the SOAP, WSDL, and UDDI

specifications, provide a set of tools for communicating withother programs using XML You can still read and write files

from your local computer, a file server, or a web server, but WebServices expose additional functionality of programs locatedanywhere on the network

Trang 26

documents and people who primarily use Access to create andpresent databases

The most commonly discussed division in the XML world is thedivide between documents and data XML's predecessor,

Standard Generalized Markup Language (SGML) was used

primarily for document management While having structures indocuments was a key feature for organizations with huge

numbers of documents like various departments of defense, theU.S Internal Revenue Service, airplane manufacturers, andpublishers, the structures were generally seen as labels applied

to documents, not as structures defining the contents of thedocuments Documents have to be accessible to humans as well

as computers, and document structures need to be able to keep

up with the many intricate structures humans create to solveparticular problems

Developers who focus on data structures typically see XML as atool for creating labeled containers for information While theremay be some variations in that data and perhaps even someintricate data structures, the contents are generally expected toconform to the structures, not the other way around

Programmers who want to exchange data typically start by

defining structures, and build code around those structures.Many program structures, especially efficient program

Trang 27

because of different contexts or people adding extra layers oflabels and structures

While these two camps are often seen as separate and mutuallysuspicious, they can and do mix Many documents contain somestrongly structured information, like tables or lists, and

sometimes data needs an escape hatch for possibilities thatcan't all be predicted in advance Databases have long had

fields that can support information in "rich" formats, from

simple text with bold and italic to complex multimedia XML isnot a cure-all that can make all of these different views on

information play nicely together, but it does offer enormous

inherent flexibility for representing different kinds and styles ofinformation (Sadly, no XML features appear in Macintosh

versions of Office.)

Trang 28

Microsoft Office has always bundled a set of tools specialized forworking with information of particular kinds The new XML

functionality continues that tradition, with each application inthe bundle using XML in ways that fit its particular task

Microsoft has also added a new application, InfoPath, to the

Enterprise Edition of Microsoft Office, filling a common businessneed for flexible forms-based interfaces to structured

information

1.3.1 Word: Editing Documents

Word began as a program that let people express their thoughts

on paper, and most users tend to think of it as a convenientlyeditable typewriter Although Word has added more featuresover time, like mail merge capabilities and web page editing, it

is still squarely focused on documents While it's possible to useWord as a calculator or a database, its primary strength hasalways been the creation of documents

Microsoft has taken Word's traditional document-orientation andextended it into the world of document-oriented XML Word

already deals with structured documents through features likestyles, footnotes, forms, and comments, and is quite capable ofsupporting complex layers of variable structure When askedwhat they want in an XML document editor, many people citetheir experience using Wordand Microsoft has pretty much giventhat to them

Word embraces XML on two levels Without much effort, userscan save any Word document as XML, using a vocabulary thatreflects Word's native understanding of the document Styles,formatting, comments, revision marks, metadata, and

Trang 29

preserved Better still, all this information (except for embeddedobjects, stored as Base64-encoded strings) is readily accessible,and developers can use any XML tools or even a text editor toexplore and process it Word can open these files as if they

were doc files as well, making it possible for other applications

to create XML documents explicitly for consumption by MicrosoftWord

Word takes these features to the next level by allowing

developers to create their own XML vocabularies and edit thosedocuments using Word, as shown in Figure 1-1 This takes moreeffort as well as an understanding of XML, XSLT, and XSD, butthat understanding is only necessary to create the templates,not to use them Once the templates are created, users cansimply edit XML within the ordinary confines of Word They caneven tell Word to show them the same information with a

different set of presentation choices, making it easy to reuseinformation or edit documents in a form convenient for editing,while presenting it more formally later

Figure 1-1 Editing an XML document in Microsoft

Word 2003

Trang 30

information as XML is a sizable step, but Word has aimed higherwith its approach to letting users edit the XML of their choice inWord rather than the XML of Microsoft's choice This should

Trang 31

themselves, providing an interface to problem-solving tools thatpeople beyond their creators can use

Excel has had its own XML format since Excel XP While thisformat doesn't include quite everythingVisual Basic for

Applications code isn't included, and charts aren't eitherthisformat includes enough information that it's possible for

application to mine Excel spreadsheets and extract their

information A common complaint about spreadsheets

(especially among database purists) is that information goes inbut doesn't come out Microsoft's XML Spreadsheet format isrelatively easy to interpret and provides a foundation for

exchanging information between Excel and other applications

Excel 2003 goes beyond having an XML format While it's

certainly possible for other applications to create XML

Spreadsheet files containing their information, it's generallymore convenient to be able to open whatever XML files are

already available (even without a schema) and analyze themwithin Excel, as shown in Figure 1-2 This makes it possible tocreate a spreadsheet that can analyze any given XML

documentsay, monthly sales dataand keep using that same

spreadsheet on new data when it appears

Figure 1-2 Working with XML data mapped into

Microsoft Excel 2003.

Trang 32

spreadsheet, letting the spreadsheet stay up to date even whenthe data it first analyzed isn't To some extent this is like

connecting Excel to a database, but it's a good deal more

flexible If your document structures are simple enough, youcan also use Excel as a simple XML editor

1.3.3 Access: Sharing Data

Access remains a relational database for the desktop, providingconvenient local storage of structured information as well as aninterface for information on both local and remote databases

Of all the products in the Office suite, Access is the strictest indemanding that information conform to predefined rules, usingthose structures as a foundation for all the other work it

performs

Like Excel, Access has had some XML support in earlier

versions, supporting an XML vocabulary for importing and

Trang 33

transformations when importing or exporting information, andgreater standards-compliance for both XSLT and XSD You cansee Access' XML export functionality in Figure 1-3 These

features are also now more accessible from applications builtusing Access

Figure 1-3 Exporting XML in Microsoft Access

2003

Because Access is built on a relational database foundation, itdoesn't really make sense to drive XML into its core It's

possible to recreate tables in XML, but that loses the randomaccess and indexing features that make relational databases sogood at quickly processing structured information Storing XMLdocuments inside of relational databases is also possible, butagain, the costs are high Communicating with the outside

world using XML seems to provide the best balance between

Trang 34

it does best

1.3.4 InfoPath: Editing Structured Information

InfoPath is a new addition to Microsoft Office, and only comes inthe Enterprise Edition of Office, though it is also available forpurchase as a standalone product Unlike the other Office

applications, which are largely self-sufficient, InfoPath is

designed to connect users to other services and other users,and was built for the explicit purpose of working with XML

InfoPath provides both an environment for creating forms-based interfaces to structured information (stored in XML,

naturally) and a framework for connecting that information toweb, web service, and email applications InfoPath can serve as

a frontend to Microsoft's SharePoint Server, but it can also

connect to other applications that can process XML

InfoPath fills a gap between the document-oriented vision ofWord and the data-oriented approaches of Excel and Access Alot of information is too loosely structured to fit easily in a

ended as Word makes possible At the same time, InfoPath

spreadsheet grid or a database table, but not nearly as open-based HTML forms have provided, and has tied that informationmore tightly to workflow processes

provides a more capable set of tools than traditional browser-InfoPath builds on the same core of XML specifications as theother members of the Office suite: XML, XSLT, and XSD

InfoPath provides a set of tools for creating forms based on thepossibilities defined in an XSD schema, letting you drag anddrop components and customize them to meet your form-

creation needs An example of form-creation is shown in Figure1-4 The same information can be presented in multiple views,making it possible, for example, for a customer to fill out a formwith the information they know, and have other steps in the

Trang 35

model

Figure 1-4 Designing a form in Microsoft

InfoPath

InfoPath also takes advantage of XML to add some features thatreflect how people typically work Forms that collect a lot ofinformation can take a while to fill out, and people frequentlystart and stop to rest, collect information, or switch to othertasks completely Because InfoPath stores its information asXML, it's easy to stop the process, save the results, and comeback to them later This also makes it possible, for instance, tosend a partially filled-out form to someone else and ask for

help Even if that other person doesn't have InfoPath, they may

be able to open the file or apply an XSLT transformation to view

Trang 36

1.3.5 Other Members of the Office Family

While the XML features in Word, Excel, Access, and InfoPath areespecially interesting (and receive the bulk of coverage in thisbook), most of the other members of Microsoft's Office family ofproducts have an XML story of some sort

Two members of the Microsoft Office family, PowerPoint andOutlook, are notable for not having an XML story PowerPoint'sdevelopers have continued work on its HTML features, but XMLsupport has been left for later versions Some developers usetheir own XML and XSLT to create HTML presentations, but thisisn't exactly common practice Outlook is in a similar position,with new features but none of them XML-related Future

editions of this book may get to explore PowerPoint and OutlookXML, but for now there is no such thing

Microsoft FrontPage, traditionally a GUI editor for web pages, isgrowing into a slightly more general tool for creating XSLT

stylesheets that can then be easily used to create templates.The XSLT tools in FrontPage remain oriented toward web

development and not to general XSLT work, but they may provevery useful for developers who want to create XML documents

in Word and present them differently on the Web without usershaving to lift a finger

Microsoft Visio has had its own XML format since Visio 2002,but the latest release adds support for Scalable Vector Graphics(SVG), a W3C standard for describing graphics in XML Visio canimport SVG documents and work with them much like regularVisio documents, adding its own markup where it needs to gobeyond the capabilities of SVG but preserving the original SVG.Developers who need to exchange diagrams or put them on theWeb for readers who don't themselves have Visio should find

Trang 37

For an example of working with Visio's XML format, see Recipe 11.1 of

Sal Mangano's XSLT Cookbook (O'Reilly) For more on SVG generally, see J David Eisenberg's SVG Essentials (O'Reilly).

Trang 38

While the doc and xls file formats have served as de facto

standard file formats for years, and developers have created avariety of tools for getting information into and out of theseformats, writing code that could produce or consume them hasnever been much fun Technologies like mail merges and ODBCconnections have made it possible to connect the Office

applications to other tools, but this is the first time that

Microsoft has taken large steps to make Office data accessiblethrough means other than the Office products themselves, andsimultaneously has made the applications much more agnosticabout where their information comes from

By freeing users from their applications' traditional perspectives

on information sources, Microsoft has created a whole new

range of possibilities for using its applications as interactivebrowsers Users who have been frustrated by the limited

interaction capabilities of web browsers can now access theirdata, and edit it, in familiar applications supporting many

different styles of information manipulation For the most part,the applications continue to prefer working with local

documents and can read documents from the Web, but theyhave taken a big step toward integration with Web- and XML-based infrastructure

While the details of each application make a big difference inhow the integration works, details which will be covered in laterchapters, it's worth examining some potential use cases for thenew technology before proceeding into those details

1.4.1 Generating Word and Excel Documents

from Databases

Trang 39

primarily through Office, there is plenty of other information outthere There are also a lot of reasons why organizations maywant to keep even their document-like information in more

conveniently managed and reused database management

systems While Office has long had pieces for connecting to

these systems to extract information, dumping a relational

database table into a Word or Excel file has required non-trivialprogramming The new XML capabilities open up new

possibilities for this kind of work

specific XML formats for Word and Excel Word's

The key to this project lies in Microsoft's creation of application-WordprocessingML and Excel's SpreadsheetML are formats thatthese applications can open and interact with just as if they

were doc or xls files (Some restrictions apply, especially for

Excel, but enough is available to make this technique useful.)

Developers can create XML documents from databases muchthe same way that they have created HTML documents fromdatabases for the past decade Technologies like ASP, PHP, CGI,and all of their siblings are still up to the task Alternatively, if adatabase can provide an XML representation of information inresponse to a query, the server could use XSLT to transformthat representation, as shown in Figure 1-5 To create

documents for Word, the developer would generate

WordprocessingML, while creating documents for Excel wouldinvolve generating SpreadsheetML

Figure 1-5 Using XSLT to generate WordprocessingML or SpreadsheetML from a

custom XML vocabulary

Trang 40

if they were ordinary Word or Excel files This works even if thedocuments are stored on the Web, thanks to Word and Excel'slong-time support for opening Web documents If they need toexchange the information with people using older versions of

Office, they can just use Save As and the doc or xls

format for backward-compatibility Nothing is lost in the

transition from XML to the traditional binary formats

1.4.2 Separating Content from Presentation in Word

Most users treat Word as a tool for creating content that looksthe way they want it to look The gold standard for Word resultshas generally been the document's appearance on a piece ofpaper, not the elegance of how that appearance was achieved.While the focus on presentation works well for a lot of

applications, it breaks down when developers are trying to useWord's familiar interface to create information that needs to bereused in other ways

This book, for instance, was written in Word and the doc files

converted to FrameMaker using custom toolstools that only

focus on a subset of Word's capabilities, its styles Users whotake advantage of Word's other style features create problemsfor this converter, and the usual result is that some of the

Ngày đăng: 26/03/2019, 16:07

TỪ KHÓA LIÊN QUAN