Microsoft Office Tutorials and References
In Depth Information
Topic A: Working with XML
Applying transforms
Explanation
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
.xsl extension.
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:
1
Create an XML document.
2
Open the XML Structure pane.
3
Attach an XML schema to the document.
4
Click XML Options to open the XML Options dialog box.
5
Check “Apply custom transform.”
6
Next to Custom transform, click Browse. Select the relevant XSLT and click
OK.
7
Click OK to close the XML Options dialog box.
8
Save the document.
Exhibit 7-7: An XML document after a transform has been applied
Search JabSto ::




Custom Search