SlideShare une entreprise Scribd logo
1  sur  11
D3ML Session
Falk Hartmann
Research Associate, SAP AG
Requirements
What is needed?
-A running DA/DM/AM
-A browser (Firefox with User Agent Switcher + IE)
(http://localhost:8888/static)
-An editor supporting XML (JEdit, Eclipse & WTP plugin)
-A CAE
-An MWA

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 2

2
Open questions

3

What is the code to replace the current links (i.e.: next, previous,
home) shown at the bottom of the page by big icons or buttons?
⇒ Currently hard-coded in the AdaptionManager
What is the code to navigate page by page instead line by line in the
procedure (i.e.: could we create new icons or buttons)?
⇒ Has been done by SBS
What is the code to scale an image in order to display it correctly on
several devices (laptop, PDA, etc.)?
⇒ Images are now scaled to the width of the display device

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 3
Summary Example (1)

4

What is the code to generate an overview of the procedure (e.g.
some kind of summary with hyperlinks for example)?
⇒ Add summary to procedure.xtl
<section id="summary">
<span class="phase_name">Summary</span><br/>
<ul>
<xtl:for-each select="phases">
<li>
<a>
<xtl:attribute name="href"
select="translate(concat('#',name),' ','_')"/>
<xtl:text select="name"/>
</a>
</li>
</xtl:for-each>
</ul>
</section>
© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 4
Summary Example (2)
⇒ Furthermore, the sections need named anchors
<section id="general_warnings">
<!-- GENERAL WARNINGS AREA -->
<xtl:for-each
select="phases[name='General warnings']">
<a>
<xtl:attribute name="id"
select="translate(name,' ','_')"/>
</a>
<xtl:call-macro name="INFO_ASSET"/>
</xtl:for-each>
<!-- END GENERAL WARNINGS AREA -->
</section>
⇒ Treat the other sections respectively

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 5

5
Adaptation Example (1)

6

What is the code to adapt the layout of a piece of text according to
the following rendering hints?
⇒Add macro to procedure.xtl
<xtl:macro name="IMPORTANCE">
<xtl:if select="
count(allMetadata/*[name()='Important'] ) > 0">
<xtl:attribute name="style" select="color:red;"
realm="id"/>
</xtl:if>
<xtl:if select="
count(allMetadata/*[name()='Important'] ) = 0
and count( allMetadata/*[name()='Relatively
Important'] ) > 0">
<xtl:attribute name="style" select="color:blue;"
realm="id"/>
</xtl:if>
</xtl:macro>
© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 6
Adaptation Example (2)
⇒ Use the macro
<span class="instruction_name">
<xtl:call-macro name="IMPORTANCE"/>
<xtl:text select="name"/>
</span>

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 7

7
Layout Container Example (1)

8

How to create a general warnings sections specifically for the PDA
that shows only warnings and cautions?
⇒ Clone and modify the section "general_warnings"
<section id="simplified_general_warnings">
<!-- GENERAL WARNINGS AREA -->
<xtl:for-each select="phases[
name='General warnings']">
<a>
<xtl:attribute name="id"
select="translate(name,' ','_')"/>
</a>
<xtl:call-macro name="SIMPLIFIED_INFO_ASSET"/>
</xtl:for-each>
<!-- END GENERAL WARNINGS AREA -->
</section>

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 8
Layout Container Example (2)

9

⇒ Clone and modify the macro "INFO_ASSET"
<xtl:macro name="SIMPLIFIED_INFO_ASSET">
<div>
<xtl:for-each
select="contentAssets[type=('warning'|'caution')]">
<xtl:call-macro name="INFO_ASSET_CONTENT"/>
</xtl:for-each>
<xtl:for-each
select="assetReferences[type=('warning'|'caution')]">
<xtl:call-macro name="INFO_ASSET_CONTENT"/>
</xtl:for-each>
</div>
</xtl:macro>

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 9
Layout Container Example (3)

10

⇒ Use the new section in an alternative layout container
<!-- … -->
<sel:when expr="outputMethod() = 'visual' and
device-height() &lt; 400">
<d3ml:layout-container>
<d3ml:frame paginate="true">
<d3ml:content-ref ref="#general_info"/>
<d3ml:content-ref
ref="#simplified_general_warnings"/>
<xtl:for-each select="phases[
name!='General warnings']">
<d3ml:content-ref>
<xtl:attribute name="ref" select="concat('#',id)"/>
</d3ml:content-ref>
</xtl:for-each>
</d3ml:frame>
</d3ml:layout-container>
</sel:when>
© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 10
That’s it.

<xtl:for-each select="questions/*">
<xtl:text select="answer()"/>
</xtl:for-each>

© SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 11

11

Contenu connexe

En vedette

IRI BCG Google eCommerce Cobranded_FINAL2
IRI BCG Google eCommerce Cobranded_FINAL2IRI BCG Google eCommerce Cobranded_FINAL2
IRI BCG Google eCommerce Cobranded_FINAL2
Ben Sprecher
 
Protocol Engineering: Beschreibung und Entwicklung von Kommunikationsprotokollen
Protocol Engineering: Beschreibung und Entwicklung von KommunikationsprotokollenProtocol Engineering: Beschreibung und Entwicklung von Kommunikationsprotokollen
Protocol Engineering: Beschreibung und Entwicklung von Kommunikationsprotokollen
Falk Hartmann
 
Drahtwanderung: Wir machen den NeXTen Schritt
Drahtwanderung: Wir machen den NeXTen SchrittDrahtwanderung: Wir machen den NeXTen Schritt
Drahtwanderung: Wir machen den NeXTen Schritt
Falk Hartmann
 
Demandware tco webinar final 12122012
Demandware tco webinar final 12122012Demandware tco webinar final 12122012
Demandware tco webinar final 12122012
Thomas Roider
 
Steps to apply for Passport Services
Steps to apply for Passport ServicesSteps to apply for Passport Services
Steps to apply for Passport Services
passportindia
 

En vedette (11)

IRI BCG Google eCommerce Cobranded_FINAL2
IRI BCG Google eCommerce Cobranded_FINAL2IRI BCG Google eCommerce Cobranded_FINAL2
IRI BCG Google eCommerce Cobranded_FINAL2
 
Risikomanagement in der Softwareentwicklung
Risikomanagement in der SoftwareentwicklungRisikomanagement in der Softwareentwicklung
Risikomanagement in der Softwareentwicklung
 
Technologieraum übergreifende Programmierung
Technologieraum übergreifende ProgrammierungTechnologieraum übergreifende Programmierung
Technologieraum übergreifende Programmierung
 
Protocol Engineering: Beschreibung und Entwicklung von Kommunikationsprotokollen
Protocol Engineering: Beschreibung und Entwicklung von KommunikationsprotokollenProtocol Engineering: Beschreibung und Entwicklung von Kommunikationsprotokollen
Protocol Engineering: Beschreibung und Entwicklung von Kommunikationsprotokollen
 
Risiko Management in der Softwareentwicklung
Risiko Management in der SoftwareentwicklungRisiko Management in der Softwareentwicklung
Risiko Management in der Softwareentwicklung
 
An Introduction to AngularJS
An Introduction to AngularJSAn Introduction to AngularJS
An Introduction to AngularJS
 
Drahtwanderung: Wir machen den NeXTen Schritt
Drahtwanderung: Wir machen den NeXTen SchrittDrahtwanderung: Wir machen den NeXTen Schritt
Drahtwanderung: Wir machen den NeXTen Schritt
 
House of Fraser case study with Poq and Demandware
House of Fraser case study with Poq and DemandwareHouse of Fraser case study with Poq and Demandware
House of Fraser case study with Poq and Demandware
 
Demandware tco webinar final 12122012
Demandware tco webinar final 12122012Demandware tco webinar final 12122012
Demandware tco webinar final 12122012
 
Steps to apply for Passport Services
Steps to apply for Passport ServicesSteps to apply for Passport Services
Steps to apply for Passport Services
 
E commerce
E commerceE commerce
E commerce
 

Similaire à D3ML Session

CustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsCustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputs
Suite Solutions
 
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Databricks
 

Similaire à D3ML Session (20)

Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of TonguesChoose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
Choose'10: Ralf Laemmel - Dealing Confortably with the Confusion of Tongues
 
Dax Declarative Api For Xml
Dax   Declarative Api For XmlDax   Declarative Api For Xml
Dax Declarative Api For Xml
 
Mazda Use of Third Generation Xml Tools
Mazda Use of Third Generation Xml ToolsMazda Use of Third Generation Xml Tools
Mazda Use of Third Generation Xml Tools
 
AD215 - Practical Magic with DXL
AD215 - Practical Magic with DXLAD215 - Practical Magic with DXL
AD215 - Practical Magic with DXL
 
Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4Inroduction to XSLT with PHP4
Inroduction to XSLT with PHP4
 
Migration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming ModelsMigration To Multi Core - Parallel Programming Models
Migration To Multi Core - Parallel Programming Models
 
PMML - Predictive Model Markup Language
PMML - Predictive Model Markup LanguagePMML - Predictive Model Markup Language
PMML - Predictive Model Markup Language
 
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
Fast Insights to Optimized Vectorization and Memory Using Cache-aware Rooflin...
 
treeview
treeviewtreeview
treeview
 
treeview
treeviewtreeview
treeview
 
AdvancedXPath
AdvancedXPathAdvancedXPath
AdvancedXPath
 
Developing web apps using Erlang-Web
Developing web apps using Erlang-WebDeveloping web apps using Erlang-Web
Developing web apps using Erlang-Web
 
Go Faster With Native Compilation
Go Faster With Native CompilationGo Faster With Native Compilation
Go Faster With Native Compilation
 
Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2Go faster with_native_compilation Part-2
Go faster with_native_compilation Part-2
 
CustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputsCustomizingStyleSheetsForHTMLOutputs
CustomizingStyleSheetsForHTMLOutputs
 
Project Portfolio - Transferable Skills
Project Portfolio - Transferable SkillsProject Portfolio - Transferable Skills
Project Portfolio - Transferable Skills
 
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
Accelerating Deep Learning Training with BigDL and Drizzle on Apache Spark wi...
 
Implementing the Genetic Algorithm in XSLT: PoC
Implementing the Genetic Algorithm in XSLT: PoCImplementing the Genetic Algorithm in XSLT: PoC
Implementing the Genetic Algorithm in XSLT: PoC
 
Ontopia Code Camp
Ontopia Code CampOntopia Code Camp
Ontopia Code Camp
 
Being HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on PurposeBeing HAPI! Reverse Proxying on Purpose
Being HAPI! Reverse Proxying on Purpose
 

Dernier

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
panagenda
 

Dernier (20)

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
 
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
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - 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
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
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
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 

D3ML Session

  • 2. Requirements What is needed? -A running DA/DM/AM -A browser (Firefox with User Agent Switcher + IE) (http://localhost:8888/static) -An editor supporting XML (JEdit, Eclipse & WTP plugin) -A CAE -An MWA © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 2 2
  • 3. Open questions 3 What is the code to replace the current links (i.e.: next, previous, home) shown at the bottom of the page by big icons or buttons? ⇒ Currently hard-coded in the AdaptionManager What is the code to navigate page by page instead line by line in the procedure (i.e.: could we create new icons or buttons)? ⇒ Has been done by SBS What is the code to scale an image in order to display it correctly on several devices (laptop, PDA, etc.)? ⇒ Images are now scaled to the width of the display device © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 3
  • 4. Summary Example (1) 4 What is the code to generate an overview of the procedure (e.g. some kind of summary with hyperlinks for example)? ⇒ Add summary to procedure.xtl <section id="summary"> <span class="phase_name">Summary</span><br/> <ul> <xtl:for-each select="phases"> <li> <a> <xtl:attribute name="href" select="translate(concat('#',name),' ','_')"/> <xtl:text select="name"/> </a> </li> </xtl:for-each> </ul> </section> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 4
  • 5. Summary Example (2) ⇒ Furthermore, the sections need named anchors <section id="general_warnings"> <!-- GENERAL WARNINGS AREA --> <xtl:for-each select="phases[name='General warnings']"> <a> <xtl:attribute name="id" select="translate(name,' ','_')"/> </a> <xtl:call-macro name="INFO_ASSET"/> </xtl:for-each> <!-- END GENERAL WARNINGS AREA --> </section> ⇒ Treat the other sections respectively © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 5 5
  • 6. Adaptation Example (1) 6 What is the code to adapt the layout of a piece of text according to the following rendering hints? ⇒Add macro to procedure.xtl <xtl:macro name="IMPORTANCE"> <xtl:if select=" count(allMetadata/*[name()='Important'] ) > 0"> <xtl:attribute name="style" select="color:red;" realm="id"/> </xtl:if> <xtl:if select=" count(allMetadata/*[name()='Important'] ) = 0 and count( allMetadata/*[name()='Relatively Important'] ) > 0"> <xtl:attribute name="style" select="color:blue;" realm="id"/> </xtl:if> </xtl:macro> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 6
  • 7. Adaptation Example (2) ⇒ Use the macro <span class="instruction_name"> <xtl:call-macro name="IMPORTANCE"/> <xtl:text select="name"/> </span> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 7 7
  • 8. Layout Container Example (1) 8 How to create a general warnings sections specifically for the PDA that shows only warnings and cautions? ⇒ Clone and modify the section "general_warnings" <section id="simplified_general_warnings"> <!-- GENERAL WARNINGS AREA --> <xtl:for-each select="phases[ name='General warnings']"> <a> <xtl:attribute name="id" select="translate(name,' ','_')"/> </a> <xtl:call-macro name="SIMPLIFIED_INFO_ASSET"/> </xtl:for-each> <!-- END GENERAL WARNINGS AREA --> </section> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 8
  • 9. Layout Container Example (2) 9 ⇒ Clone and modify the macro "INFO_ASSET" <xtl:macro name="SIMPLIFIED_INFO_ASSET"> <div> <xtl:for-each select="contentAssets[type=('warning'|'caution')]"> <xtl:call-macro name="INFO_ASSET_CONTENT"/> </xtl:for-each> <xtl:for-each select="assetReferences[type=('warning'|'caution')]"> <xtl:call-macro name="INFO_ASSET_CONTENT"/> </xtl:for-each> </div> </xtl:macro> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 9
  • 10. Layout Container Example (3) 10 ⇒ Use the new section in an alternative layout container <!-- … --> <sel:when expr="outputMethod() = 'visual' and device-height() &lt; 400"> <d3ml:layout-container> <d3ml:frame paginate="true"> <d3ml:content-ref ref="#general_info"/> <d3ml:content-ref ref="#simplified_general_warnings"/> <xtl:for-each select="phases[ name!='General warnings']"> <d3ml:content-ref> <xtl:attribute name="ref" select="concat('#',id)"/> </d3ml:content-ref> </xtl:for-each> </d3ml:frame> </d3ml:layout-container> </sel:when> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 10
  • 11. That’s it. <xtl:for-each select="questions/*"> <xtl:text select="answer()"/> </xtl:for-each> © SAP AG 2006, An Architecture for an XML-Template Engine… / Falk Hartmann / 11 11