SlideShare une entreprise Scribd logo
1  sur  32
Télécharger pour lire hors ligne
Welcome
What's this about?
• The Berlin Manifesto constitutes that the transition from v4v6 to Phoenix will be easily possible

• Content Transition is a big part of that

• Last year a GSoC project was initiated for working on that problem

• Therefore: This is for presenting first solutions and inviting some man-power
Warmup Questionnaire
• Who of you proably wants to use Phoenix in future?

• Who wants a nice way of reusing her existing content in Phoenix?

• Who knows XSLT?

• Who has development experience with XSLT

• Who thinks i should stop bugging you with silly questions?
Overview
About me
The Project
 • Lessen the Gap from v4 v6 to Phoenix

 • The initial idea

 • Google Summer of Code 2011

 • Problems & Solutions

Current Status
 • A prototypical v4 v6 Extension being able to export contents of pages and tt_content
Shameless self-plug
• Nicolas Forgerit

• Student/Freelancer from Karlsruhe

• Love sports & coffee

• Crawl the web for information way too much of my time

                github.com/crusoe

                nicolas.forgerit@gmail.com

                @forgerit


• My mentor: Christian Müller

• Core Dev TYPO3/Freelancer from Bonn

• Owner of kitsunet.de
The Project
Lessen the Gap from v4 v6 to Phoenix
 • Content Transition

 • Export contents of a v4 v6 instance and import to Phoenix

 • Use existing interfaces

 • Make it flexible and configurable
What again was this GSoC stuff?
 • fellowship given out by Google to provide Open Source projects

 • TYPO3 had been a sub-project 4 years in a row until 2011

 • Unfortunately, TYPO3 hasn't been accepted for 2012 :( (Drupal was, WP not)
The initial idea
 • use the well-known SYSEXT:impexp for generating XML data

 • make exported data Phoenix-ready

 • use XSLT to transform the exported data

 • provide generated data as Phoenix packet and/or webservice
Problems & Solutions
 • PHPs XSLTProcessor is rather old -> fill missing gaps with PHP+Regex

 • Phoenix CTypes were not ready until about 3 weeks ago -> make CTypes configurable as
   "Snippets"

 • XSLTProcessor's debug output is rather "un-verbose" -> no solution yet :( (use Saxon for XSLT
   development)

 • ...
Current Status
TYPO3 Transition Tool
• A prototypical v4 v6 Extension

• Do the (common) work in just a few clicks

• Make it extendable (via XSLT & PHP)

• Try to make the code looking clean
The Transition Steps
 • Step 1: Preparing the data

     ◦ Set Output Filename

     ◦ Select to-be-exported Database Tables

     ◦ Set Initial Page-Subtree Node (usually pid 0 for getting the whole Pagetree)

 • Step 2: Transform the data

     ◦ Provide v4 v6 => Phoenix Content Type configuration

     ◦ Select to-be-used PHP-Hooks

 • Step 3: Export the data

     ◦ Download Sites.xml

     ◦ Download packet

     ◦ Publish generated Data as Webservice
General Transformation Procedure
• have a base stylsheet which does the general procedure

• fetch all the user-chosen snippets and copy them into the base

• execute defined "pre-transformation" PHP-Hooks on the data

• run the XSLT Processor

• execute defined "post-transformation" PHP-Hooks on the xslt-processed data
Code!
view it on T3 Forge or Github.
Base XSLT Stylesheet
 • kind of a "base" stylesheet containing several markers

 • applies the general rules

 • holds several markers which are to be replaced by the right snippets/contents
Code!
view it on T3 Forge or Github.
Content Types XSLT Snippets
• non-valid XSLT scripts (slices of them)

• work just in context of T3TT

• modular and independent from each other

• automagically fetched and traversed by the XSLT Processor
Code!
view it on T3 Forge or Github.
PHP Hooks
• filling gaps of XSLT v1

• kinda "meta-language" for XSLT

• can be easily added to a PHP file

• T3TT splits the to-be-altered Datafile into lines

