Microsoft Office Tutorials and References
In Depth Information
Topic A: Working with XML
By default, when you create an XML document and display it in a Web browser, the
document appears without any formatting, as shown in Exhibit 7-6. The formatting in
an XML document is controlled by a transform and a style sheet. A transform is a set of
presentation rules that is contained in a style sheet. A style sheet is a file that defines the
layout of a document, such as background color or fonts.
The language commonly used for constructing a style sheet in an XML environment is
called Extensible Style Language (XSL). A transform created by using this style sheet is
known as an Extensible Style Language Transformation (XSLT). These files have an
Exhibit 7-6: An XML document without any transforms
When you apply an XSLT to an XML document, the results of the transform appear, as
shown in Exhibit 7-7. When you apply a transform, Word will ignore any data that the
XSLT file doesn’t use. You can apply multiple transforms to a single XML document to
generate multiple versions of the file, each with a different appearance.
To apply a transform to an XML document:
Create an XML document.
Open the XML Structure pane.
Attach an XML schema to the document.
Click XML Options to open the XML Options dialog box.
Check “Apply custom transform.”
Next to Custom transform, click Browse. Select the relevant XSLT and click
Click OK to close the XML Options dialog box.
Save the document.
Exhibit 7-7: An XML document after a transform has been applied