This is the fith part of the Dissecting XPS series and will focus on the Xml Paper Specification, XPS, document properties.
The properties used in an XPS document are stored in the Core Properties Part, specified in the Open Packaging Conventions, OPC . The Part is located by reading the [Content_Types].xml file and finding the content type application/vnd.openxmlformats-package.core-properties+xml. A document should have one Core Properties part, so there is no requirement to have one but having serveral indicates an invalid package. But there should be no reason to leave out the part. There are also no requirements on which elements that should be present in the part.
The Core Properties Part contains information about the title, author, creation time etc which are properties that I think are necessary today, it allows you to locate and find documents faster.
1: <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
8: <dc:title>Wictor test 1</dc:title>
9: <dc:subject>XPS test 1</dc:subject>
10: <dc:creator>Wictor Wilen</dc:creator>
11: <dcterms:created xsi:type="dcterms:W3CDTF">2007-04-01T00:00:00Z</dcterms:created>
12: <dcterms:modified xsi:type="dcterms:W3CDTF">2007-04-02T00:00:00Z</dcterms:modified>
The sample above is an example of a Core Properties Path, all available elements and the subset of Dublin Core  elmennts can be found in the OPC specification.
Thumbnails are great for all kind of files and XPS/OPC allows you to provide your own thumbnail instead of relying on the consumer to create one for you. Thumbnails can be used either on the whole XPS Package or on individual fixed pages. If used on one individual page then it should be used on all pages, according to the specification. Thumbnails are images in the format of either JPEG or PNG.
Thumbnails are specified as relationships, in the .rels files, using the type http://schemas.openxmlformats.org/package/2006/relationships/metadata/thumbnail, like below. The Target attribute specifies the actual thumbnail file.
1: <?xml version="1.0" encoding="utf-8"?>
2: <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
3: <Relationship Target="/thumbnail/thumbnail.png" Id="R0"
By now we have covered pretty much of the XPS specification and It's time to look at some code on how to consume and produce XPS files, but that's for the next post in the series.