SlideShare ist ein Scribd-Unternehmen logo
1 von 91
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Andere mochten auch

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
 

Andere mochten auch (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
 

Ähnlich wie 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
 

Ähnlich wie 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
 

Mehr von 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
 

Mehr von 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
 

Kürzlich hochgeladen

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 

Kürzlich hochgeladen (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 

How diazo works

Hinweis der Redaktion

  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.