Designing Maintainable XML Transformations
Siim Karus Faculty of Mathematics and Computer Science University of Tartu Estonia siim04@ut.ee
Transformations Siim Karus Faculty of Mathematics and Computer - - PowerPoint PPT Presentation
Designing Maintainable XML Transformations Siim Karus Faculty of Mathematics and Computer Science University of Tartu Estonia siim04@ut.ee Outline Motivation XSLT guidelines Measuring XSLT conformance Improving XSLT
Siim Karus Faculty of Mathematics and Computer Science University of Tartu Estonia siim04@ut.ee
2
3
System External System The Internet Component Component Component XSLT User
transformations
4
5
6
10
Framework Viewing an article Viewing a category Modifying a category Configuration module Viewing an application Viewing a news item Pre-guidelines 273 136 181 85 73 355 49 Guidelines 262 82 103 37 80 253 50 100 150 200 250 300 350 400 Lines of Code
12
13
14 5 10 15 20 25 30 35 Templates Simple Complex Simple Complex Simple Complex Templates Apply Match Select Test pre-guidelines guidelines
15 5 10 15 20 25 30 35 40 45 50 Templates Simple Complex Simple Complex Simple Complex Templates Apply Match Select Test VVV pre-guidelines VVV guidelines FxCopReport pre-guidelines FxCopReport guidelines xCBL to Rosettanet pre-guidelines xCBL to Rosettanet guidelines
16
Metric Guideline 1 Guideline 2 Guideline 3 Guideline 4 Number of Similar code sections Length of similar code sections Number of elements in stylesheet Number of local variables and parameters in stylesheet Number of global variables and parameters in stylesheet Number of template calls and copy-of elements Number of match, select and test expressions, which make use of implicit information Number of templates in stylesheet Number of apply-templates elements in stylesheet Length of templates in stylesheets
17
18
19