Presentation is loading. Please wait.

Presentation is loading. Please wait.

Open XML Developer Workshop XSLT and Open XML. Open XML Developer Workshop Disclaimer The information contained in this slide deck represents the current.

Similar presentations


Presentation on theme: "Open XML Developer Workshop XSLT and Open XML. Open XML Developer Workshop Disclaimer The information contained in this slide deck represents the current."— Presentation transcript:

1 Open XML Developer Workshop XSLT and Open XML

2 Open XML Developer Workshop Disclaimer The information contained in this slide deck represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication. This slide deck is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS DOCUMENT. Complying with all applicable copyright laws is the responsibility of the user. Without limiting the rights under copyright, no part of this slide deck may be reproduced, stored in or introduced into a retrieval system, or transmitted in any form or by any means (electronic, mechanical, photocopying, recording, or otherwise), or for any purpose, without the express written permission of Microsoft Corporation. Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this slide deck. Except as expressly provided in any written license agreement from Microsoft, the furnishing of this slide deck does not give you any license to these patents, trademarks, copyrights, or other intellectual property. Unless otherwise noted, the example companies, organizations, products, domain names, e-mail addresses, logos, people, places and events depicted herein are fictitious, and no association with any real company, organization, product, domain name, email address, logo, person, place or event is intended or should be inferred. © 2006 Microsoft Corporation. All rights reserved. Microsoft, 2007 Microsoft Office System,.NET Framework 3.0, Visual Studio, and Windows Vista are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. The names of actual companies and products mentioned herein may be the trademarks of their respective owners.

3 Open XML Developer Workshop Overview Working with XSLT in.NET XSLT Business Scenarios

4 Open XML Developer Workshop Lesson: Working with XSLT in.NET XSLT Architecture in the.NET Framework Rich Features of the XSLT Infrastructure Passing Values to the XSLT Transformation Working with Extension Objects Pointers on Open XML Transformations

5 Open XML Developer Workshop XSLT Architecture in the.NET Framework XSLT XmlDocument XPathDocument XPathNavigator File XmReader XmlWriter TextWriter Stream Url XslCompiledTransform.Transform() XmlDocument XPathDocument XPathNavigator Url XmlReader XslCompiledTransform.Load()

6 Open XML Developer Workshop Rich Features of the XSLT Infrastructure Pass.NET values to the XSLT engine using the XsltArgumentList.AddParam() method Call.NET methods from inside the XSLT using Extension Objects Available through the XsltArgumentList.AddExtensionObject() method Render XSLT results out on the web using the ASP.NET XmlControl

7 Open XML Developer Workshop Passing Values to the XSLT Transformation XSLT style sheets can receive parameters... XslCompiledTransform transform = new XslCompiledTransform(); transform.Load("sample.xslt"); XsltArgumentList arguments = new XsltArgumentList(); arguments.AddParam(“ discount ", "", 0.30); using (FileStream fs = new FileStream("output.txt")) { transform.Transform(document, arguments, fs); } String Boolean Double XPathNavigator XPathNodeIterator

8 Open XML Developer Workshop Working with Extension Objects An extension object is a.NET object referenced from inside the style sheet. Each method is exposed as a custom function class MyClass { public string MyMethod( int value) { … } } <xsl:value-of select=“myNs:MyMethod(123)” />

9 Open XML Developer Workshop Pointers on Open XML Transformations When transforming from Open XML Access other document parts with the XSLT document() function Resolve paths to external resources using a custom XmlResolver class class SampleResolver : XmlResolver { Package _package; public override object GetEntity(Uri absoluteUri, string role, Type ofObjectToReturn) { PackagePart part = _package.GetPart(absoluteUri); return part.GetStream(); }

10 Open XML Developer Workshop Lesson: XSLT Business Scenarios Custom Data to Open XML Open XML to ODF WordprocessingML to XSL-FO WordprocessingML to HTML

11 Open XML Developer Workshop Open XML SQL XML ODF HTML ODF XSL-FORTF PDF XPS

12 Open XML Developer Workshop Review Working with XSLT in.NET XSLT Business Scenarios

13 Open XML Developer Workshop


Download ppt "Open XML Developer Workshop XSLT and Open XML. Open XML Developer Workshop Disclaimer The information contained in this slide deck represents the current."

Similar presentations


Ads by Google