[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSLT Lint 0.1
Hello,
last couple of days I have been working on IMHO an interesting project -- XSLT Lint. Idea of the project is to unscramble poorly coded XSLT, and patch it accurately, so only bad lines are changed, so line diff would actually work -- i.e. changes can be viewed line-by-line in file comparison tool. The other words, source XSLT is modified not as XML, but as text, i.e. formatting is not overwritten, for example: <element attr1="value1" attr2="value2"> <xsl:attribute name="attr3">value3</xsl:attribute> ... will be transformed as: <element attr1="value1" attr2="value2" attr3="value3"> ... i.e. first line is not modified. The result of these efforts is a GUI program that let user select folder w/ source XSLT, select folder where to place patched XSLT, and what patches to apply. Below is a test file outlining refactorings that are already implemented: http://www.gerixsoft.com/sites/gerixsoft.com/files/xslt-lint/test.xslt The program can be launched from: http://www.gerixsoft.com/sites/gerixsoft.com/files/xslt-lint/xslt-lint.jnlp This is Java webstart, the message "(NOT VERIFIED) Andriy Gerasika" is ok, since I was using self-signed certificate. Manual on GUI: 1) "Pick a refactoring" combo box -- select the refactoring you want to apply 2) "Synopsis" -- displays an example of refactoring that will be applied, how code looks "before" and "after" 3) "Source Folder" -- select original XSLT file or folder 4) "Target Folder" -- select file or folder where to place patched file (original XSLT will not be modified) 5) "Transform" button -- run the transform 6) "Changes" section: 6.1) list box to the left displays files that were modified, 6.2) text area to the right displays Unix diff patch that is generated by comparing original and transformed file (Windows users can install Unix diff util from http://gnuwin32.sourceforge.net/packages/diffutils.htm) I am very interested in feedback about: 1) refactorings already implemented -- are they correct? 2) suggestions for future refactorings, people's experience dealing w/ poorly coded XSLT Thank You Kind Regards, Andriy Gerasika
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|