transformations
play

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


  1. Designing Maintainable XML Transformations Siim Karus Faculty of Mathematics and Computer Science University of Tartu Estonia siim04@ut.ee

  2. Outline • Motivation • XSLT guidelines • Measuring XSLT conformance • Improving XSLT conformance 2

  3. Uses of XSLT External System System Component The Internet Component Component XSLT User 3

  4. Maintenance Evolution of XML • New information • Obsolete information • Changes in semantics Maintenance • Updates in relevant transformations 4

  5. Forward Compatibility Minimises effort needed to update code. Independence from business components (generality) Graceful handling of unexpected content 5

  6. Guidelines Use existing or common controls. Reuse Use generic services instead of internal components to expose similar aspects. Compose complex services of individually addressable and “subscribable” services. Loose coupling Avoid the need for additional metadata to render a document. 6

  7. Evaluation of Guidelines 400 350 300 Lines of Code 250 200 150 100 50 0 Viewing an Viewing a Modifying a Configuration Viewing an Viewing a Framework article category category module application news item Pre-guidelines 273 136 181 85 73 355 49 Guidelines 262 82 103 37 80 253 0 10

  8. Metrics of XSLT • Number of elements • Number of attributes • Number of templates • Number of apply-templates • Number of match expressions • Number of select expressions • Number of test expressions 12

  9. Types of Expressions • Simple – Can be written without wildcards and function calls – E.g. Resources • Complex – Wildchars – Function calls – E.g. *[string-length(name())=4] 13

  10. Results 35 30 25 20 15 10 5 0 Templates Simple Complex Simple Complex Simple Complex Templates Apply Match Select Test pre-guidelines guidelines 14

  11. Results 50 45 40 35 30 25 20 15 10 5 0 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 15

  12. Impact of the Guidelines 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 16

  13. Improving XSLT Conformance • Iteratively • One guideline at a time: – Common controls – Generic transformation services – Addressable and subscribable services – Use of metadata • Verify each steps result 17

  14. Future Perspectives • Study the correlation between stylesheet orientation and effectiveness of guidelines. • Investigate maintainability using other metrics. • Study enforceability of the guidelines. 18

  15. Discussion 19

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend