Metamodeling● Meta Object Facility (MOF) ○ Proposed by OMG Metametamodel M3:● MOF metamodeling stack level M2: Metamodel level M1: Model level M0: Real world Object Management Group (OMG). (2002, april 3). Meta Object Facility (MOF) Specification.
Metamodeling● Mappings M3: EBNF M3: XML M2: Programming M2: XML schema language M1: Code M1: XML document M0: Real world M0: Real world
Model transformations Transformation language written in uses Transformation uses Metamodel A Metamodel B specification instance of executed by instance of Transformation Model A Model B input engine output source targetKurtev, I. (2008). State of the Art of QVT: A Model Transformation Language Standard. In Applications of Graph Transformations with Industrial Relevance (Vol. 5088/2008, pp. 377‐393). Springer Berlin / Heidelberg.
Model transformationsM2: Transformation Metamodel A Metamodel B languageM1: Transformation Model A specification Model BM0: Transformation engine
Model transformationsM3: Metametamodel conforms to conforms to conforms toM2: Transformation Metamodel A Metamodel B languageM1: Transformation Model A specification Model BM0: Transformation engine
Model transformationsM3: XML ● Traditional XSLTM2: HTML theme A XSL HTML theme BM1: Transformation Website A specification Website BM0: Transformation engine
Model transformationsM3: XML HTML theme AM2: HTML theme A XSL HTML theme B Website A TransformationM1: Website A Website B specificationM0: Transformation engine
Diazo according to MDEM3: XML HTML theme AM2: Diazo syntax HTML theme B HTML theme B Content site AM1: Diazo rules Website Theme site BM0: Diazo
Diazo explained● Two HTML sites ○ A content system ○ A theme● One set of rules● Regardless of pre-processors ○ Underlying dynamic systems
Re-style an existing website● The existing website works perfectly● Possible problems when re-styling (the old way): ○ Risk in losing functionality ○ Website is written in another language ○ No templates
Re-style an existing website● Diazo only needs the HTML output of the existing website● The existing website remains available● Easy re-style again with Diazo● Multiple designs for a single website, at the same time
Conclusion● XSLT wrapper ○ XSLT reborn● Seamless integration ○ Proxy all your websites● Higher level of abstraction● Fallback to regular XSLT ○ If all else fails● State-of-the-art technology ○ Lack of tooling ○ Widely adopted in the Plone community
Future work● Feature requests / bugs ○ Filter out comments in XSL ○ Easier replace rules for dynamic elements while preserving theme attributes ○ More visual way to create rules ■ Also apart from Plone.app.theming ○ <xsl:template> doesnt work in embedded <rules>● Sprints● Fork it ○ https://github.com/plone/diazo