SlideShare a Scribd company logo
1 of 29
Download to read offline
XSLT for Authors
Jang F.M. Graat
The Content Era
Who’s Talking ?
http://in18.honestly.de
The Bad Old Days
Private Alphabets
Hidden Revolution
New Alphabet
<?xml version=“1.0”?>
Content + Metadata
<?xml version="1.0" encoding="UTF-8"?>

<dita>

<topic id="id1593DM00FON">

<title>Alice down the rabbit hole</title>

<body>

<p id="id159AG50900P" audience=“tom">
Alice was beginning to get very tired of
sitting by her sister on the bank, and of
having nothing to do: once or twice she
had peeped into the book her sister was
reading, but it had no pictures or
conversations in it, 'and what is the use
of a book,' Alice thought, ‘without
pictures or conversations?’</p>
Your Own Order
Use What You Need
XSLT + XPath
XML + XSLT = Magic
Automating Change
Transformation
Power of xslt
t r a n s f o r m X M L i n t o
a n y t h i n g e l s e
XPath
//title[contains(.,’intro’)]
XSL : Set of Tools
Choose the Version
<xsl:stylesheet
xmlns:xsl=“http://www.w3.org/1999/XSL Transform"

xmlns:xs="http://www.w3.org/2001/XMLSchema"

exclude-result-prefixes="xs"

version="2.0">

Define the Format
<xsl:output method="xml" encoding="UTF-8"
doctype-public="-//OASIS//DTD DITA Topic//EN"
doctype-system="topic.dtd"/>

<xsl:output method="html" encoding="UTF-8"/>
<xsl:output method="text" encoding="UTF-16"/>
Template = Recipe
<xsl:template match="figure">

<xsl:copy>

<xsl:attribute name="id">

<xsl:value-of select="position()"/>

</xsl:attribute>

<xsl:apply-templates select="image"/>

<caption>

<xsl:value-of select="title"/>

</caption>

</xsl:copy>

</xsl:template>
Start the Process
<xsl:template match="/">

<xsl:apply-templates/>

</xsl:template>
Copying Input
<xsl:template match="@*|node()">

<xsl:copy>

<xsl:apply-templates select="@*,node()"/>

</xsl:copy>

</xsl:template>
Dropping Input
<xsl:template match=“prolog" />
<xsl:template match=“*[@status=‘deleted’]” />
<xsl:template match=“topic/body/p[1]” />
<xsl:template match=“p[parent::fig]” />
Creating Elements
<xsl:template match="figure">

<xsl:copy>

<xsl:apply-templates />

<caption>

<xsl:value-of select="title"/>

</caption>

</xsl:copy>

</xsl:template>
Creating Attributes
<xsl:template match="figure">

<xsl:copy>

<xsl:attribute name="id">

<xsl:value-of select="position()"/>

</xsl:attribute>

<xsl:apply-templates />

</xsl:copy>

</xsl:template>
Selecting Targets
<xsl:template match="figure">

<xsl:copy>

<xsl:apply-templates select="image"/>

</xsl:copy>

</xsl:template>
http://in18.honestly.de
4everJang
www.thecontentera.com

More Related Content

More from Jang F.M. Graat

XPath-based transformations in structured FrameMaker
XPath-based transformations in structured FrameMakerXPath-based transformations in structured FrameMaker
XPath-based transformations in structured FrameMakerJang F.M. Graat
 
Driving DITA off the Map
Driving DITA off the MapDriving DITA off the Map
Driving DITA off the MapJang F.M. Graat
 
Rethinking Version Control for Agile Content
Rethinking Version Control for Agile ContentRethinking Version Control for Agile Content
Rethinking Version Control for Agile ContentJang F.M. Graat
 
Advanced techniques for conversion to structured FrameMaker
Advanced techniques for conversion to structured FrameMakerAdvanced techniques for conversion to structured FrameMaker
Advanced techniques for conversion to structured FrameMakerJang F.M. Graat
 