• ... which can be changed e.g. via PCRE
PHP Hooks (pt. 2)
 • needed before as well as after the XSLT transformation

 • provide a way to do some quick'n'dirty adjustments

Some example hooks

killIndexColons (pre)

1   <!-- transform -->
2   <tablerow index="tt_content:1" type="array">
3   <!-- to -->
4   <tablerow index="tt_content" id="1" type="array">

since XSLT v1 cannot "regex" attribute values. (v2 can!)
PHP Hooks (pt. 3)
unescapeHtmlSpecialCharsOfFlexformValues (pre)

make Flexform transformations XSLT applicable (i.e. undo HSC) (currently not working :[ )

 1   <!-- transform -->
 2   &lt;T3FlexForms&gt;
 3       &lt;data&gt;
 4           &lt;sheet index=&quot;sDEF&quot;&gt;
 5               ...
 6   <!-- to -->
 7   <T3FlexForms>
 8       <data>
 9           <sheet index="sDEF">
10               ...

normalizeNodeNames (post)

check that nodeName="{value}" contains Phoenix-compatible characters

!
assert   that nodeName-value
     -   is not empty
     -   matches ([-_a-zA-Z0-9])
     -   contains no whitespaces
     -   ...
Code!
view it on T3 Forge or Github.
XSLT Intro
• Why XSLT?

• The big pic:

   ◦ XPath

   ◦ <xsl:element> and <xsl:value-of>

   ◦ declarative

   ◦ pseudo-functional

• Tools

   ◦ Saxon

   ◦ XSLTCake

   ◦ Oxygen Editor (expensive!)

   ◦ phpStorm can execute XPath expressions

   ◦ Your Browser!
XSLT Intro (pt. 2)
• Resources

   ◦ en.wikipedia.org on XSLT

   ◦ Beginning XSLT and XPath - Transforming XML Documents and Data

   ◦ XSLT (O'Reilly)

   ◦ XSLT Cookbook

   ◦ W3C XSLT v1

   ◦ W3C XSLT v2
XPath on an HTML DOM
• Selecting the html node: / (root node)

• Select title node: /head/title

• Axes: child::* (standard), self::* , parent::* and attribute::/@

• Restrict the Selection to a div containing the attribute class="visible" : [@class='visible']

• Link several restrictions logically with and and or
Some built-in XSLT Functions
• On currently selected node:

   ◦ name: name()

   ◦ value: text()

   ◦ concatenate strings: concat()
Important XSL Tags
Output
1     <!-- select a node's value -->
2 <xsl:value-of select="{nodePath}"/>
3
4     <!-- construct a div with class 'visible' -->
5 <xsl:element name="{elementName}">
6     <xsl:attribute name="class">visible</xsl:attribute>
7 </xsl:element>
Important XSL Tags (pt. 2)
(Sub-)Templates (~ Functions)
1     <!-- 'myTemplate' can only be manually called by another function -->
2 <xsl:template name="myTemplate"> <!-- do stuff --></xsl:template>
3
4     <!-- 'div' is called whenever a function uses <xsl:apply-templates select="/path/to/div/element" -->
5 <xsl:template match="div"> <!-- do stuff --> </xsl:template>
6
7     <!-- apply templates on selected nodes -->
8 <xsl:apply-templates select="/path/to/div/element"/>
Important XSL Tags (pt. 3)
Some Imperatives
 1       <!-- loop over each node of selected node set 'myNodes'-->
 2   <xsl:for-each select="/path/to/myNodes"><!-- do stuff --></xsl:for-each>
 3
 4       <!-- switch-case-alike -->
 5   <xsl:choose>
 6       <xsl:when test="ContitionA">
 7           <!-- do stuff when ConditionA is true -->
 8       </xsl:when>
 9       <xsl:when test="ConditionB">
10           <!-- do stuff when ConditionB is true -->
11       </xsl:when>
12       <xsl:otherwise>
13           <!-- stuff that is done if neither ConditionA nor ConditionB were true -->
14       </xsl:otherwise>
15   </xsl:choose>
16
17       <!-- if -->
18   <xsl:if test="someTestCondition"> <!-- do stuff if if is true --> </xsl:if>
Important XSL Tags (pt. 4)
Initial Declarations
 1   <?xml version="1.0" encoding="UTF-8"?>
 2   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 3   <xsl:output
 4       method="xml"
 5       version="1.0"
 6       encoding="UTF-8"
 7       omit-xml-declaration="no"
 8       indent="yes"
 9       cdata-section-elements="source text"
10   />
Fooling around with XSLT
Some possible tasks
• Use XSLTCake.com

• Format your v4 v6 Contents to browsable HTML

• Make a .PDF containing all your v4 v6 Pages

• Look at Phoenix CTypes and how to generate them
We need you!
Participation
 • Test the T3TT extension and send in bug reports

 • Add support for new extensions
Thank you!

Contenu connexe

Tendances

Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on WindowsWO Community
 
Real time fulltext search with sphinx
Real time fulltext search with sphinxReal time fulltext search with sphinx
Real time fulltext search with sphinxAdrian Nuta
 
Using Sphinx for Search in PHP
Using Sphinx for Search in PHPUsing Sphinx for Search in PHP
Using Sphinx for Search in PHPMike Lively
 
Cassandra 3 new features 2016
Cassandra 3 new features 2016Cassandra 3 new features 2016
Cassandra 3 new features 2016Duyhai Doan
 
How mysql handles ORDER BY, GROUP BY, and DISTINCT
How mysql handles ORDER BY, GROUP BY, and DISTINCTHow mysql handles ORDER BY, GROUP BY, and DISTINCT
How mysql handles ORDER BY, GROUP BY, and DISTINCTSergey Petrunya
 
Cassandra 3 new features @ Geecon Krakow 2016
Cassandra 3 new features  @ Geecon Krakow 2016Cassandra 3 new features  @ Geecon Krakow 2016
Cassandra 3 new features @ Geecon Krakow 2016Duyhai Doan
 
NSLogger network logging extension
NSLogger network logging extensionNSLogger network logging extension
NSLogger network logging extensionCocoaHeads France
 
From XML to eBooks Part 2: The Details
From XML to eBooks Part 2: The DetailsFrom XML to eBooks Part 2: The Details
From XML to eBooks Part 2: The DetailsRichard Hamilton
 
Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016takezoe
 
Cassandra drivers and libraries
Cassandra drivers and librariesCassandra drivers and libraries
Cassandra drivers and librariesDuyhai Doan
 
Dexador Rises
Dexador RisesDexador Rises
Dexador Risesfukamachi
 
Cassandra Drivers and Tools
Cassandra Drivers and ToolsCassandra Drivers and Tools
Cassandra Drivers and ToolsDuyhai Doan
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIOliver Busse
 
WebObjects Optimization
WebObjects OptimizationWebObjects Optimization
WebObjects OptimizationWO Community
 
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...Lucidworks
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with serverEugene Yokota
 

Tendances (20)

Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
 
Lift talk
Lift talkLift talk
Lift talk
 
Real time fulltext search with sphinx
Real time fulltext search with sphinxReal time fulltext search with sphinx
Real time fulltext search with sphinx
 
Using Sphinx for Search in PHP
Using Sphinx for Search in PHPUsing Sphinx for Search in PHP
Using Sphinx for Search in PHP
 
Hibernate performance tuning
Hibernate performance tuningHibernate performance tuning
Hibernate performance tuning
 
3 years with Clojure
3 years with Clojure3 years with Clojure
3 years with Clojure
 
Cassandra 3 new features 2016
Cassandra 3 new features 2016Cassandra 3 new features 2016
Cassandra 3 new features 2016
 
How mysql handles ORDER BY, GROUP BY, and DISTINCT
How mysql handles ORDER BY, GROUP BY, and DISTINCTHow mysql handles ORDER BY, GROUP BY, and DISTINCT
How mysql handles ORDER BY, GROUP BY, and DISTINCT
 
Cassandra 3 new features @ Geecon Krakow 2016
Cassandra 3 new features  @ Geecon Krakow 2016Cassandra 3 new features  @ Geecon Krakow 2016
Cassandra 3 new features @ Geecon Krakow 2016
 
NSLogger network logging extension
NSLogger network logging extensionNSLogger network logging extension
NSLogger network logging extension
 
From XML to eBooks Part 2: The Details
From XML to eBooks Part 2: The DetailsFrom XML to eBooks Part 2: The Details
From XML to eBooks Part 2: The Details
 
Ce e nou in Rails 4
Ce e nou in Rails 4Ce e nou in Rails 4
Ce e nou in Rails 4
 
Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016Scala Frameworks for Web Application 2016
Scala Frameworks for Web Application 2016
 
Cassandra drivers and libraries
Cassandra drivers and librariesCassandra drivers and libraries
Cassandra drivers and libraries
 
Dexador Rises
Dexador RisesDexador Rises
Dexador Rises
 
Cassandra Drivers and Tools
Cassandra Drivers and ToolsCassandra Drivers and Tools
Cassandra Drivers and Tools
 
Utilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino APIUtilizing the OpenNTF Domino API
Utilizing the OpenNTF Domino API
 
WebObjects Optimization
WebObjects OptimizationWebObjects Optimization
WebObjects Optimization
 
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
Solr Troubleshooting - Treemap Approach: Presented by Alexandre Rafolovitch, ...
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 

En vedette (17)

Rich and poor
Rich and poorRich and poor
Rich and poor
 
Talsu novada krīžu centrs
Talsu novada krīžu centrsTalsu novada krīžu centrs
Talsu novada krīžu centrs
 
Madurez e inmadurez
Madurez e inmadurezMadurez e inmadurez
Madurez e inmadurez
 
Biedrība "Vīnoga"
Biedrība "Vīnoga"Biedrība "Vīnoga"
Biedrība "Vīnoga"
 
Liberalism final
Liberalism finalLiberalism final
Liberalism final
 
Labas pāarmaiņas
Labas pāarmaiņasLabas pāarmaiņas
Labas pāarmaiņas
 
Talsu Komersantu Klubs
Talsu Komersantu KlubsTalsu Komersantu Klubs
Talsu Komersantu Klubs
 
Latvijas Neredzīgo biedrība
Latvijas Neredzīgo biedrībaLatvijas Neredzīgo biedrība
Latvijas Neredzīgo biedrība
 
Saldus pensionāru biedrība
Saldus pensionāru biedrībaSaldus pensionāru biedrība
Saldus pensionāru biedrība
 
NVO un pašvaldības sadarbība, finanšu iespējas kopīgiem projektiem
NVO un pašvaldības sadarbība, finanšu iespējas kopīgiem projektiemNVO un pašvaldības sadarbība, finanšu iespējas kopīgiem projektiem
NVO un pašvaldības sadarbība, finanšu iespējas kopīgiem projektiem
 
Najduzi most na svetu
Najduzi most na svetuNajduzi most na svetu
Najduzi most na svetu
 
아쇼카
아쇼카아쇼카
아쇼카
 
Leyes aplicadas al turismo
Leyes aplicadas al turismoLeyes aplicadas al turismo
Leyes aplicadas al turismo
 
Industry Evening 2013 Presentation
Industry Evening 2013 PresentationIndustry Evening 2013 Presentation
Industry Evening 2013 Presentation
 
Liberalism: Ancient and Modern Leo Strauss
Liberalism: Ancient and Modern Leo StraussLiberalism: Ancient and Modern Leo Strauss
Liberalism: Ancient and Modern Leo Strauss
 
Microsoft interview walkthrough
Microsoft interview walkthroughMicrosoft interview walkthrough
Microsoft interview walkthrough
 
Z kurzemes nvo_atbalsta_centrs_030712_talsi
Z kurzemes nvo_atbalsta_centrs_030712_talsiZ kurzemes nvo_atbalsta_centrs_030712_talsi
Z kurzemes nvo_atbalsta_centrs_030712_talsi
 

Similaire à TYPO3 Transition Tool

TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkBob German
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nlbartzon
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nltieleman
 
Attack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaAttack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaPrajal Kulkarni
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScriptkoppenolski
 
Front end for back end developers
Front end for back end developersFront end for back end developers
Front end for back end developersWojciech Bednarski
 
Balisage - EXPath - A practical introduction
Balisage - EXPath - A practical introductionBalisage - EXPath - A practical introduction
Balisage - EXPath - A practical introductionFlorent Georges
 
Plain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticalsPlain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticalsAngela Byron
 
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Claus Ibsen
 
Apache Camel K - Copenhagen
Apache Camel K - CopenhagenApache Camel K - Copenhagen
Apache Camel K - CopenhagenClaus Ibsen
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracketjnewmanux
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)François Massart
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bagstuplum
 
Javascript done right - Open Web Camp III
Javascript done right - Open Web Camp IIIJavascript done right - Open Web Camp III
Javascript done right - Open Web Camp IIIDirk Ginader
 
Future-proof Development for Classic SharePoint
Future-proof Development for Classic SharePointFuture-proof Development for Classic SharePoint
Future-proof Development for Classic SharePointBob German
 

Similaire à TYPO3 Transition Tool (20)

TypeScript and SharePoint Framework
TypeScript and SharePoint FrameworkTypeScript and SharePoint Framework
TypeScript and SharePoint Framework
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Lessons learned while building Omroep.nl
Lessons learned while building Omroep.nlLessons learned while building Omroep.nl
Lessons learned while building Omroep.nl
 
Attack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and KibanaAttack monitoring using ElasticSearch Logstash and Kibana
Attack monitoring using ElasticSearch Logstash and Kibana
 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
 
Front end for back end developers
Front end for back end developersFront end for back end developers
Front end for back end developers
 
CSS 201
CSS 201CSS 201
CSS 201
 
Balisage - EXPath - A practical introduction
Balisage - EXPath - A practical introductionBalisage - EXPath - A practical introduction
Balisage - EXPath - A practical introduction
 
Plain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticalsPlain english guide to drupal 8 criticals
Plain english guide to drupal 8 criticals
 
Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2Apache Camel K - Copenhagen v2
Apache Camel K - Copenhagen v2
 
Apache Camel K - Copenhagen
Apache Camel K - CopenhagenApache Camel K - Copenhagen
Apache Camel K - Copenhagen
 
JavaScripts & jQuery
JavaScripts & jQueryJavaScripts & jQuery
JavaScripts & jQuery
 
ITB2017 - Keynote
ITB2017 - KeynoteITB2017 - Keynote
ITB2017 - Keynote
 
Killing the Angle Bracket
Killing the Angle BracketKilling the Angle Bracket
Killing the Angle Bracket
 
HTML5, just another presentation :)
HTML5, just another presentation :)HTML5, just another presentation :)
HTML5, just another presentation :)
 
