XML in Word 2003

 < Day Day Up > 



Now that you understand the basics of XML, let's take a look at the XML features you'll be using in Word 2003. The concept behind the addition of XML is simplicity—the developers wanted to make sure that anyone would be able to use the XML features to easily create, tag, save, and export XML data in their Word documents.

Here's a quick overview of the XML features you'll work with in Word 2003:

  • XML Structure task pane XML now has its own task pane in Word, which leads you through the process of working with XML. The task pane, shown in Figure 29-1, first gives you the means to attach the XML schema you want to use, and then it shows the tree structure of your XML document so that you can easily tag items and navigate through the document.


    Figure 29-1: The task pane displays the tree structure of the current XML document and enables you to click and add tags while you work.

  • XML error checking As you add XML tags to your document, Word checks the tags against the applied schema to make sure that the code is well formed.

  • View tags while you work When you work on an XML document, all tags (existing tags and those you add) appear as graphical brackets around the word, phrase, paragraph, or entire document, as shown in Figure 29-2.

    click to expand
    Figure 29-2: Tag view enables you to see at a glance where the XML tags are in your document and how they are nested.

    Tip 

    You can turn Tag view off and on by clicking the Show XML Tags In The Document check box in the task pane.

  • Attach schemas easily You can attach a schema two different ways—through the XML Structure task pane or by choosing Tools, Templates And Add-Ins.

  • Create a schema library Because you might use more than one schema in a specific document (or create different schemas for different types of content), Word includes a Schema Library feature that makes it easy for you to organize and attach the schemas you need.

    Tip 

    You can add more than one schema to a single document if you like. Word will apply both sets of definitions and rules and alert you if there is a conflict.

  • Opening an XML file When you open an XML file in Word and choose XML Files in the Files Of Type list in the Open dialog box, you also have the option of applying an XSL transform as you open the file. To do this, click the arrow to the right of the Open button, and then select Open With Transform from the menu.

    Note 

    An XSL transform allows you to display an XML document in different views, or formats. For example, if you are opening a report file that you want to display on the Web, applying a transform lets you see the file in a Web-based format without making modifications to the file itself.

  • Saving an XML file When you choose XML Document in the Save As Type list in the Save As dialog box (as shown in Figure 29-3), two options specific to XML appear to the left of the Save button. You can select the Apply Transform check box, and then click the Transform button to choose the transform you want to apply, or, if you prefer, you can save data only.

    click to expand
    Figure 29-3: Word makes it easy to save an XML file in different formats.

    Note 

    You can manually attach an XML Schema Definition (XSD) file or apply an Extensible Stylesheet Language Transformation (XSLT) to an existing XML file, but Word adds another convenience to simplify this process. Word remembers associated files and gives the user the option of attaching the appropriate XSD or XSLT when a file that matches a recognized category is opened.



 < Day Day Up > 



Microsoft Office Word 2003 Inside Out
Microsoft Office Word 2003 Inside Out (Bpg-Inside Out)
ISBN: 0735615152
EAN: 2147483647
Year: 2005
Pages: 373

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net