Loading XML Data into an Excel Worksheet…

advertisement
Chapter 29
CHAPTER
29
Signature: Microsoft Word 2003
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
END
USING XML IN WORD 2003
29-2
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
END
Performance Objectives
• Attach an XML schema to a Word
document
• Load XML data into an Excel worksheet
• Use a schema as a template
• Validate a schema
• Display XML options
• Enhance a schema
• Transform XML
• Open a file in Internet Explorer
• Add a solution
• Delete schemas and solutions
29-3
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
29-4
END
Introducing XML
• Extensible Markup Language (XML)
– method for exchanging complex sets of data
– terms are restricted only by a set of rules
that defines how new terms can be added
• HTML and XML have similar attributes
but are intended to be used differently
– HTML meant to be a finished document
– XML typically used as one part of a more
complicated application
• XML is self-documenting
– contains data and information about what
those data items represent and how they
relate to each other
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Providing Structure with XML Schemas
A schema enables non-XML applications to
properly structure an XML data document.
Schema files are roughly the XML
equivalent of Word templates.
highlighted data
could be
loaded into a
database file
END
29-5
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
Attaching an XML Schema
File, New
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
END
29-6
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
Attaching an XML Schema…/2
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
END
navigate to
folder
double-click
file
root element
in the schema
names of the
sub elements
type descriptive text that
describes the schema
29-7
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
END
Mapping Elements in the Schema
The elements in the XML schema must be
mapped to the corresponding data items in
the Word document.
double-click
first name
click element
Map the remaining elements and sub elements in
the schema to specific text by repeating steps.
29-8
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
Saving Only the XML Data
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
END
File, Save As
select XML type
29-9
Copyright 2003, Paradigm Publishing Inc.
click
click
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Loading XML Data into an Excel Worksheet
in Excel 2003, open the .xml file
loads both the
XML data and
the XML structure
click
Click OK at the message that appears.
END
29-10
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
Loading XML Data into an Excel Worksheet…/2
LINKS TO
OBJECTIVES
use the options at the
drop-down list to
sort or select items
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
29-11
END
display the XML Source task pane
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
Using Schemas as Templates
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
END
Add the schema by navigating to the
folder and double-clicking the file.
29-12
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Validating a Schema
XML allows schemas to specify
requirements and restrictions for XML
documents constructed with that schema.
icon displays because
the schema requires
that the document
contains each of
the sub elements
END
29-13
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Enforcing Validation Rules
• XML supports three general types of
data validation
– Required Elements: some or all of the
elements in the schema be included in any
data file created with that schema
– Define Entry: specify that the data entered
into a given element be a whole number,
decimal number, date, or an Internet URL
– Restrict Values: specify in detail the sort of
data that is valid for an element
END
29-14
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
Displaying XML Options
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
29-15
END
insert a check mark to display more
information about the validation error
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Enhancing the Schema
to replace the raw XML display with one
that looks more like a typical Word fill-in
document
right-click a tag and click Attributes
type the desired text
END
29-16
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
END
Transforming XML with Style Sheets
• XML uses style sheet files (.xsl) to
provide a method of using HTML
formatting with XML data
• Methods to use style sheets include
– Browse with Style: after you open an XML
document, you can use the XML Document
task pane to select an XML style sheet
– Save as HTML: when saving an XML
document, you can select a style sheet
– Associate Style Sheets with Schemas: in the
Schema Library you can define a solution
29-17
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
29-18
END
Transforming XML
Transformation is a process in which an
XML document is converted to a standard
Web HTML document using the XML style
sheet as a formatting guide.
File, Save As
click
click
At the Choose an XML Transformation
dialog box, navigate to the folder and then
double-click the .xsl file.
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Opening a File in Internet Explorer
in Internet Explorer, click File, Open
You will need to change the file extension
from .xml to .htm. This is because Internet
Explorer determines its display mode based
on the extension of the file you are opening.
END
29-19
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Streamlining XML in Word
The Schema Library contains a feature
called a solution, which allows you to
associate one or more style sheets with a
given schema.
click
END
29-20
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
Deleting Schemas and Solutions
LINKS TO
OBJECTIVES
to delete a schema,
click the schema
and then click the
Delete Schema
button
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
to delete a solution,
click the schema,
click the solution,
and then click the
Delete Solution
button
END
29-21
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Commands Review
How do you display the XML Structure
task pane?
File, New
END
29-22
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Commands Review
How do you display the Templates and
Add-ins dialog box?
File, New
END
29-23
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Commands Review
How do you display the XML Options
dialog box?
END
29-24
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
Commands Review
How do you display the Schema Library
dialog box?
END
29-25
Copyright 2003, Paradigm Publishing Inc.
CHAPTER
29
Coming Next
LINKS TO
OBJECTIVES
• Attach an XML
Schema
• Load XML Data into
an Excel Worksheet
• Use a Schema as a
Template
• Validate a Schema
• Display XML Options
• Enhance a Schema
• Transform XML
• Open in Internet
Explorer
• Add a Solution
• Delete Schemas and
Solutions
• Commands Review
BACK
NEXT
END
PERFORMANCE
ASSEMENTS
29-26
Copyright 2003, Paradigm Publishing Inc.
Download