Html5 Brown Bag
Html5 Brown BagHtml5 Brown Bag
Html5 Brown Bag
 
Javascript done right - Open Web Camp III
Javascript done right - Open Web Camp IIIJavascript done right - Open Web Camp III
Javascript done right - Open Web Camp III
 
Future-proof Development for Classic SharePoint
Future-proof Development for Classic SharePointFuture-proof Development for Classic SharePoint
Future-proof Development for Classic SharePoint
 
Linq To XML Overview
Linq To XML OverviewLinq To XML Overview
Linq To XML Overview
 

Dernier

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - 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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
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
 
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
 
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
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
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)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - 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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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...
 
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
 
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?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 

TYPO3 Transition Tool

  • 2. What's this about? • The Berlin Manifesto constitutes that the transition from v4v6 to Phoenix will be easily possible • Content Transition is a big part of that • Last year a GSoC project was initiated for working on that problem • Therefore: This is for presenting first solutions and inviting some man-power
  • 3. Warmup Questionnaire • Who of you proably wants to use Phoenix in future? • Who wants a nice way of reusing her existing content in Phoenix? • Who knows XSLT? • Who has development experience with XSLT • Who thinks i should stop bugging you with silly questions?
  • 4. Overview About me The Project • Lessen the Gap from v4 v6 to Phoenix • The initial idea • Google Summer of Code 2011 • Problems & Solutions Current Status • A prototypical v4 v6 Extension being able to export contents of pages and tt_content
  • 5. Shameless self-plug • Nicolas Forgerit • Student/Freelancer from Karlsruhe • Love sports & coffee • Crawl the web for information way too much of my time github.com/crusoe nicolas.forgerit@gmail.com @forgerit • My mentor: Christian Müller • Core Dev TYPO3/Freelancer from Bonn • Owner of kitsunet.de
  • 6. The Project Lessen the Gap from v4 v6 to Phoenix • Content Transition • Export contents of a v4 v6 instance and import to Phoenix • Use existing interfaces • Make it flexible and configurable
  • 7. What again was this GSoC stuff? • fellowship given out by Google to provide Open Source projects • TYPO3 had been a sub-project 4 years in a row until 2011 • Unfortunately, TYPO3 hasn't been accepted for 2012 :( (Drupal was, WP not)
  • 8. The initial idea • use the well-known SYSEXT:impexp for generating XML data • make exported data Phoenix-ready • use XSLT to transform the exported data • provide generated data as Phoenix packet and/or webservice
  • 9. Problems & Solutions • PHPs XSLTProcessor is rather old -> fill missing gaps with PHP+Regex • Phoenix CTypes were not ready until about 3 weeks ago -> make CTypes configurable as "Snippets" • XSLTProcessor's debug output is rather "un-verbose" -> no solution yet :( (use Saxon for XSLT development) • ...
  • 10. Current Status TYPO3 Transition Tool • A prototypical v4 v6 Extension • Do the (common) work in just a few clicks • Make it extendable (via XSLT & PHP) • Try to make the code looking clean
  • 11. The Transition Steps • Step 1: Preparing the data ◦ Set Output Filename ◦ Select to-be-exported Database Tables ◦ Set Initial Page-Subtree Node (usually pid 0 for getting the whole Pagetree) • Step 2: Transform the data ◦ Provide v4 v6 => Phoenix Content Type configuration ◦ Select to-be-used PHP-Hooks • Step 3: Export the data ◦ Download Sites.xml ◦ Download packet ◦ Publish generated Data as Webservice
  • 12. General Transformation Procedure • have a base stylsheet which does the general procedure • fetch all the user-chosen snippets and copy them into the base • execute defined "pre-transformation" PHP-Hooks on the data • run the XSLT Processor • execute defined "post-transformation" PHP-Hooks on the xslt-processed data
  • 13. Code! view it on T3 Forge or Github.
  • 14. Base XSLT Stylesheet • kind of a "base" stylesheet containing several markers • applies the general rules • holds several markers which are to be replaced by the right snippets/contents
  • 15. Code! view it on T3 Forge or Github.
  • 16. Content Types XSLT Snippets • non-valid XSLT scripts (slices of them) • work just in context of T3TT • modular and independent from each other • automagically fetched and traversed by the XSLT Processor
  • 17. Code! view it on T3 Forge or Github.
  • 18. PHP Hooks • filling gaps of XSLT v1 • kinda "meta-language" for XSLT • can be easily added to a PHP file • T3TT splits the to-be-altered Datafile into lines • ... which can be changed e.g. via PCRE
  • 19. PHP Hooks (pt. 2) • needed before as well as after the XSLT transformation • provide a way to do some quick'n'dirty adjustments Some example hooks killIndexColons (pre) 1 <!-- transform --> 2 <tablerow index="tt_content:1" type="array"> 3 <!-- to --> 4 <tablerow index="tt_content" id="1" type="array"> since XSLT v1 cannot "regex" attribute values. (v2 can!)
  • 20. PHP Hooks (pt. 3) unescapeHtmlSpecialCharsOfFlexformValues (pre) make Flexform transformations XSLT applicable (i.e. undo HSC) (currently not working :[ ) 1 <!-- transform --> 2 &lt;T3FlexForms&gt; 3 &lt;data&gt; 4 &lt;sheet index=&quot;sDEF&quot;&gt; 5 ... 6 <!-- to --> 7 <T3FlexForms> 8 <data> 9 <sheet index="sDEF"> 10 ... normalizeNodeNames (post) check that nodeName="{value}" contains Phoenix-compatible characters ! assert that nodeName-value - is not empty - matches ([-_a-zA-Z0-9]) - contains no whitespaces - ...
  • 21. Code! view it on T3 Forge or Github.
  • 22. XSLT Intro • Why XSLT? • The big pic: ◦ XPath ◦ <xsl:element> and <xsl:value-of> ◦ declarative ◦ pseudo-functional • Tools ◦ Saxon ◦ XSLTCake ◦ Oxygen Editor (expensive!) ◦ phpStorm can execute XPath expressions ◦ Your Browser!
  • 23. XSLT Intro (pt. 2) • Resources ◦ en.wikipedia.org on XSLT ◦ Beginning XSLT and XPath - Transforming XML Documents and Data ◦ XSLT (O'Reilly) ◦ XSLT Cookbook ◦ W3C XSLT v1 ◦ W3C XSLT v2
  • 24. XPath on an HTML DOM • Selecting the html node: / (root node) • Select title node: /head/title • Axes: child::* (standard), self::* , parent::* and attribute::/@ • Restrict the Selection to a div containing the attribute class="visible" : [@class='visible'] • Link several restrictions logically with and and or
  • 25. Some built-in XSLT Functions • On currently selected node: ◦ name: name() ◦ value: text() ◦ concatenate strings: concat()
  • 26. Important XSL Tags Output 1 <!-- select a node's value --> 2 <xsl:value-of select="{nodePath}"/> 3 4 <!-- construct a div with class 'visible' --> 5 <xsl:element name="{elementName}"> 6 <xsl:attribute name="class">visible</xsl:attribute> 7 </xsl:element>
  • 27. Important XSL Tags (pt. 2) (Sub-)Templates (~ Functions) 1 <!-- 'myTemplate' can only be manually called by another function --> 2 <xsl:template name="myTemplate"> <!-- do stuff --></xsl:template> 3 4 <!-- 'div' is called whenever a function uses <xsl:apply-templates select="/path/to/div/element" --> 5 <xsl:template match="div"> <!-- do stuff --> </xsl:template> 6 7 <!-- apply templates on selected nodes --> 8 <xsl:apply-templates select="/path/to/div/element"/>
  • 28. Important XSL Tags (pt. 3) Some Imperatives 1 <!-- loop over each node of selected node set 'myNodes'--> 2 <xsl:for-each select="/path/to/myNodes"><!-- do stuff --></xsl:for-each> 3 4 <!-- switch-case-alike --> 5 <xsl:choose> 6 <xsl:when test="ContitionA"> 7 <!-- do stuff when ConditionA is true --> 8 </xsl:when> 9 <xsl:when test="ConditionB"> 10 <!-- do stuff when ConditionB is true --> 11 </xsl:when> 12 <xsl:otherwise> 13 <!-- stuff that is done if neither ConditionA nor ConditionB were true --> 14 </xsl:otherwise> 15 </xsl:choose> 16 17 <!-- if --> 18 <xsl:if test="someTestCondition"> <!-- do stuff if if is true --> </xsl:if>
  • 29. Important XSL Tags (pt. 4) Initial Declarations 1 <?xml version="1.0" encoding="UTF-8"?> 2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 3 <xsl:output 4 method="xml" 5 version="1.0" 6 encoding="UTF-8" 7 omit-xml-declaration="no" 8 indent="yes" 9 cdata-section-elements="source text" 10 />
  • 30. Fooling around with XSLT Some possible tasks • Use XSLTCake.com • Format your v4 v6 Contents to browsable HTML • Make a .PDF containing all your v4 v6 Pages • Look at Phoenix CTypes and how to generate them
  • 31. We need you! Participation • Test the T3TT extension and send in bug reports • Add support for new extensions