IntroductionThe SharePoint is one of those tools that we stop and explore before doing development, one of the great capacity of Sharepoint is its integration with other Web technologies which makes it very flexible and full customization of the pages simple and direct. For this type of development, have a sharepoint Webpart called DataViewWebpart "that performs the call given by various layers of data from Sharepoint Lists, WebServices, Database and XML. Webpart used to design the XSL formant "Extensible Stylesheet Language"which is a layer that serves to design models in different Webpart, provided you have the same type of data to receive. This article shows how we can use to access data in XML WebPart Drawing with XSL, and aims to create a WebPart of Meteorology. Set up XSL to contentBefore you start creating WebPart have to draw the structure as our Webpart will stay for that we can use Sharepoint Designer 2007 and use the (DVWP) DataViewWebPart, call our need to call the WebService DataSource of Meteorology Google. ExampleWebService Google's Meteorology (Google provides a webservice to access the state time through a set of parameters.) Example: % http://www.google.com/ig/api?weather=sao 20paulo & hl = en Parameters: Weather: City where we are researching the Meteorology hl: Language in which the content is translated, pt-PT (Portugal), pt-BR (Brazil) While calling the WebService, I intend to remain in the XML file in order to work and make changes. After creating the XML file, we can use the option "Datasource Library" to make a preview of our data and select and import. After we select the fields to import and add the Datasource fields to be imported from a simple flat. After you import the fields you want to use the WebServices can use HTML to draw the final result of the Webpart. Once created the changed data of the output of our WebPart, you should copy your content from "<Xls: stylesheet" up "</ xls: stylesheet">, this content will be used for setting the XML WebPart. Configure XML WebPartAlready in the Sharepoint page, we added our "XML WebPart" and we can start configuring. In Edit mode of WebPart, showing where we can define our XML data, in this case I set our WebService Google's meteorological. In fields: XML Link: We should add the link where the content of our XML WebService in this case Google. XSL Editor: The copy of the contents of the XSL held in Sharepoint Designer 2007 we move to this content editor, where you will be the structure of the WebPart of Meteorology. Done, now it's only doing "OK" and our WebPart is ready to be available on Sharepoint. Here is another example of how we can use what comes by default Sharepoint without performing any development, just change the XSL and services available over the internet in a way, simple simple. Annex "Microsoft Stock - MSFT_Stock.dwp Annex "Graphics Scholarship" Google, Microsoft, Oracle, Sybase " ExampleMore aboutIf you wish to change the images that the service's API provides google for something more personalized you can change the path.
images / weather / chance_of_rain.gif images / weather / sunny.gif images / weather / mostly_sunny.gif images / weather / partly_cloudy.gif images / weather / mostly_cloudy.gif images / weather / chance_of_storm.gif images / weather / rain.gif images / weather / chance_of_rain.gif images / weather / chance_of_snow.gif images / weather / cloudy.gif images / weather / mist.gif images / weather / storm.gif images / weather / thunderstorm.gif images / weather / chance_of_tstorm.gif images / weather / sleet.gif images / weather / snow.gif images / weather / icy.gif images / weather / dust.gif images / weather / fog.gif images / weather / smoke.gif images / weather / haze.gif images / weather / flurries.gif ConclusionA big hug to everyone and I hope you enjoyed this article more. |