Thursday, January 31, 2008

Writing xslt

In the current stage of development for my project I'm trying to use the DataFormWebPart used by SharePoint Designer. To configure the web part some input parameters is going to construct the web part according to what the used needs. My goal is to make it very functional, being able to use any datasource while providing some nice filtering and sorting according to more inputs.
An example for an input could be the following:
<datasource>
<protocol>SPList</protocol>
<Name>ListName</name>
<Field>Title, Status, PercentComplete, Priority</Field>
<Order Name="PercentComplete" Ascending="False" >
</datasource>
<Formatting>
<Width>40%</Width>
<Menu>True</Menu>
</Formatting>



And returned from the web service is a well formated list, spanning 40% of the parent-container, with a menu used for CRUD actions. The CRUD is not implemented so far.

That is my vision.

Currently im working with the XmlWriter, used for producing a xsl used for the transformation in the DataFormWebPart.

A minor problem atm is that writer.writeString is creating html-text from htlm, for example "<" becomes & l t ; but without whitespace between.

---------
Edit: problem almost solved, used WriteRaw instead, but this way formatting is screwed.

No comments: