SlideShare une entreprise Scribd logo
1  sur  91
Télécharger pour lire hors ligne
How Diazo Works
Getting the mental model right
Steve McMahon
steve@dcn.org
Plone Conference 2013, Brasília
Thursday, October 3, 13
This talk has been rated
T Technical
Pervasive references to HTML and XML.
Disturbing Thematic Elements
Thursday, October 3, 13
XSL
Thursday, October 3, 13
XSL
Thursday, October 3, 13
HTML
XML
CSS
Thursday, October 3, 13
Quick
Review
Thursday, October 3, 13
Theme Rules Content
Thursday, October 3, 13
DIAZO
Theme Rules Content
Thursday, October 3, 13
DIAZO
Theme Rules Content
Themed
Content
Thursday, October 3, 13
ContentContentContent
DIAZO
Theme Rules Content
Themed
Content
Thursday, October 3, 13
ContentContentContent
DIAZO
RulesRulesRulesTheme Rules Content
Themed
Content
Thursday, October 3, 13
<html>
<head>
<title>Styled Page</title>
<style>...</style>
<script>...</script>
</head>
<body>
...
<div id="newsbox">...</div>
...
<div id="eventbox">...</div>
...
<div id="rightcolumn">...</div>
...
<div id="doormat">...</div>
...
</body>
</html>
Theme — HTML
Thursday, October 3, 13
<html>
<head>
<title>Styled Page</title>
<style>...</style>
<script>...</script>
</head>
<body>
...
<div id="newsbox">...</div>
...
<div id="eventbox">...</div>
...
<div id="rightcolumn">...</div>
...
<div id="doormat">...</div>
...
</body>
</html>
Theme — HTML
Thursday, October 3, 13
<html>
<head>
<title>Styled Page</title>
<style>...</style>
<script>...</script>
</head>
<body>
...
<div id="newsbox">...</div>
...
<div id="eventbox">...</div>
...
<div id="rightcolumn">...</div>
...
<div id="doormat">...</div>
...
</body>
</html>
Theme — HTML
Thursday, October 3, 13
<html>
<head>
<title>Styled Page</title>
<style>...</style>
<script>...</script>
</head>
<body>
...
<div id="newsbox">...</div>
...
<div id="eventbox">...</div>
...
<div id="rightcolumn">...</div>
...
<div id="doormat">...</div>
...
</body>
</html>
Theme — HTML
Thursday, October 3, 13
<html>
<head>
<title>Styled Page</title>
<style>...</style>
<script>...</script>
</head>
<body>
...
<div id="newsbox">...</div>
...
<div id="eventbox">...</div>
...
<div id="rightcolumn">...</div>
...
<div id="doormat">...</div>
...
</body>
</html>
Theme — HTML
Thursday, October 3, 13
<html>
<head>
<title>Content Page</title>
<style>...</style>
<script>...</script>
</head>
<body>
...
<dl class="portlet portletNews">
<dt class="portletHeader">
...
</dt>
<dd class="portletItem odd">
...
</dd>
...
</dl>
...
</body>
</html>
Content — HTML
Thursday, October 3, 13
<html>
<head>
<title>Content Page</title>
<style>...</style>
<script>...</script>
</head>
<body>
...
<dl class="portlet portletNews">
<dt class="portletHeader">
...
</dt>
<dd class="portletItem odd">
...
</dd>
...
</dl>
...
</body>
</html>
Content — HTML
Thursday, October 3, 13
<?xml version="1.0" encoding="UTF-8"?>
<rules
xmlns="http://namespaces.plone.org/diazo"
xmlns:css="http://namespaces.plone.org/diazo/css"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<rules css:if-content="#visual-portal-wrapper">
<theme href="index.html" />
...
<replace
css:theme-children="#newsbox"
css:content="dl.portletNews" />
...
</rules>
</rules>
Rules — XML
Thursday, October 3, 13
<?xml version="1.0" encoding="UTF-8"?>
<rules
xmlns="http://namespaces.plone.org/diazo"
xmlns:css="http://namespaces.plone.org/diazo/css"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<rules css:if-content="#visual-portal-wrapper">
<theme href="index.html" />
...
<replace
css:theme-children="#newsbox"
css:content="dl.portletNews" />
...
</rules>
</rules>
Rules — XML
Thursday, October 3, 13
How it works:
A Naïve Mental
Model
Thursday, October 3, 13
Theme1
Theme Content
Diazo
Rule #1
Thursday, October 3, 13
Theme1 Content
Thursday, October 3, 13
Theme1 Content
Diazo
Rule #2
Theme2
Thursday, October 3, 13
Content
Theme3
Diazo
Rule #3
Theme2
Thursday, October 3, 13
Content
drops / replaces
Things get messy.
Thursday, October 3, 13
Theme Content
Diazo
Content
Rule
Thursday, October 3, 13
Cooked
Content
Theme Content
Diazo
Content
Rule
Thursday, October 3, 13
Cooked
ContentTheme Content
Remaining
Diazo
Rules
Thursday, October 3, 13
Cooked
ContentTheme Content
Remaining
Diazo
Rules
?
Thursday, October 3, 13
How it works:
A Better Mental
Model
Thursday, October 3, 13
DIAZO
Theme Rules
XSL
Template
P
A
R
T
O
N
E
Thursday, October 3, 13
XSL
Template
XSLT
Content
Output
Page
P
A
R
T
T
W
O
Thursday, October 3, 13
XSL
Template
XSLT
Content
Output
Page
Transform Engine:
plone.app.theming
Apache
Nginx
Varnish
WSGI ...
P
A
R
T
T
W
O
Thursday, October 3, 13
DIAZO
Theme Rules
XSL
Template
P
A
R
T
O
N
E
Thursday, October 3, 13
DIAZO
Theme Rules
XSL
Template
P
A
R
T
O
N
E
More like CSS
than Python
Thursday, October 3, 13
P
A
R
T
T
W
O
XSL
Template
XSLT
Content
Output
Page
Thursday, October 3, 13
P
A
R
T
T
W
O
XSL
Template
XSLT
Content
Output
Page
Recursive
Node Processor
Thursday, October 3, 13
P
A
R
T
T
W
O
XSL
Template
XSLT
Content
Output
Page
Recursive
Node Processor
Processes stuff;
Processes what
it processed.
Thursday, October 3, 13
<body>
...
...
</body>
<replace
css:theme=”#theme1”
css:content=”#content1”
/>
<div id=”theme1”>
Theme1 Stuff
</div>
R
U
L
E
T
H
E
M
E
Thursday, October 3, 13
<body>
...
...
</body>
<replace
css:theme=”#theme1”
css:content=”#content1”
/>
XSL: pull in #content1
R
U
L
E
X
S
L
Thursday, October 3, 13
<body>
...
...
</body>
<replace
css:theme=”#theme1”
css:content=”#content1”
/>
<div id=”content1”>
Content1 Stuff
</div>
R
U
L
E
O
U
T
P
U
T
Thursday, October 3, 13
<body>
...
...
</body>
<replace
css:theme-children=”#theme1”
css:content=”#content1”
/>
<div id=”theme1”>
Theme1 Stuff
</div>
R
U
L
E
T
H
E
M
E
Thursday, October 3, 13
<body>
...
...
</body>
<replace
css:theme-children=”#theme1”
css:content=”#content1”
/>
<div id=”theme1”>
XSL: pull in #content1
</div>
R
U
L
E
X
S
L
Thursday, October 3, 13
<body>
...
...
</body>
<replace
css:theme-children=”#theme1”
css:content=”#content1”
/>
<div id=”theme1”>
<div id=”content1”>…</div>
</div>
R
U
L
E
O
U
T
P
U
T
Thursday, October 3, 13
<replace
css:theme=”#theme1”
css:content=”#content1”
css:if-content=”#something”
/>
R
U
L
E
X
S
L
Thursday, October 3, 13
XSL:if content has #something
<replace
css:theme=”#theme1”
css:content=”#content1”
css:if-content=”#something”
/>
R
U
L
E
X
S
L
Thursday, October 3, 13
XSL:if content has #something
XSL: pull in #content1
<replace
css:theme=”#theme1”
css:content=”#content1”
css:if-content=”#something”
/>
R
U
L
E
X
S
L
Thursday, October 3, 13
XSL:if content has #something
XSL: pull in #content1
XSL:else
<replace
css:theme=”#theme1”
css:content=”#content1”
css:if-content=”#something”
/>
R
U
L
E
X
S
L
Thursday, October 3, 13
XSL:if content has #something
XSL: pull in #content1
XSL:else
<div id=”theme1”>
Theme1 Stuff
</div>
<replace
css:theme=”#theme1”
css:content=”#content1”
css:if-content=”#something”
/>
R
U
L
E
X
S
L
Thursday, October 3, 13
<before theme=”#theme1” … />
<before theme-children”#theme1” …/>
<after theme-children=”theme1” … />
<after theme=”theme1” … />
R
U
L
E
S
X
S
L
Thursday, October 3, 13
XSL: pull in #cbefore
<before theme=”#theme1” … />
<before theme-children”#theme1” …/>
<after theme-children=”theme1” … />
<after theme=”theme1” … />
R
U
L
E
S
X
S
L
Thursday, October 3, 13
XSL: pull in #cbefore
<div id=”theme1”>
<before theme=”#theme1” … />
<before theme-children”#theme1” …/>
<after theme-children=”theme1” … />
<after theme=”theme1” … />
R
U
L
E
S
X
S
L
Thursday, October 3, 13
XSL: pull in #cbefore
<div id=”theme1”>
XSL: pull in #cbefore-children
<before theme=”#theme1” … />
<before theme-children”#theme1” …/>
<after theme-children=”theme1” … />
<after theme=”theme1” … />
R
U
L
E
S
X
S
L
Thursday, October 3, 13
XSL: pull in #cbefore
<div id=”theme1”>
XSL: pull in #cbefore-children
Theme 1 Stuff
<before theme=”#theme1” … />
<before theme-children”#theme1” …/>
<after theme-children=”theme1” … />
<after theme=”theme1” … />
R
U
L
E
S
X
S
L
Thursday, October 3, 13
XSL: pull in #cbefore
<div id=”theme1”>
XSL: pull in #cbefore-children
Theme 1 Stuff
XSL: pull in #cafter-children
<before theme=”#theme1” … />
<before theme-children”#theme1” …/>
<after theme-children=”theme1” … />
<after theme=”theme1” … />
R
U
L
E
S
X
S
L
Thursday, October 3, 13
XSL: pull in #cbefore
<div id=”theme1”>
XSL: pull in #cbefore-children
Theme 1 Stuff
XSL: pull in #cafter-children
</div>
<before theme=”#theme1” … />
<before theme-children”#theme1” …/>
<after theme-children=”theme1” … />
<after theme=”theme1” … />
R
U
L
E
S
X
S
L
Thursday, October 3, 13
XSL: pull in #cbefore
<div id=”theme1”>
XSL: pull in #cbefore-children
Theme 1 Stuff
XSL: pull in #cafter-children
</div>
XSL: pull in #cafter
<before theme=”#theme1” … />
<before theme-children”#theme1” …/>
<after theme-children=”theme1” … />
<after theme=”theme1” … />
R
U
L
E
S
X
S
L
Thursday, October 3, 13
<after theme-children=”theme1” … />
<before theme-children”#theme1” …/>
<after theme=”theme1” … />
<before theme=”#theme1” … />
XSL: pull in #cbefore
<div id=”theme1”>
XSL: pull in #cbefore-children
Theme 1 Stuff
XSL: pull in #cafter-children
</div>
XSL: pull in #cafter
R
U
L
E
S
X
S
L
Thursday, October 3, 13
Content
drops / replaces
Thursday, October 3, 13
Content
drops / replaces
Remember Part 2?
Thursday, October 3, 13
<replace
css:theme=”#theme1”
css:content=”#content1”
/>
R
U
L
E
X
S
L
Thursday, October 3, 13
XSL: pull in #content1
<replace
css:theme=”#theme1”
css:content=”#content1”
/>
R
U
L
E
X
S
L
Thursday, October 3, 13
XSL: pull in #content1
XSL: process what just got
pulled in
<replace
css:theme=”#theme1”
css:content=”#content1”
/>
R
U
L
E
X
S
L
Thursday, October 3, 13
XSL: pull in #content1
XSL: process what just got
pulled in
“content” drops / replaces
<replace
css:theme=”#theme1”
css:content=”#content1”
/>
R
U
L
E
X
S
L
Thursday, October 3, 13
<before css:theme=”#theme1” … />
<after css:theme=”#theme1” … />
<drop css:content=”#nastytag” />
XSL: pull in #cbefore
<div id=”theme1”>
Theme 1 Stuff
</div>
XSL: pull in #cafter
R
U
L
E
S
X
S
L
Thursday, October 3, 13
<before css:theme=”#theme1” … />
<after css:theme=”#theme1” … />
<drop css:content=”#nastytag” />
XSL: pull in #cbefore
<div id=”theme1”>
Theme 1 Stuff
</div>
XSL: pull in #cafter
R
U
L
E
S
X
S
L
— do content drop
— do content drop
Thursday, October 3, 13
<drop css:content=”#nastytag” />
<before css:theme=”#theme1” … />
<after css:theme=”#theme1” … />
XSL: pull in #cbefore
<div id=”theme1”>
Theme 1 Stuff
</div>
XSL: pull in #cafter
R
U
L
E
S
X
S
L
— do content drop
— do content drop
Thursday, October 3, 13
Let’s apply
that knowledge
Thursday, October 3, 13
Let’s apply
that knowledge
Moving Content
Thursday, October 3, 13
T
H
E
M
E
<body>
...
<div id=”#newsslot” />
...
<div id=”#rightcol” />
...
</body>
<replace
css:theme-children=”#newsslot”
css:content=”.portletNews”
/>
<drop css:content=”.portletNews” />
<replace
css:theme-children=”#rightcol”
css:content-children=”#col3”/>
R
U
L
E
Thursday, October 3, 13
T
H
E
M
E
<body>
...
<div id=”#newsslot” />
...
<div id=”#rightcol” />
...
</body>
<replace
css:theme-children=”#newsslot”
css:content=”.portletNews”
/>
<drop css:content=”.portletNews” />
<replace
css:theme-children=”#rightcol”
css:content-children=”#col3”/>
R
U
L
E
mode=”raw” />
Thursday, October 3, 13
mode = “raw”?
Thursday, October 3, 13
mode = “raw”?
Is there a “cooked”?
Thursday, October 3, 13
X
S
L
XSL: pull in #col3
XSL: do “content” drops and
replaces on what was
inserted
<replace
css:theme-children=”#rightcol”
css:content-children=”#col3”
/>
R
U
L
E
Thursday, October 3, 13
X
S
L
XSL: pull in #col3
XSL: do “content” drops and
replaces on what was
inserted
<replace
css:theme-children=”#rightcol”
css:content-children=”#col3”
/>
R
U
L
E mode=”raw” />
do routine cleanup,
but no content drops /
replaces
Thursday, October 3, 13
Lessons
Learned
Thursday, October 3, 13
Rule order
doesn’t matter.
Thursday, October 3, 13
Rule order
doesn’t matter.
mostly
V
Thursday, October 3, 13
Rule order
doesn’t matter.
Order rules
for clarity.
mostly
V
Thursday, October 3, 13
Solve conflicts
with specificity.
Thursday, October 3, 13
Solve conflicts
with specificity.
Just like CSS.
Thursday, October 3, 13
Where Diazo
breaks down:
Thursday, October 3, 13
Where Diazo
breaks down:
Manipulating content beyond drop/replace
Thursday, October 3, 13
Where Diazo
breaks down:
Manipulating content beyond drop/replace
Manipulating attributes/text
Thursday, October 3, 13
Where Diazo
breaks down:
Manipulating content beyond drop/replace
Manipulating attributes/text
Require XSLT
Thursday, October 3, 13
Where Diazo
breaks down:
Manipulating content beyond drop/replace
Manipulating attributes/text
Require XSLT
And we’re not
doing that today!
Thursday, October 3, 13
Exploring
Diazo
Thursday, October 3, 13
parts =
...
diazotools
...
[diazotools]
recipe = zc.recipe.egg
eggs = diazo
Thursday, October 3, 13
$ bin/diazocompiler rules.xml 
-o theme.xsl
$ bin/diazorun -xsl theme.xsl 
content.html
diazocompiler:
diazorun:
Thursday, October 3, 13
Thursday, October 3, 13

Contenu connexe

En vedette

39 Clues Book - 15th Anniversary Gift
39 Clues Book - 15th Anniversary Gift39 Clues Book - 15th Anniversary Gift
39 Clues Book - 15th Anniversary GiftScott Studham
 
A Picture of Enterprise Architecture
A Picture of Enterprise ArchitectureA Picture of Enterprise Architecture
A Picture of Enterprise ArchitectureScott Studham
 
Plone Deployment (PloneConf Edition)
Plone Deployment (PloneConf Edition)Plone Deployment (PloneConf Edition)
Plone Deployment (PloneConf Edition)Steve McMahon
 
“Developing a Metrics-based Online Strategy”
“Developing a Metrics-based Online Strategy”“Developing a Metrics-based Online Strategy”
“Developing a Metrics-based Online Strategy”bridgingworlds2008
 
“Open Source, Crowd Source: harnessing the power of the people behind our lib...
“Open Source, Crowd Source: harnessing the power of the people behind our lib...“Open Source, Crowd Source: harnessing the power of the people behind our lib...
“Open Source, Crowd Source: harnessing the power of the people behind our lib...bridgingworlds2008
 
Cell and structure of cell
Cell and structure of cellCell and structure of cell
Cell and structure of cellPhattarawan Wai
 
Plone Deployment Secrets & Tricks
Plone Deployment Secrets & TricksPlone Deployment Secrets & Tricks
Plone Deployment Secrets & TricksSteve McMahon
 
“Virtual Communities in Europe: the cultural mix and how the European Library...
“Virtual Communities in Europe: the cultural mix and how the European Library...“Virtual Communities in Europe: the cultural mix and how the European Library...
“Virtual Communities in Europe: the cultural mix and how the European Library...bridgingworlds2008
 
Ilya interview leven#14
Ilya interview leven#14Ilya interview leven#14
Ilya interview leven#14Ilya van Marle
 
Social media nell' (per l') informazione
Social media nell' (per l') informazioneSocial media nell' (per l') informazione
Social media nell' (per l') informazioneEmanuele Dal Carlo
 
The 1st revolution marketing the digital revolution bt.20120606_slide_share2
The 1st revolution marketing the digital revolution bt.20120606_slide_share2The 1st revolution marketing the digital revolution bt.20120606_slide_share2
The 1st revolution marketing the digital revolution bt.20120606_slide_share2Bruno Teboul
 
Methodological questions on serious games
Methodological questions on serious games Methodological questions on serious games
Methodological questions on serious games Valentina Rao
 
เฉลยแบบทดสอบย่อยครั้งที่ 1 เรื่องกล้องและเซลล์
เฉลยแบบทดสอบย่อยครั้งที่ 1 เรื่องกล้องและเซลล์เฉลยแบบทดสอบย่อยครั้งที่ 1 เรื่องกล้องและเซลล์
เฉลยแบบทดสอบย่อยครั้งที่ 1 เรื่องกล้องและเซลล์Phattarawan Wai
 
How well is the US government addressing the needs of military personnel
How well is the US government addressing the needs of military personnelHow well is the US government addressing the needs of military personnel
How well is the US government addressing the needs of military personnelEMDRHAP Yusupova
 
Casual social games for serious Social purposes
Casual social games for serious Social purposes Casual social games for serious Social purposes
Casual social games for serious Social purposes Valentina Rao
 
Datanomics january 2015 Bruno Teboul
Datanomics january 2015 Bruno TeboulDatanomics january 2015 Bruno Teboul
Datanomics january 2015 Bruno TeboulBruno Teboul
 

En vedette (20)

39 Clues Book - 15th Anniversary Gift
39 Clues Book - 15th Anniversary Gift39 Clues Book - 15th Anniversary Gift
39 Clues Book - 15th Anniversary Gift
 
A Picture of Enterprise Architecture
A Picture of Enterprise ArchitectureA Picture of Enterprise Architecture
A Picture of Enterprise Architecture
 
Plone Deployment (PloneConf Edition)
Plone Deployment (PloneConf Edition)Plone Deployment (PloneConf Edition)
Plone Deployment (PloneConf Edition)
 
“Developing a Metrics-based Online Strategy”
“Developing a Metrics-based Online Strategy”“Developing a Metrics-based Online Strategy”
“Developing a Metrics-based Online Strategy”
 