Create your own $35 CMS in Structured FrameMaker
Create your own $35 CMS in Structured FrameMakerCreate your own $35 CMS in Structured FrameMaker
Create your own $35 CMS in Structured FrameMakerJang F.M. Graat
 
Dita Spezialisierung - Wie machen Sie es, und warum Sie es machen sollen.
Dita Spezialisierung - Wie machen Sie es, und warum Sie es machen sollen.Dita Spezialisierung - Wie machen Sie es, und warum Sie es machen sollen.
Dita Spezialisierung - Wie machen Sie es, und warum Sie es machen sollen.Jang F.M. Graat
 
Nur der Nutzer weiss, was der Nutzer noch nicht weiss - Progressive Disclosure
Nur der Nutzer weiss, was der Nutzer noch nicht weiss - Progressive DisclosureNur der Nutzer weiss, was der Nutzer noch nicht weiss - Progressive Disclosure
Nur der Nutzer weiss, was der Nutzer noch nicht weiss - Progressive DisclosureJang F.M. Graat
 
Changing the engine without stopping the rickshaw
Changing the engine without stopping the rickshawChanging the engine without stopping the rickshaw
Changing the engine without stopping the rickshawJang F.M. Graat
 
How I killed the webmaster - and got away with it
How I killed the webmaster - and got away with itHow I killed the webmaster - and got away with it
How I killed the webmaster - and got away with itJang F.M. Graat
 
How to become a trainer - and make lots of $$$
How to become a trainer - and make lots of $$$How to become a trainer - and make lots of $$$
How to become a trainer - and make lots of $$$Jang F.M. Graat
 
Getting your hands dirty - How tech authors may be able to survive in the mac...
Getting your hands dirty - How tech authors may be able to survive in the mac...Getting your hands dirty - How tech authors may be able to survive in the mac...
Getting your hands dirty - How tech authors may be able to survive in the mac...Jang F.M. Graat
 
CADD: What can DITA learn from CAD?
CADD: What can DITA learn from CAD?CADD: What can DITA learn from CAD?
CADD: What can DITA learn from CAD?Jang F.M. Graat
 
Modular documentation in Structured FrameMaker
Modular documentation in Structured FrameMakerModular documentation in Structured FrameMaker
Modular documentation in Structured FrameMakerJang F.M. Graat
 
Bite back - Survival Techniques for Technical Authors
Bite back - Survival Techniques for Technical AuthorsBite back - Survival Techniques for Technical Authors
Bite back - Survival Techniques for Technical AuthorsJang F.M. Graat
 
Does one size really fit all ?
Does one size really fit all ?Does one size really fit all ?
Does one size really fit all ?Jang F.M. Graat
 
DITA Spaghetti - Recipes for Documentation Disasters
DITA Spaghetti - Recipes for Documentation DisastersDITA Spaghetti - Recipes for Documentation Disasters
DITA Spaghetti - Recipes for Documentation DisastersJang F.M. Graat
 
DITA : the road to maturity
DITA : the road to maturityDITA : the road to maturity
DITA : the road to maturityJang F.M. Graat
 
Using DITA without becoming a Geek
Using DITA without becoming a GeekUsing DITA without becoming a Geek
Using DITA without becoming a GeekJang F.M. Graat
 
Present - How to give effective presentations
Present - How to give effective presentationsPresent - How to give effective presentations
Present - How to give effective presentationsJang F.M. Graat
 
Write less - Say more (The added value of minimalism)
Write less - Say more (The added value of minimalism)Write less - Say more (The added value of minimalism)
Write less - Say more (The added value of minimalism)Jang F.M. Graat
 

More from Jang F.M. Graat (20)

XPath-based transformations in structured FrameMaker
XPath-based transformations in structured FrameMakerXPath-based transformations in structured FrameMaker
XPath-based transformations in structured FrameMaker
 
Driving DITA off the Map
Driving DITA off the MapDriving DITA off the Map
Driving DITA off the Map
 
