09 Ara_Aralık_kısaltma 2008 için Arşiv
Preview Word files (docx) in HTML using ASP.NET, OpenXML and LINQ to XML
Yazan: esersahin 09/12/2008
Yazı kategorisi: Asp.Net, LinQ, Open XML, WORD | » yorum bırak;
Walkthrough: Word 2007 XML Format
Yazan: esersahin 09/12/2008
http://msdn.microsoft.com/en-us/library/ms771890.aspx
Erika Ehrli
Microsoft Corporation
June 2006
Applies to:
Microsoft 2007 Office Suites
Microsoft Office Word 2007
Summary: Walk through the new default file format for Microsoft Office Word 2007. Read detailed descriptions of the file format architecture, key components, and ways in which you can programmatically modify content. (22 printed pages)
Contents
Introduction
Word 2007 Document Packages
Open Packaging Conventions for the Word XML Format
Interpreting Word 2007 Files
Identifying Non-XML Parts in Word 2007 Documents
Separating Content from Documents
Understanding the Data Store
Walkthrough: Creating a Word XML Format File
Conclusion
Introduction
Microsoft Office Word 2007 provides a new default file format called Microsoft Office Word XML Format (Word XML Format). This format is based on the Open Packaging Conventions, also used by the XML Paper Specification (XPS). The binary file format used in Microsoft Office 97 through Microsoft Office 2003 Editions is still available as a save format, but it is no longer the default when saving new documents.
Microsoft introduced XML into Microsoft Office XP in 1999 with SpreadsheetML in Microsoft Office Excel 2002. SpreadsheetML was a good start, but it did not provide full-fidelity. That is, it cannot describe every part of a spreadsheet. The next release of Microsoft Office products introduced WordprocessingML in Microsoft Office Word 2003. WordprocessingML was a huge step forward because it was the first full-fidelity XML file format provided by Microsoft Office. Using Microsoft Office 2003, you can parse WordprocessingML files and manipulate, update, or add data to them. However, a few limitations exist. For example, you must encode binary data (such as images) as text within the XML file itself, which increases file size when working with a document containing many images. Additionally, Word 2003 embeds all custom XML data directly into the WordprocessingML that describes the document. This can make the custom XML difficult to access and manipulate from external processes.
The new file format in Word 2007 solves these issues by dividing the file into document parts, each of which defines a part of the overall contents of the file. When you want to change something in the file, you can simply find the document part you want, such as the header, and edit it without accidentally modifying any of the other XML-based document parts. Similarly, all custom XML data is in its own part. Working with customer XML is now easier. This allows you to generate documents programmatically with less code. In addition to being more robust and making it easier to work with custom XML, the new file format is also much smaller than the binary file format. The new file format takes advantage of ZIP technology by using the Open Packaging Conventions. This article walks through the structure of a Word 2007 document in this new file format.
Word 2007 Document Packages
The file format in Word 2007 consists of a compressed ZIP file, called a package. This package holds all of the content that is contained within the document. Using the package format decreases file size for Office documents because of the ZIP compression. The new format is also more robust to errors in transmission or handling. It allows you to manipulate the file contents using industry-standard ZIP-based tools. An easy way to look inside the new file format is to save a Word 2007 document in the new default format and rename the file with a .zip extension. Double-click the file to open and view its contents.
Note To understand the composition of a file based on Microsoft Office Open XML Formats (Office XML Formats), you may want to extract its parts. To open the file, it is assumed that you have a ZIP utility, such as WinZip, installed on your computer. To open a Word XML Format file in Word 2007:
- Create a temporary folder in which to store the file and its parts.
- Save a Word document (containing text, pictures, and so forth) as a .docx file.
- Add a .zip extension to the end of the file name.
- Double-click the file. It will open in the ZIP utility. You can see the document parts that are included in the file.
- Extract the parts to the folder that you created earlier.
- Integrated ZIP compression reduces the file size by up to 75 percent. Files are further broken down into a modular file structure that makes data recovery more successful and enhances security. The new format segments files into components that you can manage and repair independently. Files created in the new format also have a distinctive file extension for each application, depending on the file type.
Table 1. File extensions for Word 2007 file types
Word 2007 File Types Extension Word 2007 XML Document .docx Word 2007 XML Macro-Enabled Document .docm Word 2007 XML Template .dotx Word 2007 XML Macro-Enabled Template .dotm
Open Packaging Conventions for the Word XML Format
The Open Packaging Conventions specification defines the structure of Word 2007 documents using the new file format. For more information about open packaging conventions, see the Open Packaging Conventions also used by the XML Paper Specification.
To understand the structure of a Word 2007 document, you must understand the three major components of the new file format:
- Part items. Each part item corresponds to one file in the un-zipped package. For example, if you right-click a Microsoft Office Excel workbook and choose to extract it, you see a workbook.xml file, several sheetn.xml files, and other files. Each of those files is a document part in the package.
- Content Type items. Content type items describe what file types are stored in a document part. For example, image/jpeg denotes a JPEG image. This information enables Microsoft Office, and third-party tools, to determine the contents of any part in the package and to process its contents accurately.
- Relationship items. Relationship items specify how the collection of document parts come together to form a document. This method specifies the connection between a source part and a target resource. Relationships are stored within XML parts in the document package, for example, /_rels/.rels.
The following sections explain how each of these components fit together in an Office XML Formats file.
Word 2007 Document Parts
To facilitate construction, assembly, and reuse of Word 2007 documents by third-party processes and tools, Word divides the contents of the package into several logical parts that each store a specific document part, for example:
- Comments
- Style definitions
- List definitions
- Headers
- Charts
- Diagrams
- The main document body
- Images
Word represents each of these document parts with an individual file within the package. These parts can consist of XML files, such as the document parts that contain the markup for the Word XML Format, as well as attached contents, such as pictures or OLE–embedded files in their native format. All of these are contained within the package. However, it is important to note that, with a few exceptions defined within the Open Packaging Conventions, the actual file directory structure is arbitrary.
The relationships of the files within the package, not the file structure, are what determine file validity. You can rearrange and rename the parts of a Word file inside its ZIP container, provided that you update the relationships properly so that the document parts continue to relate to one another as designed. If the relationships are accurate, the file opens without error. The initial file structure in a file in Word 2007 is simply the default structure created by Word to enable you to determine the file composition easily. Provided that you keep the relationships current, you can change this file structure.
For example, in Word 2007, the container file represents a document. Within the container file, there are parts that, when aggregated, compose the document. For example, a Word 2007 file could contain (but is not limited to) the following folders and files:
- [Content_Types].xml. Describes the content type for each part that appears in the file.
- _rels folder. Stores the relationship part for any given part.
- .rels file. Describes the relationships that begin the document structure. Called a relationship part.
- datastore folder. Contains custom XML data parts within the document. A custom XML data part is an XML file from which you can bind nodes to content controls in the document.
- item1.xml file. Contains some of the data that appears in the document. Example of a custom XML data part.
- docProps folder. Contains the application’s properties parts.
- App.xml file. Contains application-specific properties.
- Core.xml file. Contains common file properties for all files based on the Open Packaging Conventions document format.
Figure 1 shows the file structure of a sample Word 2007 document.
.gif)
Figure 1. Hierarchical file structure of a typical Word 2007 document
You can replace entire document parts in order to change the content, properties, or formatting of Word 2007 documents.
Word 2007 Content Types
As mentioned previously, each document part has a specific content type. The content type of a part describes the contents of that file type. In the case of the XML parts that contain the markup defined by the Word XML Format, the content type can help you determine its composition.
A typical content type begins with the word application and is followed by the vendor name. In the content type, the word vendor is abbreviated to vnd. All content types that are specific to Word begin with application/vnd.ms-word. If a content type is an XML file, then the URI ends with +xml. Other non-XML content types, such as images, do not have this addition. Some typical content types are:
application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xmlContent type for a document part that describes endnotes within a Word document. The+xmlindicates that it is an XML file.application/vnd.openxmlformats-package.core-properties+xmlContent type for a part that describes the core document properties. The+xmlindicates that it is an XML file.image/pngContent type for an image. The+xmlportion is not present—this indicates that this content type is not an XML file.
You can use all of these content types when manipulating the contents of a Word 2007 file programmatically. The Microsoft Windows Software Development Kit (SDK) for Beta 2 of Windows Vista and WinFX Runtime Components includes the System.IO.Packaging namespace, which allows you to add document parts, retrieve and update contents, or create relationships programmatically. For example, using the Microsoft WinFX System.IO.Packaging class, you can create a document part with the PackagePart.CreatePart method. The CreatePart method takes two string parameters; one for the URI of the new part and one for the content type of the part, as follows:
PackagePart packageNewPart = package.CreatePart(uriResourceTarget, "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml");
This code example creates a document part using the URI stored in the uriResourceTarget variable with a content type used for styles.
For more information about PackageParts, see the PackagePart Class reference documentation in the Microsoft Windows SDK.
Locating Content Types
This section contains a list of the most frequently encountered content types. Word 2007 describes each content type by a file or part, inside the package. The [Content_Types].xml file, at the root of the package, lists every part in the file and its ContentType object. For example, you might see something like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"> <Override PartName="/word/footnotes.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml"/> <Default Extension="png" ContentType="image/png"/> <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/> <Default Extension="xml" ContentType="application/xml"/> <Override PartName="/word/document.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/> <Override PartName="/word/numbering.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml"/> <Override PartName="/word/styles.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/> <Override PartName="/word/endnotes.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml"/> <Override PartName="/docProps/app.xml" ContentType= "application/vnd.openxmlformats-officedocument.extended-properties+xml"/> <Override PartName="/word/settings.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/> <Override PartName="/word/footer2.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"/> <Override PartName="/docProps/custom.xml" ContentType= "application/vnd.openxmlformats-officedocument.custom-properties+xml"/> <Override PartName="/word/footer1.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml"/> <Override PartName="/word/theme/theme1.xml" ContentType= "application/vnd.openxmlformats-officedocument.theme+xml"/> <Override PartName= "/word/fontTable.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/> <Override PartName= "/word/webSettings.xml" ContentType="application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"/> <Override PartName="/word/header1.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml"/> <Override PartName="/docProps/core.xml" ContentType= "application/vnd.openxmlformats-package.core-properties+xml"/> </Types>
You can rename and rearrange all of these parts within the directory structure. The parts are listed here in their default locations with their default names to make it as easy as possible to understand what they are.
Inside the Word directory, off the root of the package, is the majority of the information describing the document. In this directory, you may find parts that represent a number of available content types.
Mapping Document Parts with Content Types
Every XML file in the file format is a document part. If you look inside the newly-formatted file of most Word files, within the directory structure you see files, or document parts, like /word/fontTable.xml and word/styles.xml. These files contain clear names that indicate their purpose (for example, font table and style parts). However, you can also change their names. Therefore, inside the [ContentTypes].xml file is a <Types> element that maps each content part with its respective content type. A [ContentTypes].xml file might consist of something like this:
<Override PartName="/word/styles.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/> <Override PartName= "/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/>
This indicates that the /word/styles.xml document part has a content type of /vnd.openxmlformats-package.core-properties+xml. The /docProps/core.xml document part has a content type of application/vnd.openxmlformats-package.core-properties+xml.
Relationships Between Document Parts
Relationships are one of the most important parts of the package because they record the connections between document parts. You can rename and move parts within the package’s directory structure, but the relationships must remain intact to keep the file valid.
A relationship is a logical connection between two parts within the file package. For example, the root document part has a relationship of type http://schemas.openxmlformats.org/package/2006/relationships/header to a part with the content type application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml. This indicates the relationship between the parts is that the target part is a header for the originating part. Furthermore, the content type indicates that the contents are a Word 2007 header. This header part could then have its own relationships. For example, if the header contained a JPEG image, the header might have a relationship of type http://schemas.openxmlformats.org/officeDocument/2006/relationships/image to a part with the content type image/jpeg.
Within the package, relationships are always located inside a directory titled _rels. To find the relationships originating from any part, look for the _rels folder that is a sibling of that part. If the part has relationships, the _rels folder contains a file that has your original part name with a .rels extension appended to it. For example, suppose you want to see if a relationship exists for the officeDocument part, which has a content type of http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument. By default, this part has a URI of /word/document.xml, so you would open the directory /word/_rels in the package and look for a file called document.xml.rels.
Every relationship has a source and a target. The source is the part after which the relationship is named. For example, all relationships inside document.xml.rels have document.xml as their source. Each .rels file contains a <relationships> element, inside which you find a <relationship> element for each target relationship containing the target relationship’s id, it’s target part, and the target part’s content type. A typical <relationships> element inside a document.xml.rels file might look like this:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> <Relationship Id="rId3" Type= "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target= "docProps/app.xml"/> <Relationship Id="rId2" Type= "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target= "docProps/core.xml"/> <Relationship Id="rId1" Type= "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target= "word/document.xml"/> <Relationship Id="rId4" Type= "http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties" Target= "docProps/custom.xml"/> </Relationships>
Notice that each relationship element first specifies the relationship id, then the content type of the target, and finally the target document part.
Interpreting Word 2007 Files
This section walks you through the main set of document parts in a Word 2007 file that uses the new file format. It also outlines the relationships between these parts as presented using the default directory structure.
Understanding Root–Level Relationships
The first part of any file that uses the Word XML Format is a virtual document part, or the package itself, called the start part. From this start part, there are relationships to several top-level parts, which describe the contents of the document:
Table 2. Root-level parts, relationships, and content types
| Part Name | Relationship Type | Content Type | Optional? |
|---|---|---|---|
| Core Document Properties (as defined in the Open Packaging Conventions) | http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties |
application/vnd.openxmlformats-package.core-properties+xml |
Yes |
| Application-Specific Document Properties | http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties |
application/vnd.openxmlformats-officedocument.extended-properties +xml |
Yes |
| Custom OLE Document Properties | http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties |
application/vnd.openxmlformats-officedocument.custom-properties +xml |
Yes |
| Main Document Part | http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument |
application/vnd.openxmlformats-officedocument.wordprocessingml.main+xml |
No |
These four default parts contain the primary document properties, as well as a reference to the root part for the document, that is, the main document body content.
Understanding Document–Level Relationships
From the main document part, there is a set of relationships to the document parts referred to by the main document, as shown in Table 3.
Note that most relationships below are prefixed with the following:
http://schemas.openxmlformats.org/officeDocument/2006/relationships/
Table 3. Document-level parts, relationships, and content types
| Part Name | Relationship Type | Content Type | Optional? |
|---|---|---|---|
| Style Definitions | /styles |
application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml |
Yes |
| List Definitions | /lists |
application/vnd.openxmlformats-officedocument.wordprocessingml.listDefs+xml |
Yes |
| Document Settings | /settings |
application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml |
Yes |
| Headers | /header |
application/vnd.openxmlformats-officedocument.wordprocessingml.header+xml |
Yes |
| Footers | /footer |
application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml |
Yes |
| Footnotes | /footnotes |
application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml |
Yes |
| Endnotes | /endnotes |
application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml |
Yes |
| Image(s) | /image |
image/[image extension], such as image/png or image/jpeg |
Yes |
| Comments | /comments |
application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml |
Yes |
| Font Table | /fontTable |
application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml |
Yes |
| Custom XML Items | /customXML |
application/xml |
Yes |
| Web Settings | /webSettings |
application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml |
Yes |
This list of parts is not complete. For example, it does not include shared parts such as OLE objects, Microsoft ActiveX controls, and digital signatures. However, it does provide insight into the typical Word XML Format structure in Word 2007.
Identifying the Package URI and Content Type Names
As described previously, programmatically, you can use a URI to refer to all of the relationships and almost all of the document parts. There are two types of URIs: one for document parts and another for relationships.
In the new Word XML Format, relationship URIs usually begin with the following:
http://schemas.openxmlformats.org/officeDocument/2006/relationships/
For example, note the relationship-type used for application-level properties:
http://schemas.openxmlformats.org/officeDocument/2006/relationships/ /extended-properties
This URI includes the word officeDocument because the Open XML File Formats convention dictates these relationships.
The exceptions are relationship-types that begin with a base of http://schemas.openxmlformats.org/package/2006/relationships/. Notice that this base uses the word package instead of officeDocument, indicating that it conforms to the XPS Open Packaging Convention. One such relationship-type that uses this prefix in its URI is the following:
http://schemas.openxmlformats.org/package/2006/relationships/ metadata/core-properties
This URI describes properties specific to the file. Relationship URIs are predefined. You cannot change them.
URIs for document parts point to the document part inside the package. For example, the default URI for the document part containing the main information about the document is /word/document.xml. This indicates that the main document information is contained in a file called document.xml inside a folder called word off the root of the package. You can rename and move document parts inside the package, thereby changing the URI for the document part. It is very important to update the relationships when renaming or relocating document parts inside the package.
Identifying Non-XML Parts in Word 2007 Documents
All embedded parts in a Word 2007 document are in their native, default Word XML Format. Therefore, if you add a picture to a document, you can rename the document with a .zip extension, and open it as you would any ZIP file. Within the package, you can locate the picture and open it as well. If the picture is in a .png format, you can see and open a .png file directly from the package.
Similarly, if you embed a Microsoft Office Visio document inside a Word 2007 document, you can locate the file as a .bin file inside the package.
This creates many possibilities for developers with files stored on a server. Consider the scenario where a company has hundreds of documents on a server that all contain the same corporate logo image. If the corporate logo changes, you can implement a simple script to replace the old logo with the new logo for every document.
The default location for images in a package is the /word/media directory and the default location for embedded objects in a package is /word/embeddings.
Figure 2 shows the directory structure for a document that contains images and embedded objects.
.gif)
Figure 2. Hierarchical file structure of a Word 2007 document containing images and embedded objects
Separating Content from Documents
The document part that maps to the content type specified by the following URI:
application/vnd.openxmlformats-officedocument.wordprocessingml.main+xml
defines most of the document structure. In macro-enabled files, the part that maps to application/vnd.ms-word.template.macroEnabledTemplate.main+xml defines most of the document structure. In the previous code example from the [Content-Types].xml file, this content type maps to the document.xml part in the /word/document.xml folder.
This part contains XML that is similar to a subset of WordprocessingML used in Word 2003. There are elements for paragraphs, properties, and fonts that describe the basic structure of the document. Individual parts describe all the components of the document, such as headers, footers, lists, and endnotes. By default, most of these parts are siblings of the following content type file:
application/vnd.openxmlformats-officedocument.wordprocessingml.main+xml
If you look at the previous code example, from the [Content-Types].xml file, you see many of these parts listed.
This separation of content from formatting makes working on elements of a document programmatically a much easier task than in previous versions. Using the WinFX System.IO.Packaging class, you can modify the file with a few lines of code and perform tasks such as:
- Replacing an old corporate logo used in hundreds of documents on a server with a new logo. Simply locate the image, delete it, and replace it with the new image.
- Updating all the footers in documents on a server with an updated company name.
- Changing the style of all the text in documents on a server to reflect a new corporate font.
There are, of course, many more possibilities. With this content separation, locating the part to edit is much easier than it is with the WordprocessingML used in Word 2003. In a WordprocessingML file, the entire document is described in one giant XML file. Parsing the file to make the change can be difficult. It also can be risky, because if a mistake is made, the entire document may become corrupt. In contrast, if one part of a Word 2007 document is corrupt, the rest of the document should open without error.
Understanding the Data Store
Similar to many other types of data in the Word XML Format, custom XML data is stored separately from the rest of the document. Each item is stored as a separate part within the package, and by default, this data appears in a folder called customXml located off the root of the package. If you attach an XML file to a document programmatically by adding a new part to the document’s CustomXMLParts collection, then by default that XML data is stored in a file called /customXml/item1.xml. If you add a custom XML data from another file, then, by default, it is stored in a file called /customXml/item2.xml.
By using XMLMapping and XPath expressions, you can map specific elements of an XML part to a content control. This means that to modify or change custom XML programmatically, you do not need to parse through a large WordprocessingML file, as you did in Word 2003. Instead, you find the part holding the custom XML that you want and modify only that part of the file.
To add custom data to your document, you need to create a custom XML file and add it to the ZIP package. You also need to create the corresponding relationship from the main document part to your custom XML part.
In the Word XML Format in Word 2007, each custom part persists in its own XML part within the document container. The custom part contains the file name and its relationship information. The XML part is stored off the root of the document container in a folder called customXml.
Figure 3 shows the directory structure for a document that contains custom XML data.
.gif)
Figure 3. Hierarchical file structure of a Word 2007 document containing custom XML data
Isolating custom XML data inside a document package allows you to read and update custom data without modifying or working with other document parts.
The relationship file, stored inside a _rels folder, describes all the relationships from one XML part to all other XML parts within a Word XML Format document. There are two relationship types for custom XML parts.
The relationship type for the XML is:
http://schemas.openxmlformats.org/officedocument/2006/relationships/customXmlData
The relationship type for the XML properties is:
http://schemas.openxmlformats.org/officedocument/2006/relationships/customXmlProps
An ID is stored with each relationship, allowing you to identify it uniquely within the data store.
The actual custom XML part is stored in its own file alongside the _rels folder. Each custom XML part has a file name of item##.xml and its own properties, named itemProps##.xml. In both file names, ## is the number (1, 2, 3. . .) of the custom XML part in the data store. The file format for the item##.xml custom XML part looks like the following.
<o:dataStoreItem> <o:dataStoreItem o:itemID="MSXID for the custom XML part"/> <o:xmlSchemaRef o:relID="relationship ID to a schema"/> </o: dataStoreItem>
Walkthrough: Creating a Word XML Format File
Document.xml is the only required part in the Word XML Format. For information about how to create a minimal document with only this required part, see the section Creating the Document.
To illustrate how document parts, content type items, and relationship items work together, this section walks through the process of building a more elaborate Word XML Format document in Word 2007. This walk through helps illustrate how to access and alter document contents using the Word XML Format.
To create a Word 2007 document that contains content type and relationship items, you need to create a root folder that contains a specific folder and file structure, as shown in Figure 4.
.gif)
Figure 4. Folder and file structure for a Word 2007 document
After you create all folders and files, the next section walks your through adding the required XML code to each document part.
Creating the Document Properties
First, you need to create two XML files for the document properties:
- Create a folder and name it root.
- Create a folder inside the folder root and name it docProps.
- Open Notepad or any other XML editor.
- Copy and paste the following code into a new file and save it as app.xml inside the docProps folder:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Properties xmlns= "http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"> <Template>Normal.dotm</Template> <TotalTime>1</TotalTime> <Pages>1</Pages> <Words>3</Words> <Characters>23</Characters> <Application>Microsoft Office Word</Application> <DocSecurity>0</DocSecurity> <Lines>1</Lines> <Paragraphs>1</Paragraphs> <ScaleCrop>false</ScaleCrop> <Company>MS</Company> <LinksUpToDate>false</LinksUpToDate> <CharactersWithSpaces>25</CharactersWithSpaces> <SharedDoc>false</SharedDoc> <HyperlinksChanged>false</HyperlinksChanged> <AppVersion>12.0000</AppVersion> </Properties> - Open Notepad or any other XML editor.
- Copy and paste the following code into a new file and save it as core.xml inside the docProps folder:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cp:coreProperties xmlns:cp= "http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"> <dc:title></dc:title> <dc:subject></dc:subject> <dc:creator>Your name</dc:creator> <cp:keywords></cp:keywords> <dc:description></dc:description> <cp:lastModifiedBy>Your name</cp:lastModifiedBy> <cp:revision>2</cp:revision> <dcterms:created xsi:type="dcterms:W3CDTF">2006-05-03T01:13:00Z</dcterms:created> <dcterms:modified xsi:type="dcterms:W3CDTF">2006-05-03T01:14:00Z</dcterms:modified> </cp:coreProperties>
Creating the Document
Next, you need to create an XML file for the document part. This is the only required part in the new Word XML Format.
- Create a folder and name it root.
- Create a folder inside the root folder and name it word.
- Open Notepad or any other XML editor.
- Copy and paste the following code into a new file and save it as document.xml inside the word folder:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <w:document xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:o12="http://schemas.microsoft.com/office/2004/7/core" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:m="http://schemas.microsoft.com/office/omml/2004/12/core" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/3/wordprocessingDrawing" xmlns:w10="urn:schemas-microsoft-com:office:word" xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/3/main"> <w:body> <w:p> <w:r w:rsidR="002847EC"> <w:t>Word 2007 rocks my world!</w:t> </w:r> </w:p> </w:body> </w:document>
Creating a Relationship
Next, you need to create a relationship to this part. This relationship is documented in the root _rels folder, which means that the relationship is off the root (or start part) of the package. To create the relationship:
- Create a folder inside the folder root and name it _rels.
- Open Notepad or any other XML editor.
- Copy and paste the following code into a new file and save it as .rels inside the _rels folder:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"> <Relationship Id="rId3" Type= "http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/> <Relationship Id="rId2" Type= "http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/> <Relationship Id="rId1" Type= "http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="word/document.xml"/> </Relationships>
- Notice that this XML creates a relationship of type officeDocument with ID rId1 to the document.xml file in the folder named word.
Defining the Content Type
Next, you need to define the content type of this file.
- Note that the structure of a content type definition file looks like the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"> <Default Extension="rels" ContentType= "application/vnd.openxmlformats-package.relationships+xml"/> <Default Extension="xml" ContentType="application/xml"/> <Override PartName="/word/document.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml"/> <Override PartName="/word/styles.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml"/> <Override PartName="/docProps/app.xml" ContentType= "application/vnd.openxmlformats-officedocument.extended-properties+xml"/> <Override PartName="/word/settings.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml"/> <Override PartName="/word/theme/theme1.xml" ContentType= "application/vnd.openxmlformats-officedocument.theme+xml"/> <Override PartName="/word/fontTable.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml"/> <Override PartName="/word/webSettings.xml" ContentType= "application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml"/> <Override PartName="/docProps/core.xml" ContentType= "application/vnd.openxmlformats-package.core-properties+xml"/> </Types>
- Open Notepad or any other XML editor.
- Copy and paste the above code into a new file and save it as [Content_Types].xml inside the root folder.
Note This reserved file name is used by the Open Packaging Conventions to define the content types of all files in the package.
Creating the Package
Finally, you can put these files into a ZIP package to create a valid Word 2007 document:
- Using any ZIP utility, save all the content of the simpledocument folder into a ZIP archive, including the following subfolders: the docProps folder, the word folder, and the _rels folder. Also include [Content_Types].xml.
IMPORTANT Do not simply add the complete simpledocument folder to a ZIP file or you get an internal error while opening the file in Word 2007. You need to specifically add all the subfolders of the simpledocument folder to the ZIP archive.
- Save the archive as simpledocument.docx.
Now, you can open this file in Word 2007 and see the contents of the package:
.gif)
Figure 5. Simpledocument.docx in Word 2007
Conclusion
When compared to the binary file format used in previous versions of Word, the new Word XML Format in Word 2007 offers many strong benefits. The compression offered by the ZIP container results in much smaller file sizes. The files are also much more robust—if a portion of the file becomes corrupt, the compartmentalization of the different document elements allows the file to open, even if one part is damaged.
It is also easier to change, add, or delete data in a Word 2007 file programmatically or manually. The file is easily accessible using the Microsoft WinFX System.IO.Packaging class. You can modify documents on a server with only a few lines of code. You can readily access and manipulate custom XML data from its own separate parts. You can even use events to trigger the change of XML data. For example, you can map a content control to an XML element containing a stock quote and then retrieve the most recent quote programmatically each time the document opens, thereby ensuring that the user always sees the current price.
The possibilities and ease with which you can program against the new Word XML Format are impressive and mark a significant advancement in Microsoft Office.
Additional Resources
To keep current with the latest on Word 2007 and the new file format, see the following resources:
- Introducing the Microsoft Office (2007) Open XML File Formats
- What’s New for Developers in Word 2007
- Office Open XML Document Interchange Specification
- Microsoft Windows Software Development Kit (SDK) for Beta 2 of Windows Vista and WinFX Runtime Components
- Open Packaging Conventions
- Setting Word Document Properties the Office 2007 Way
- Video: Office 12 – Word to PDF File Translation
- Video: Open XML File Formats
- OpenXMLDeveloper.org
- Video: Brian Jones – New Office File Formats Announced
- Blog: Brian Jones: Office XML Formats
Acknowledgments
Thanks to Frank Rice, Mark Iverson, and Tristan Davis for their contributions to this article.
Yazı kategorisi: Open XML | » yorum bırak;
PowerTools
Yazan: esersahin 09/12/2008
http://blogs.msdn.com/ericwhite/pages/PowerTools.aspx
Processing Open XML documents using PowerShell on a server is a powerful and compelling approach to creation and modification of Open XML documents.
PowerTools for Open XML are sample source code and guidance for developers showing how to build PowerShell cmdlets to create and modify Office Open XML documents, and scripts to demonstrate the use of the cmdlets.
To download the PowerTools for Open XML: www.CodePlex.com/PowerTools
To install and use the PowerTools for Open XML:
- You need to have any edition (including Express Edition) of Visual Studio 2008 installed. Download the Express Edition.
- You need to have PowerShell installed. Download.
- PowerTools is built on the Open XML SDK. Download.
More Resources
Screen-cast that shows how to download, build, and use the PowerTools.
PowerTools for Open XML Technical Overview (For C# developers who want to enhance or modify the PowerTools cmdlets).
Example Scripts for the PowerTools
Yazı kategorisi: Open XML | » yorum bırak;
PowerTools for Open XML
Yazan: esersahin 09/12/2008
http://www.codeplex.com/PowerTools
To install and use the PowerTools for Open XML:
- You need to have any edition (including Visual C# 2008 Express Edition) of Visual Studio 2008 installed. You can download Express Edition at http://www.microsoft.com/express/download/.
- You need to have PowerShell 1.0 installed. You can download PowerShell at http://www.microsoft.com/windowsserver2003/technologies/management/powershell/download.mspx.
- PowerTools for Open XML is built using the Open XML SDK. You can download the SDK at http://go.microsoft.com/fwlink/?LinkId=120908.
- You also need the PowerTools source code, which is available in the “Releases” tab above.
PowerTools for Open XML Home Page: http://blogs.msdn.com/ericwhite/pages/PowerTools.aspx
Set-OpenXmlCustomXmlData
The Set-OpenXmlCustomXmlData cmdlet sets or replaces the specified custom XML part in the document.
Remove-OpenXmlComment
The Remove-OpenXmlComment cmdlet locates and removes comment contents and references from Wordprocessing documents.
Add-OpenXmlDocumentTOC
The Add-OpenXmlDocumentTOC cmdlet creates a Table of Contents based on the headings found it in the document. The TOC will be created at the end of the document.
Add-OpenXmlDocumentIndex
The Add-OpenXmlDocumentIndex cmdlet creates an index based on the index references found in the document. The index will be created at the end of the document.
Set-OpenXmlWatermark
The Set-OpenXmlWatermark cmdlet adds watermark text to the background of a document. iI the DiagonalOrientation parameter is specified, then the text will be in a diagonal
orientation rather than horizontal.
Add-OpenXmlPicture
The Add-OpenXmlPicture cmdlet inserts a picture at a specific location inside an OpenXML document. The picture will be stored inside the document as an embedded resource. Picture location is specified by an XPath query expression.
Set-OpenXmlHeader
The Set-OpenXmlHeader cmdlet inserts header parts into all sections of a Wordprocessing document.
Lock-OpenXmlDocument
The Lock-OpenXmlDocument cmdlet sets a lock inside one or more Wordprocessing documents to prevent them from being edited.
Get-OpenXmlStyle
The Get-OpenXmlStyle cmdlet retrieves the styles definition part from a WordprocessingML or SpreadsheetML document and returns an XDocument object containing the styles content.
Get-OpenXmlTheme
The Get-OpenXmlTheme cmdlet extracts the whole theme part from a Wordprocessing document as a thmx file (with media resources embedded). A Package object (System.IO.Packaging.Package) is returned that corresponds to the theme file.
Accept-OpenXmlChange
The Accept-OpenXmlTextChange cmdlet processes documents with text revisions (change tracking elements), by accepting all the text changes performed on the document.
Set-OpenXmlBackground
The Set-OpenXmlBackground cmdlet changes the background image or background color of a Wordprocessing document.
Get-OpenXmlComment
The Get-OpenXmlComment extracts all the comments from a document, and return all of them in a XDocument
Add-OpenXmlDigitalSignature
The Add-OpenXmlDigitalSignature cmdlet uses a digital certificate to digitally sign a Wordprocessing document.
Get-OpenXmlDocument
The Get-OpenXmlDocument cmdlet returns an OpenXML document object for each document file. The actual object will depend on the type of document in the file. For example, if it is a spreadsheet, the object will be a SpreadsheetDocument, which is derived from OpenXMLDocument.
Get-OpenXmlCustomXmlData
The Get-OpenXmlCustomXmlData cmdlet gets the first customXml part that matches the given name and returns it as an XDocument object.
Export-OpenXmlToHtml
The Export-OpenXmlToHtml cmdlet transforms the content of Wordprocessing documents into an html file by applying an XSLT transformation over the main content and extracting images from the package to a given location.
Add-OpenXmlDocumentTOA
The Add-OpenXmlDocumentTOA cmdlet creates a Table of Authorities based on the citations (references or authorities) found it in the document. The TOA will be created at the end of the document.
Set-OpenXmlStyle
The Set-OpenXmlStyle cmdlet replaces the style library in a WordprocessingML or SpreadsheetML document.
Get-OpenXmlFooter
The Get-OpenXmlFooter cmdlet retrieves all the specified footer parts from a document and returns an XDocument array of those footers. An object is returned for the specified footer in each Section of the document.
Get-OpenXmlDigitalSignature
The Get-OpenXmlDigitalSignature cmdlet returns a summary of digital signatures present in the Wordprocessing document
Set-OpenXmlTheme
The Set-OpenXmlTheme cmdlet sets the current theme in a Wordprocessing document to the specified theme.
Remove-OpenXmlDigitalSignature
The Remove-OpenXmlDigitalSignature cmdlet removes digital signatures from a Wordprocessing document
Add-OpenXmlContent
The Add-OpenXmlContent cmdlet injects custom xml markup inside a given part from a Wordprocessing document
Export-OpenXmlWordprocessing
The Export-OpenXmlWordprocessing uses plain text to create a Wordprocessing document.
Set-OpenXmlContentFormat
The Set-OpenXmlContentFormat cmdlet inserts markup containing format to be applied on a given run or paragraph. Format location is specified as an xpath query.
Set-OpenXmlFooter
The Set-OpenXmlFooter cmdlet inserts footer parts into all sections of a Wordprocessing document.
Get-OpenXmlWatermark
The Get-OpenXmlWatermark cmdlet retrieves the text of the document’s watermark.
Get-OpenXmlBackground
The Get-OpenXmlBackground cmdlet extracts the background (color or image) from a document according to the parameters Image or Color.
Export-OpenXmlSpreadsheet
The Export-OpenXmlSpreadsheet gets the public properties from any objects and generates a spreadsheet with columns showing for each property. Optionally, a chart can be created from a subset of those properties.
Set-OpenXmlContentStyle
The Set-OpenXmlContentStyle cmdlet inserts inserts markup containing the style format to be applied on a given run or paragraph. Format location is specified as an xpath query.
Add-OpenXmlDocumentTOF
The Add-OpenXmlDocumentTOF cmdlet creates a Table of Figures based on the figures found it in the document. The TOF will be created at the end of the document.
Get-OpenXmlHeader
The Get-OpenXmlHeader retrieves all the existing header parts from a document. The execution returns an XDocument array of all the header parts found in the document.
If you have any issues with downloading, building, or using the PowerTools for Open XML, please feel free to contact Eric White: white.eric (at) microsoft.com
Yazı kategorisi: Open XML | » yorum bırak;
Open XML Format SDK April CTP
Yazan: esersahin 09/12/2008
Yazı kategorisi: Open XML | » yorum bırak;
Stephen McGibbon’s
Yazan: esersahin 09/12/2008
Notes2Self.net
Yazı kategorisi: Journalist | » yorum bırak;
Eclipse Tools for Microsoft Silverlight
Yazan: esersahin 09/12/2008
1. Overview
Microsoft Silverlight is a cross platform, cross browser and cross device plug-in that enables designers and developers to build rich media experiences and RIAs for the web. It significantly reduces development and deployment costs and provides enhanced Web audio and video streaming and playback using industry-leading Technologies.
The purpose of this project is the creation of open source tools integrated with the Eclipse development platform that enable Java developers to use the Eclipse platform to create applications that run on the Microsoft Silverlight runtime platform. Specifically, the project will be an Eclipse plug-in that works with the Eclipse Integrated Development Environment (IDE) and Eclipse Rich Client Platform (RCP) to provide both a Silverlight development environment and greater interoperability between Silverlight and Java, to facilitate the integration of Silverlight-based applications into Java-based web sites and services. The project has been submitted to the Eclipse Foundation and released as an open Eclipse project.
The Eclipse Tools for Microsoft Silverlight Project will integrate advanced Silverlight development capabilities into the Eclipse IDE and Eclipse Rich Client Platform (RCP).
- Increased Interoperability: Eclipse will contain functionality that will help Java Developers build Silverlight applications that work better with Java Web Services using REST, SOAP, JSON and other standards.
- Silverlight Project System and Silverlight Compiler: Eclipse will contain both an advanced project system for creating Silverlight applications and media experiences as well as a compiler for packaging Silverlight applications for deployment.
- XAML Editor & Preview with code hinting and code completion: Eclipse will contain an advanced, standards-compliant XAML editor with code hinting and code hinting features which helps detect and correct coding errors.
- Full compatibility with Microsoft’s Development and Design Tools: The XAML and Silverlight projects created by Eclipse will be fully supported by both Microsoft Visual Studio and Microsoft Expression Studio tools.
2. Project contributors
Soyatec (Analysis and Development)
Soyatec, located in Paris France, Xi’An and ShenZhen China, is an international software company and one of major Eclipse solution providers. It was Founded in 2006 by a group of Java engineers who had worked on Eclipse since 2002. As Eclipse Foundation Member, it has contributed to several Eclipse projects: Visual Editor, BPMN2 and e4.
It develops and markets a world wide first XAML solution for Java: eFace, and provides OutSourcing Eclipse development in China.
Microsoft Corporation (Funding, Architectural & Technical Guidance, Project Management)
3. Screenshots
In the first release, this toolkit provides a complete Silverlight development environment in Eclipse.
Silverlight project management |
XAML editor with instant preview |
||||
C# editor |
Build and run |
||||
A complete project management includes new project wizard, project import and resource management. The project structure keeps compatible with Microsoft Visual Studio and Expression Blend.
4. Roadmap
The following milestones are planned for next 6 months.
Milestone 1: October 14th, 2008 (Alpha/Community Technology Preview)
The focus of this release is around architecture, infrastructure, resource management and basic tooling with Eclipse IDE. We are excited to show you our initial thinking of the project and some of the basic developer experience in RIA application development. We look forward to your feedback and feature requests.
Some of the features we have included in the Alpha build are
- Project resource management in Eclipse IDE
- Project explorer to show a configuration view of project resources.
- Basic XAML Visual editor with instant preview and code completion assist.
- C# code editor with syntax colorization, keywords and template code completion assist
- Automatic Build & Run
- Configurable Web application launch facilities
More detail information about the features can be found on the Documentation page.
Milestone 2: December 2008 (Feature Completion)
- Completion of Silverlight Project System and Silverlight Compiler: Eclipse will contain both an advanced project system for creating Silverlight applications and media experiences.
- Interoperability with Java Middleware that contain prescriptive functionalities that will help Java Developers build Silverlight applications with Java Web Services using REST, SOAP, JSON and other standards.
- XAML Editor & Preview with code hinting and code completion: Feature completion of advanced, standards-compliant XAML editor with code hinting and code hinting features which helps detect and correct coding errors.
- Finalizing features that not fully implemented such as Move and Rename refactoring
- Complete user documentation & Prescriptive Tutorials
- Defects & Regression Testing
- Developer Usability Testing
Final: Spring 2009
- Advanced Media Features
- Increased Interoperability with Java Middleware
- Cross Platform Capabilities
- Complete user documentation & Prescriptive Tutorials
- Defects & Regression Testing
- Developer Usability Testing
Yazı kategorisi: Eclipse, Silverlight | » yorum bırak;
Silverlight 2 will be available tomorrow .. with new Eclipse tools too
Yazan: esersahin 09/12/2008
According to the press release, Silverlight already reaches one in four consumers worldwide.
This is also noteworthy (my links),
“Microsoft also announced further support of open source communities by funding advanced Silverlight development capabilities with the Eclipse Foundation’s integrated development environment (IDE) and by providing new controls to developers with the Silverlight Control Pack (SCP) under the Microsoft Permissive License [sic – see following paragraph].”
I think someone’s not been reading their email! The permissive licence (note to Amercans, licenCe is the noun form, licenSe is the verb form) was renamed to the Microsoft Public Licence at the request, I think, of the OSI’s community process (Matt Assay take note too).
Anyway, Mike Milinkovich, executive director of The Eclipse Foundation, has posted a blog entry titled “Interesting Times Indeed”:-
I am very happy to announce that we have a new project proposal at Eclipse.
Now the fact that we have a new project proposal is not in itself very interesting. We have those all the time. What is new and interesting about this one, however, is that it is being supported by our friends at Microsoft. That’s right, Microsoft is funding our member company Soyatec to develop Eclipse tools for Silverlight. This project is not only building development tools for Silverlight, it is also focused on easing the integration of Java-based web sites and services with Silverlight applications.
Mike goes on to say
“We at the Eclipse Foundation are thrilled to have Microsoft supporting open source projects here. We hope this is just the beginning of a long and beneficial relationship.”
The “Eclipse tools for Silverlight” project site (http://www.eclipse4sl.org/) explains that the project
will integrate advanced Silverlight development capabilities into the Eclipse IDE and Eclipse Rich Client Platform (RCP).
- Increased Interoperability: Eclipse will contain functionality that will help Java Developers build Silverlight applications that work better with Java Web Services using REST, SOAP, JSON and other standards.
- Silverlight Project System and Silverlight Compiler: Eclipse will contain both an advanced project system for creating Silverlight applications and media experiences as well as a compiler for packaging Silverlight applications for deployment.
- XAML Editor & Preview with code hinting and code completion: Eclipse will contain an advanced, standards-compliant XAML editor with code hinting and code hinting features which helps detect and correct coding errors.
- Full compatibility with Microsoft’s Development and Design Tools: The XAML and Silverlight projects created by Eclipse will be fully supported by both Microsoft Visual Studio and Microsoft Expression Studio tools.
and it has some screenshots ….
Eclipse tools for Silverlight : Silverlight project management
Eclipse tools for Silverlight : C# editor
Eclipse tools for Silverlight : XAML editor with instant preview
Eclipse tools for Silverlight : Build and run
and states that Milestone 1 will be released tomorrow too, with Milestone 2 (feature completion) in Dec 2008.
The team have a blog here.
What’s new in Silverlight 2? Here’s the highlights from the press release …
Expanded .NET Framework language support. Unlike other runtimes, Silverlight 2 supports a variety of programming languages, including Visual Basic, C#, Managed JavaScript, IronPython and IronRuby, making it easier for developers already familiar with one of these languages to repurpose their existing skills.
- Cutting-edge RIA development. With Silverlight 2, developers do not have to pay the “productivity tax” of converting their existing code to JavaScript to run inside the client. With support for languages such as Ruby and Python, Silverlight 2 enables developers to be on the cutting edge of RIA development, creating Asynchronous Ruby and XML (ARAX) and Asynchronous Python and XML (APAX) applications.
A rich base class library. A compatible subset of the full .NET Framework gives developers the most comprehensive RIA runtime on the Web today, with unparalleled data access capabilities, local data caching and local data storage, superior input-output (IO) performance, and better threading. By leveraging the rich base class library of the .NET Framework, developers can minimize the amount of additional code they have to write for their projects.
- Building better AJAX applications. Silverlight 2 includes APIs that enable the creation of better asynchronous JavaScript and XML (AJAX) applications, with improved HTML DOM/JavaScript integration with .NET code and with better data access through Language-Integrated Query (LINQ) and LINQ to XML library support.
Powerful built-in rich controls allow developers and designers to quickly build applications through a rich set of built-in controls such as DataGrid, ListBox, Slider, ScrollViewer and Calendar. With the rich controls built into Silverlight 2, developers don’t have to start from scratch when building the controls for their rich Internet applications.
Advanced styling and templating support gives designers and developers complete control over the look and feel of an application to ensure the custom brand experience for their rich Internet application meets their exacting requirements.
Rich UI Library. Silverlight 2’s UI Library, a compatible subset of the WPF user interface framework featured in the full .NET Framework, makes building rich Web applications easier. The powerful graphics and animation engine enables developers to reuse skills, code and content to build rich applications for the browser that can be rapidly ported to the desktop and devices.
- Better support for higher-level UI capabilities. The UI Framework in Silverlight contains support for higher-level UI capabilities such as layout management, data-binding, styles and template skinning.
Comprehensive networking support enables Silverlight users to leverage the power of the .NET Framework’s Windows Communication Foundation and directly access resources on the Web by supporting cross-domain network access.
- Out-of-the-box support for calling REST, WS*/SOAP, POX, RSS and standard HTTP services enables users to create Web 2.0-style applications that easily integrate with existing heterogeneous back-end systems.
Advanced content protection features, now including Silverlight digital rights management (DRM), Powered by PlayReady. Silverlight DRM builds on Microsoft’s extensive expertise in developing DRM technologies, delivering robust protection for key Silverlight scenarios including live streaming, on-demand streaming and progressive downloads for connected experiences.
Improved server scalability and expanded advertiser support. The combination of Silverlight 2 and Windows Server 2008 offers streaming video professionals industry-leading scalability and cutting-edge progressive download features. In addition, Silverlight offers superior search engine optimization capabilities and advanced in-stream advertising support through companies such as DoubleClick Inc. and EyeWonder Inc.
Unparalleled interactivity with high-resolution content through Deep Zoom technology. The new Deep Zoom technology in Silverlight allows users to see images on the Web as never before. The smooth, in-place zooming and panning that Deep Zoom allows is a true advancement and raises the bar on what image viewing should be. It is also now possible through this feature to make super-high-resolution images easily consumable on the Web. Even better, Deep Zoom is designed in a way that will reduce Web hosting and bandwidth costs by sending to the browser exactly the right size and resolution image for the current display area.
Yazı kategorisi: Eclipse, Silverlight | » yorum bırak;
OpenXML and ODF in Windows 7 Wordpad
Yazan: esersahin 09/12/2008
http://notes2self.net/archive/2008/10/29/openxml-and-odf-in-windows-7-wordpad.aspx
I said I’d post screenshots of the OpenXML and ODF support in Windows 7 Wordpad. It turns out that this isn’t in build 6801 (the ISO files on “the goods” hdd but is in build 6930.
Here’s the File/Open and File/Save Dialogues …
(click the pictures for full size image)
and here’s the listed file types

and finally, here’s the ODF specification from Oasis’ site open in Wordpad
Yazı kategorisi: Open XML | » yorum bırak;