“Open Source, Crowd Source: harnessing the power of the people behind our lib...
“Open Source, Crowd Source: harnessing the power of the people behind our lib...“Open Source, Crowd Source: harnessing the power of the people behind our lib...
“Open Source, Crowd Source: harnessing the power of the people behind our lib...
 
Taemai
TaemaiTaemai
Taemai
 
Cell and structure of cell
Cell and structure of cellCell and structure of cell
Cell and structure of cell
 
Plone Deployment Secrets & Tricks
Plone Deployment Secrets & TricksPlone Deployment Secrets & Tricks
Plone Deployment Secrets & Tricks
 
Obligacion especial del empleador
Obligacion especial del empleadorObligacion especial del empleador
Obligacion especial del empleador
 
“Virtual Communities in Europe: the cultural mix and how the European Library...
“Virtual Communities in Europe: the cultural mix and how the European Library...“Virtual Communities in Europe: the cultural mix and how the European Library...
“Virtual Communities in Europe: the cultural mix and how the European Library...
 
Ilya interview leven#14
Ilya interview leven#14Ilya interview leven#14
Ilya interview leven#14
 
Social media nell' (per l') informazione
Social media nell' (per l') informazioneSocial media nell' (per l') informazione
Social media nell' (per l') informazione
 
The 1st revolution marketing the digital revolution bt.20120606_slide_share2
The 1st revolution marketing the digital revolution bt.20120606_slide_share2The 1st revolution marketing the digital revolution bt.20120606_slide_share2
The 1st revolution marketing the digital revolution bt.20120606_slide_share2
 
Methodological questions on serious games
Methodological questions on serious games Methodological questions on serious games
Methodological questions on serious games
 
เฉลยแบบทดสอบย่อยครั้งที่ 1 เรื่องกล้องและเซลล์
เฉลยแบบทดสอบย่อยครั้งที่ 1 เรื่องกล้องและเซลล์เฉลยแบบทดสอบย่อยครั้งที่ 1 เรื่องกล้องและเซลล์
เฉลยแบบทดสอบย่อยครั้งที่ 1 เรื่องกล้องและเซลล์
 
How Plone Happens
How Plone HappensHow Plone Happens
How Plone Happens
 
How well is the US government addressing the needs of military personnel
How well is the US government addressing the needs of military personnelHow well is the US government addressing the needs of military personnel
How well is the US government addressing the needs of military personnel
 
What's the weather vocab
What's the weather vocabWhat's the weather vocab
What's the weather vocab
 
Casual social games for serious Social purposes
Casual social games for serious Social purposes Casual social games for serious Social purposes
Casual social games for serious Social purposes
 
Datanomics january 2015 Bruno Teboul
Datanomics january 2015 Bruno TeboulDatanomics january 2015 Bruno Teboul
Datanomics january 2015 Bruno Teboul
 

Similaire à How diazo works

What's new in HTML5, CSS3 and JavaScript, James Pearce
What's new in HTML5, CSS3 and JavaScript, James PearceWhat's new in HTML5, CSS3 and JavaScript, James Pearce
What's new in HTML5, CSS3 and JavaScript, James PearceSencha
 
Introduction to NoSQL with MongoDB
Introduction to NoSQL with MongoDBIntroduction to NoSQL with MongoDB
Introduction to NoSQL with MongoDBHector Correa
 
Dominion Enterprises _H@&lt;k@th0n_
Dominion Enterprises _H@&lt;k@th0n_Dominion Enterprises _H@&lt;k@th0n_
Dominion Enterprises _H@&lt;k@th0n_Ken Collins
 
CSS3 and jQuery for Designers
CSS3 and jQuery for DesignersCSS3 and jQuery for Designers
CSS3 and jQuery for Designerslomalogue
 
edUI Conference: jQuery Mobile, Christine McClure
edUI Conference: jQuery Mobile, Christine McClureedUI Conference: jQuery Mobile, Christine McClure
edUI Conference: jQuery Mobile, Christine McClureChristine McClure
 
elasticsearch basics workshop
elasticsearch basics workshopelasticsearch basics workshop
elasticsearch basics workshopMathieu Elie
 
D3.js capita selecta
D3.js capita selectaD3.js capita selecta
D3.js capita selectaJoris Klerkx
 
Elasticsearch – mye mer enn søk! [JavaZone 2013]
Elasticsearch – mye mer enn søk! [JavaZone 2013]Elasticsearch – mye mer enn søk! [JavaZone 2013]
Elasticsearch – mye mer enn søk! [JavaZone 2013]foundsearch
 
Not Only Drupal
Not Only DrupalNot Only Drupal
Not Only Drupalmcantelon
 
Taming Pythons with ZooKeeper
Taming Pythons with ZooKeeperTaming Pythons with ZooKeeper
Taming Pythons with ZooKeeperJyrki Pulliainen
 
Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013   Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013 Pablo Godel
 
Mastering ElasticSearch with Ruby and Tire
Mastering ElasticSearch with Ruby and TireMastering ElasticSearch with Ruby and Tire
Mastering ElasticSearch with Ruby and TireLuca Bonmassar
 
