= XSLT File Editer = == Purpose == As XSL transformations are used in many parts of Eden and is becoming more important. We need a tool to create XSL files. It should be easy to use because implementers are no developers. The tool should give the user the ability to generate a XSL file out of a XSD. The XSL file would eventually, produce an output that is, in human readable form, specified by the user. Most common output file types are: E-Mail, HTML, pure text, XML. This tool would be available as an object or plug-in that developers can embed in to any module to extent the ability for implementers to create the implementation specific XSL file. == Product Scope == The biggest challenge is finding a Web2.0 tool that can be easily integrated with Eden. There are a plethora of off-line tools. === Objectives === * Easy to use * Eden module * Possibility to use an XSD which contains the possible elements of the input XML === Benefits === * Preview feature * Realtime UI updates / Use of the Error panel == Features == === Use Case === [[Image(UseCaseXSLTEditer.png)]] ==== Description & Functions ==== * Step 1) User had to upload an XSD -> XML Elements should be shown in the "Available XML Elements" panel * Step 1b) The user can upload an XML if he/she wants to use the preview Feature (Step 3) * Step 2) User enters the text. The XML elements are on the right side, a click on one of them adds it to the text. * Step 2b) 2 tabs: 1) Normal text 2) Includes XSL tags * Step 2c) "XSL Output types" dropdown contains different modes for the output * Step 2d) Errors are shown in the "Errors" panel * Step 3) User can download the XSL or refresh the "Preview" field based on the XML uploaded at Step 1b) === Mock GUI === [[Image(xsltEdenMockGUI.png)]] '''This GUI (without functionality) is available on''' [[https://github.com/Nostraa/eden/tree/XSLTool | GitHub]] == Recommended Approach == === XSL creation out of XSD & Text === This is the hardest part. It is quite hard to find any working, open-source solution for this. I think it would be the best to code this ourselves. I would suggest Javascript only here. Remember that the Errors-Panel needs to be real-time. === Preview Panel === * There are some possibilities to do [[https://developer.mozilla.org/en/Using_the_Mozilla_JavaScript_interface_to_XSL_Transformations | XSL transformations using Javascript]]. It's quite good implementation for XSL transformations, unfortunately this is Firefox only, so maybe no option for us. * A better (but untested solution) would be this [[http://johannburkard.de/software/xsltjs/ | jQuery plugin]]. * Apparently the best solution is [[http://code.google.com/p/ajaxslt/ | developed by Google]]. It is platform independent and bugs are closed relatively fast after they are discovered All Javascript only. == Similar Tools == [[http://www.w3schools.com/xsl/ | W3Schools XSLT Editor]] has similar functions but a quite limited GUI.