Rethinking Version Control for Agile Content
Rethinking Version Control for Agile ContentRethinking Version Control for Agile Content
Rethinking Version Control for Agile Content
 
Advanced techniques for conversion to structured FrameMaker
Advanced techniques for conversion to structured FrameMakerAdvanced techniques for conversion to structured FrameMaker
Advanced techniques for conversion to structured FrameMaker
 
Create your own $35 CMS in Structured FrameMaker
Create your own $35 CMS in Structured FrameMakerCreate your own $35 CMS in Structured FrameMaker
Create your own $35 CMS in Structured FrameMaker
 
Dita Spezialisierung - Wie machen Sie es, und warum Sie es machen sollen.
Dita Spezialisierung - Wie machen Sie es, und warum Sie es machen sollen.Dita Spezialisierung - Wie machen Sie es, und warum Sie es machen sollen.
Dita Spezialisierung - Wie machen Sie es, und warum Sie es machen sollen.
 
Nur der Nutzer weiss, was der Nutzer noch nicht weiss - Progressive Disclosure
Nur der Nutzer weiss, was der Nutzer noch nicht weiss - Progressive DisclosureNur der Nutzer weiss, was der Nutzer noch nicht weiss - Progressive Disclosure
Nur der Nutzer weiss, was der Nutzer noch nicht weiss - Progressive Disclosure
 
Changing the engine without stopping the rickshaw
Changing the engine without stopping the rickshawChanging the engine without stopping the rickshaw
Changing the engine without stopping the rickshaw
 
How I killed the webmaster - and got away with it
How I killed the webmaster - and got away with itHow I killed the webmaster - and got away with it
How I killed the webmaster - and got away with it
 
How to become a trainer - and make lots of $$$
How to become a trainer - and make lots of $$$How to become a trainer - and make lots of $$$
How to become a trainer - and make lots of $$$
 
Getting your hands dirty - How tech authors may be able to survive in the mac...
Getting your hands dirty - How tech authors may be able to survive in the mac...Getting your hands dirty - How tech authors may be able to survive in the mac...
Getting your hands dirty - How tech authors may be able to survive in the mac...
 
CADD: What can DITA learn from CAD?
CADD: What can DITA learn from CAD?CADD: What can DITA learn from CAD?
CADD: What can DITA learn from CAD?
 
Modular documentation in Structured FrameMaker
Modular documentation in Structured FrameMakerModular documentation in Structured FrameMaker
Modular documentation in Structured FrameMaker
 
Bite back - Survival Techniques for Technical Authors
Bite back - Survival Techniques for Technical AuthorsBite back - Survival Techniques for Technical Authors
Bite back - Survival Techniques for Technical Authors
 
Does one size really fit all ?
Does one size really fit all ?Does one size really fit all ?
Does one size really fit all ?
 
DITA Spaghetti - Recipes for Documentation Disasters
DITA Spaghetti - Recipes for Documentation DisastersDITA Spaghetti - Recipes for Documentation Disasters
DITA Spaghetti - Recipes for Documentation Disasters
 
DITA : the road to maturity
DITA : the road to maturityDITA : the road to maturity
DITA : the road to maturity
 
Using DITA without becoming a Geek
Using DITA without becoming a GeekUsing DITA without becoming a Geek
Using DITA without becoming a Geek
 
Present - How to give effective presentations
Present - How to give effective presentationsPresent - How to give effective presentations
Present - How to give effective presentations
 
Write less - Say more (The added value of minimalism)
Write less - Say more (The added value of minimalism)Write less - Say more (The added value of minimalism)
Write less - Say more (The added value of minimalism)
 

Recently uploaded

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfLivetecs LLC
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfStefano Stabellini
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 

Recently uploaded (20)

Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
How to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdfHow to Track Employee Performance A Comprehensive Guide.pdf
How to Track Employee Performance A Comprehensive Guide.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Xen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdfXen Safety Embedded OSS Summit April 2024 v4.pdf
Xen Safety Embedded OSS Summit April 2024 v4.pdf
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 

XSLT for Authors