All entries tagged with xslt
The next release of the .Domino Framework will contain a new developer tool to test XSLT. This tool was driven out of need as I was finding it very time consuming to test transformations of DXL data from Notes databases via XSLT. There were a few third-party tools out there but they had various short-comings and/or did not integrate with Notes. The new Tool is a simple form with three sectons. - Source: XML/DXL can be entered or pasted into this field. Actions also exist to import DXL from a file or a design element.
- XSLT: XSLT can be entered or pasted into this field. Actions also exist to load XSLT from a file or a .Domino Framework style sheet.
- Results: This field contains the output from applying the XSLT to the Source.
|
Ratings
0
|
The 0.6 Beta of the .Domino Framework was published on OpenNTF on the weekend. One of the last minute additions in this release is the abillity to access the XSLT/Skins feature of the .Domino Framework from within the Inspector tool. The significance of this is that this the Inspector tool can be invoked against ANY Notes database. So this tool now allows developers to apply XSLT transformations to design elements without the need to include any additional code in the applications themselves. All the code (and XSLT) is held in the .Domino Framework database. e.g. I frequently take on development for existing Notes applications in which the fonts used in forms an/views are inconsistent. Using Inspector I can apply an XSLT from the .Domino Framework to all view/forms that change all fonts to Default Sans Serif saving me hours of manual (and boring) coding.
|
Ratings
0
|
Did you ever want to lose the list of Notes IDs that have modified a particular set of Notes documents? It would seem it is not possible to edit the existing contents of the $UpdatedBy using either @commands or LotusScript. I assume this is a data integrity issue to ensure the contents of the edit history for any document cannot be manipulated. This field can be modified (or removed) for design documents (see SuperNTF project at OpenNTF). Interestingly, it is possible to edit or remove the contents of this field using XSLT. I am not 100% sure this is a good thing to have, but it is possible!
The following is the XSLT code necessary to apply against documents exported from a Notes database as DXL before reimporting.....
<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:dxl="http://www.lotus.com/dxl" version="1.0">
<xsl:template match="@*|node()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="dxl:noteinfo/dxl:updatedby">
</xsl:template>
</xsl:stylesheet>
After doing this the $UpdatedBy field will only contain the NotesID of the agent that executed the XSLT transformation. All previous entries will be removed. e.g. I have used this technique to refresh the content of the .Domino Framework so that it does not contain the various Notes IDs I have used as a developer in creating and maintaining content for this project.
Warning: Not all Notes documents can be exported and reimported into Notes without losing something on the way, so test this out in a safe environment first.
|
Ratings
0
|
I started work on extending the functionality of the .Domino Framework to provide the ability to "skin" an application for a Notes client based upon a style sheet. The first challenge has been to develop an approach to take. I had previously developed a solution for views that used the NotesDOMPaser. Viewnify also uses this approach. The downside to this is the lack of a standard way to define the "style". Importing from a CSS was a possible options but what names should be applied to the classes/ids... I decided to try XSLT. It is an industry standard and the transformations could be defined as data rather than code. Notes provides a way to transform DXL using an NotesXSLTTransformer class. Using the Domino.reflections namespace I have extended the existing DominoDocummentCollectionDesign class to provide a Transform method. This new method acts upon the selected design elements, exports them to DXL, applies an XSLT before importing the modified design elements back into teh database. I also developed a debug option that exports the DXL to a file so it can be inspected.
|
Ratings
0
|