Document Structure Changes in v0.8


We’ve been working on a number of changes to Document Structure that are coming the XPS Specification v0.8 and we wanted to give this audience a sneak peak. As always, questions to xpsinfo@microsoft.com are welcome.


Based on feedback on v0.75, we’ve decided to simplify markup for the DocumentStructure part somewhat, as well as make a couple small changes to how document outlines work. There are no planned changes to the StoryFragments part in this release.


The primary changes involve changing the element hierarchy. We’ve added a <DocumentStructure.Outline> element as an immediate child of the <DocumentStructure> element and an immediate parent of the <DocumentOutline> element. This brings the markup into sync with the design of other fixed document markup. In addition, we have removed the <DocumentContent>, <Stories>, and <StoryFragmentReferences> elements, collapsing the hierarchy such that the <Story> element is now a direct child of the <DocumentStructure> root element.


For document outlines, we’ve renamed the LinkTarget attribute to OutlineTarget and now require this to be a URI addressing a location either within the document or external to the document, such as a website. In this way, the document outline may be used in either a table of contents style or a bookmarks style. We’ve also added the planned xml:lang attribute to both <DocumentOutline> (required) and <OutlineEntry> (optional) to describe the language of text in the Description attribute of <OutlineEntry> elements.


The markup now appears as in the following example:



<DocumentStructure xmlns=”http://schemas.microsoft.com/xps/2005/06/documentstructure”>
   <DocumentStructure.Outline>
      <DocumentOutline xml:lang=”en-US”>
         <OutlineEntry OutlineLevel=”1″ Description=”Chapter 1″
            OutlineTarget=”../Document.fdoc#chap1″ />
         <OutlineEntry OutlineLevel=”1″ Description=”Appendices”
            OutlineTarget=”http://www.microsoft.com/xps” xml:lang=”en-UK” />
      </DocumentOutline>
   </DocumentStructure.Outline>
   <Story Name=”Story_1″>
      <StoryFragmentReference Page=”1″>
      <StoryFragmentReference Page=”2″>
   </Story>
</DocumentStructure>


In addition, we discovered an error in the namespaces for both the DocumentStructure and StoryFragments parts in Appendix H of the specification. In both cases, these are being changed to correctly read http://schemas.microsoft.com/xps/2005/06/documentstructure.


Comments (0)