X hits on this document

210 views

0 shares

0 downloads

0 comments

9 / 47

Microsoft Office 2003 Editions: Overview of Developer TechnologiesSeptember 2004

the custom XML structure in a document to facilitate the creation of more intelligent solutions, such as the smart document solution model described subsequently in this document. Although some capabilities enabled by XML schemas could have been implemented previously with clever and extensive coding, those solutions were fragile and difficult to create.

Using XML and custom XML schema also simplifies the integration of a document with corporate data and business processes. Word and Excel-based solutions can more directly exchange information with any Web service or other XML interfaces, such as those built into popular products such as Microsoft SQL Server 2000 and Microsoft BizTalk® Server. XML exchange is often handled through loosely coupled connections, such as Web services, which allow you to orchestrate software components and reuse them in a more flexible architecture.

Custom XML schema support simplifies the development of data-centric document solutions allowing you to work with data in a form that matches business needs while adhering to accepted industry standards. The following sections discuss specific Office support for XML in each application.

Custom-defined XML Schema Technology

In Office 2003 Editions, you can visually map data elements from a schema to regions in Word and Excel documents through new UI and to controls in InfoPath forms. In general, you can make the XML tags invisible to the end user of the solution. Although many XML features are designed through the UI, you also have access to XML features through object model support. Office retains the custom XML schema information in the XML document formats allowing subsequent processing to be specific to the custom XML data.

Microsoft Office Word 2003. Word with custom XML tags is still Word. You should consider using a custom XML schema as part of a Word solution in order to create a solution that is more intelligent, that allows for capture of structured and semi-structured content, or that is more robust and more easily updated. XML adds structure to a Word document but doesn’t affect the user’s ability to use all the rich editing features that they expect, including spell check, change-tracking, AutoCorrect and more. Word 2003 is not intended to be an XML editor where the sole purpose is to manipulate XML tags and attributes, and as such does not provide a streamlined out-of-the-box experience for end users to manipulate XML tags directly.

You can use the task pane to map schema elements to ranges in a Word document or template. The document becomes effectively marked with tags that reveal locations of the XML elements, as seen in Figure 1. You can toggle between the tagged view and normal view to compare the structure against the intended view while editing the document. Word requires that the elements exist in the same order in the document as they are in the schema. If you wish to use a schema which doesn’t have the structure as the desired document layout, you should create a schema to match the document layout, and use XSLT transforms to change the format of the data when bringing it in or sending it out of the document. Word performs real-time validation of the document data against the attached schema as it is entered or edited and flags the errors with a subtle UI while raising validation error events.

Figure 1. Customer-defined XML in Word 2003

To insert formatted information in Word, you can transform an input data stream to become valid WordprocessingML. You can insert this WordprocessingML in a document with any valid Word formatting characteristics. To insert just data into an existing Word template with custom XML tags, you can either transform the XML to WordprocessingML and replace a selection or

© 2006 Microsoft Corporation. All rights reserved. Page 9 By using or providing feedback on these materials, you agree to the attached license agreement.

To comment on this paper or request more documentation on these developer features, contact us at O12Devdx@microsoft.com. We look forward to hearing from you.

Document info
Document views210
Page views210
Page last viewedFri Dec 09 10:18:05 UTC 2016
Pages47
Paragraphs756
Words20469

Comments