[Nuxeo World 2013] DID YOU SAY DAM? DIGITAL ASSET MANAGEMENT WITH THE NUXEO P...
[Nuxeo World 2013] DID YOU SAY DAM? DIGITAL ASSET MANAGEMENT WITH THE NUXEO P...[Nuxeo World 2013] DID YOU SAY DAM? DIGITAL ASSET MANAGEMENT WITH THE NUXEO P...
[Nuxeo World 2013] DID YOU SAY DAM? DIGITAL ASSET MANAGEMENT WITH THE NUXEO P...Nuxeo
 
5 Ways Thinking Content-first Will Save Your Butt
5 Ways Thinking Content-first Will Save Your Butt5 Ways Thinking Content-first Will Save Your Butt
5 Ways Thinking Content-first Will Save Your ButtZURB
 
SassConf: It takes a village to raise a stylesheet
SassConf: It takes a village to raise a stylesheetSassConf: It takes a village to raise a stylesheet
SassConf: It takes a village to raise a stylesheetchriseppstein
 
Cool bonsai cool - an introduction to ElasticSearch
Cool bonsai cool - an introduction to ElasticSearchCool bonsai cool - an introduction to ElasticSearch
Cool bonsai cool - an introduction to ElasticSearchclintongormley
 
Lecture 4 html lists
Lecture 4   html listsLecture 4   html lists
Lecture 4 html listseShikshak
 
In Pursuit of the Grand Unified Template
In Pursuit of the Grand Unified TemplateIn Pursuit of the Grand Unified Template
In Pursuit of the Grand Unified Templatehannonhill
 

Similaire à How diazo works (20)

What's new in HTML5, CSS3 and JavaScript, James Pearce
What's new in HTML5, CSS3 and JavaScript, James PearceWhat's new in HTML5, CSS3 and JavaScript, James Pearce
What's new in HTML5, CSS3 and JavaScript, James Pearce
 
Introduction to NoSQL with MongoDB
Introduction to NoSQL with MongoDBIntroduction to NoSQL with MongoDB
Introduction to NoSQL with MongoDB
 
Dominion Enterprises _H@&lt;k@th0n_
Dominion Enterprises _H@&lt;k@th0n_Dominion Enterprises _H@&lt;k@th0n_
Dominion Enterprises _H@&lt;k@th0n_
 
CSS3 and jQuery for Designers
CSS3 and jQuery for DesignersCSS3 and jQuery for Designers
CSS3 and jQuery for Designers
 
edUI Conference: jQuery Mobile, Christine McClure
edUI Conference: jQuery Mobile, Christine McClureedUI Conference: jQuery Mobile, Christine McClure
edUI Conference: jQuery Mobile, Christine McClure
 
elasticsearch basics workshop
elasticsearch basics workshopelasticsearch basics workshop
elasticsearch basics workshop
 
D3.js capita selecta
D3.js capita selectaD3.js capita selecta
D3.js capita selecta
 
Elasticsearch – mye mer enn søk! [JavaZone 2013]
Elasticsearch – mye mer enn søk! [JavaZone 2013]Elasticsearch – mye mer enn søk! [JavaZone 2013]
Elasticsearch – mye mer enn søk! [JavaZone 2013]
 
Not Only Drupal
Not Only DrupalNot Only Drupal
Not Only Drupal
 
10082013
1008201310082013
10082013
 
Taming Pythons with ZooKeeper
Taming Pythons with ZooKeeperTaming Pythons with ZooKeeper
Taming Pythons with ZooKeeper
 
Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013   Symfony2 and MongoDB - MidwestPHP 2013
Symfony2 and MongoDB - MidwestPHP 2013
 
Mastering ElasticSearch with Ruby and Tire
Mastering ElasticSearch with Ruby and TireMastering ElasticSearch with Ruby and Tire
Mastering ElasticSearch with Ruby and Tire
 
[Nuxeo World 2013] DID YOU SAY DAM? DIGITAL ASSET MANAGEMENT WITH THE NUXEO P...
[Nuxeo World 2013] DID YOU SAY DAM? DIGITAL ASSET MANAGEMENT WITH THE NUXEO P...[Nuxeo World 2013] DID YOU SAY DAM? DIGITAL ASSET MANAGEMENT WITH THE NUXEO P...
[Nuxeo World 2013] DID YOU SAY DAM? DIGITAL ASSET MANAGEMENT WITH THE NUXEO P...
 
5 Ways Thinking Content-first Will Save Your Butt
5 Ways Thinking Content-first Will Save Your Butt5 Ways Thinking Content-first Will Save Your Butt
5 Ways Thinking Content-first Will Save Your Butt
 
SassConf: It takes a village to raise a stylesheet
SassConf: It takes a village to raise a stylesheetSassConf: It takes a village to raise a stylesheet
SassConf: It takes a village to raise a stylesheet
 
elasticsearch
elasticsearchelasticsearch
elasticsearch
 
Cool bonsai cool - an introduction to ElasticSearch
Cool bonsai cool - an introduction to ElasticSearchCool bonsai cool - an introduction to ElasticSearch
Cool bonsai cool - an introduction to ElasticSearch
 
Lecture 4 html lists
Lecture 4   html listsLecture 4   html lists
Lecture 4 html lists
 
In Pursuit of the Grand Unified Template
In Pursuit of the Grand Unified TemplateIn Pursuit of the Grand Unified Template
In Pursuit of the Grand Unified Template
 

Plus de Steve McMahon

Full-Stack Plone Deployment with Ansible
Full-Stack Plone Deployment with AnsibleFull-Stack Plone Deployment with Ansible
Full-Stack Plone Deployment with AnsibleSteve McMahon
 
From the Client Side: JavaScript in Plone
From the Client Side: JavaScript in PloneFrom the Client Side: JavaScript in Plone
From the Client Side: JavaScript in PloneSteve McMahon
 
Overlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh MyOverlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh MySteve McMahon
 
Plone 3 2: What's New
Plone 3 2: What's NewPlone 3 2: What's New
Plone 3 2: What's NewSteve McMahon
 
PloneFormGen: Past, Present, Future
PloneFormGen: Past, Present, FuturePloneFormGen: Past, Present, Future
PloneFormGen: Past, Present, FutureSteve McMahon
 

Plus de Steve McMahon (6)

Full-Stack Plone Deployment with Ansible
Full-Stack Plone Deployment with AnsibleFull-Stack Plone Deployment with Ansible
Full-Stack Plone Deployment with Ansible
 
Javascript in Plone
Javascript in PloneJavascript in Plone
Javascript in Plone
 
From the Client Side: JavaScript in Plone
From the Client Side: JavaScript in PloneFrom the Client Side: JavaScript in Plone
From the Client Side: JavaScript in Plone
 
Overlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh MyOverlays, Accordions & Tabs, Oh My
Overlays, Accordions & Tabs, Oh My
 
Plone 3 2: What's New
Plone 3 2: What's NewPlone 3 2: What's New
Plone 3 2: What's New
 
PloneFormGen: Past, Present, Future
PloneFormGen: Past, Present, FuturePloneFormGen: Past, Present, Future
PloneFormGen: Past, Present, Future
 

Dernier

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 

Dernier (20)

Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 

How diazo works

Notes de l'éditeur

  1. An interpreter reads the rules file as a list of instructions.Starts with copy of theme, applies rules, one at a time, transforming theme at each stage. Output in one step is input in the next.
  2. Two parts: Part one: Rules are used to analyze and transform theme to produce an XSL template. Content is not involved in part one. Part two: template applied to content. Original theme is not involved. Variety of transformation engines available.
  3. Let’s look back at part one of the processing. The important thing to realize is that the mapping of the rules onto the theme is much more like CSS than Python. The ordering of your rules makes a difference in the same way it does with CSS - as a tie-breaker.
  4. Back to part two XSL template is applied to transform content. An XSLT engine is basically a node processor - a recursive one.
  5. Let’s watch this in action for a simple replace. No, that’s not real XSL -- all you’ll see today is pseudo code
  6. Let’s just elaborate the previous example to see how “children” specs are applied. Note that the outer div survives the transform.
  7. Let’s add a conditional and see how that works
  8. And, some before and after rules. Order doesn’t matter! Generated XSL stays the same.
  9. What about content drop / replace rules? Here’s where the recursive character of XSL transformation comes in.
  10. Let’s return to our replace example. This is a regular theme replacement. But there’s a step we didn’t show before: continued processing - content drop replaces
  11. content drops/replaces are done with each pull from content, on what’s been pulled. Rule order doesn’t matter! All content rules are applied during this processing
  12. First, a simple attempt at a move; move news portlet to a box of its own; leave rest of portlets. This would depend on the order of the rules; it will not work; .portletNews content will be missing from the final page. More advanced diazo users know how to fix this: with a mode directive. But note where it goes!
  13. “ Cooking” is what we’ve been doing all along, executing content drops and replaces automatically. Adding mode=”raw” changes the XSLT processing after the insert.