[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSLT Lint 0.1

Subject: XSLT Lint 0.1
From: Andriy Gerasika <andriy.gerasika@xxxxxxxxx>
Date: Mon, 14 Feb 2011 15:32:22 +0200
 XSLT Lint 0.1
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"
<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:

The program can be launched from:
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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.