Listing 11-4
Creating an XSD File to Export a Letter
targetNamespace=”http://www.mysite.com”
xmlns=”http://www.mysite.com”
elementFormDefault=”qualified”>
This example doesn’t
require a collection of items, such as those found in a
database, so it doesn’t require a complex structure.
Each of the elements
appears only one time except for the
Body
element, which can appear once
for each paragraph in the letter. Notice that
this XSD file includes a
targetNamespace
. Think of this as the default namespace for the XSD file.
Word requires this entry. Word also requires that you include the
mixed=”true”
attribute for the
tag. Otherwise, it con-
tinually reports that the
MyLetter
element can’t contain text.
After you create the template and the XSD file, you need to link the two. The
procedure for accomplishing this task is different from working with an indi-
vidual file. Here are the steps that you need to follow:
Do'stlaringiz bilan baham: