SlideShare a Scribd company logo
XSLT
Improvements
Oxygen Users Meetup, Prague, 2017
© 2017 Syncro Soft SRL. All rights reserved.
Octavian Nadolu, Syncro Soft
octavian_nadolu@oxygenxml.com
@OctavianNadolu
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
Overview
● XSLT 3.0 updates
● XPath/XQuery 3.1
● Checks for the XSLT code
● Saxon update
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
Updated the XSLT 3.0 Support
● Text Value Templates
● Initial Template
● Shadow Attributes
w3.org/TR/xslt-30
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
XSLT 3.0 Text Value Templates
● Oxygen offers built-in support for XSLT 3.0 Text Value
Templates
● Content completion to present the variables and
parameters
● Syntax highlighting
w3.org/TR/xslt-30/#text-value-templates
<xsl:function name="f:sum" expand-text="yes" as="xs:integer">
<xsl:param name="x" as="xs:integer"/>
<xsl:param name="y" as="xs:integer"/>
{$x + $y}
</xsl:function>
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
XSLT 3.0 Initial Template
● Support for xsl:initial-template
w3.org/TR/xslt-30/#invoking-initial-template
<xsl:template name="xsl:initial-template">
<xsl:value-of select="f:sum(4, 5)"/>
</xsl:template>
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
XSLT 3.0 Shadow Attributes
● Support for shadow attributes
● Content completion
● Documentation
w3.org/TR/xslt-30/#shadow-attributes
<xsl:param name="output-method" static="yes" select="'xml'"/>
<xsl:output _method="{$output-method}"/>
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
XPath/XQuery 3.1
● Validation
● Execution
● Syntax highlight
– Maps: w3.org/TR/xpath-31/#id-maps
– Arrays: w3.org/TR/xpath-31/#id-arrays
– Lookup operator (?): w3.org/TR/xpath-31/#id-lookup
– Simple Map operator (!):
w3.org/TR/xpath-31/#id-map-operator
map { 'first' : 'Jenna', 'last' : 'Scott' }?first
array { "licorice", "ginger" }(1)
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
XSLT Code Checks
● Code quality assurance
– [XSLTFramework]/sch/xsltCodeQA.sch
● Bad practice checks
– [XSLTFramework]/sch/xsltBadPractices.sch
● Documentation checks
– [XSLTFramework]/sch/xsltDocCheck.sch
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
XSLT Code Quality Assurance
● Check if an xsl:attribute contains variables or
parameters in the text part
● Fixes
– Insert 'xsl:value-of' element (for XSLT 1.0/2.0)
– Insert Text Value Template (for XSLT 3.0)
<xsl:attribute name="margin-right">$page-margin-inside</xsl:attribute>
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
XSLT Bad Practice Checks
● XPath expression from attributes references
elements with the same name as
variables/params defined in the context
● XPath expression from the text value template
references elements with the same name as
variables/params defined in the context
<xsl:param name="lang" select="'en'"/>
….
<xsl:variable name="persons" select="person/name[@language=lang]"/>
<xsl:variable name="persons" select="//person/name"/>
...
<xsl:message expand-text="true">{persons/given}</xsl:message>
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
XSLT Documentation Checks
● Report the undocumented template
– Add documentation for parameter(s)
– Add documentation for parameter(s) in the whole
document
● Report the parameters that are documented but
not present in the template
– Add missing parameter(s)
– Delete unbound documentation parameter(s)
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
Improved Refactoring Support
● Extract template - detects parameters more
accurately
● Extract function - allows you to use parts of an
XPath expression to create new functions
● Convert xsl:if into xsl:choose - converts one or
more xsl:if element blocks into one or more xsl:when
blocks
oxygenxml.com/doc/ug-editor/topics/xslt-refactoring-actions.html
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
Compile XSL Stylesheet
● Tool to Compile XSL Stylesheet Export Files as an
XML file called a stylesheet export file (sef)
oxygenxml.com/ug-editor/topics/compile-xsl-for-saxon.html
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
Debugger Editors are Dockable
● XSLT and XQuery Debugger editors and views are
now dockable
● You can rearrange the workspace according to your
preference
● Debugger layout option allows you to stack the editors
horizontal or vertical
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
Saxon Update
● We keep updating Saxon
– Saxon 9.7.0.19 in <oXygen/> 19.1
– Saxon 9.8.0.5 available as <oXygen/> add-on
– Saxon 9.8.0.8 update in progress <oXygen/> 20.0
www.saxonica.com
XSLT ImprovementsXSLT Improvements
Copyright @ Syncro Soft, 2018. All rights reserved.
<oXygen/> XML Editor
http://www.oxygenxml.com
octavian_nadolu@oxygenxml.com
@OctavianNadolu
THANK YOU!
Any questions?

More Related Content

PPTX
Xslt elements
PPTX
Java Tutorial Lab 7
PDF
AngularJS filters
PDF
Robust Real-Time Synchronization between Textual and Graphical Editors
PPTX
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriya
PPT
PPT
5 xsl (formatting xml documents)
PPT
Week 12 xml and xsl
Xslt elements
Java Tutorial Lab 7
AngularJS filters
Robust Real-Time Synchronization between Textual and Graphical Editors
Integrative Programming and Technology Chapter 4- Dr. J. VijiPriya
5 xsl (formatting xml documents)
Week 12 xml and xsl

Similar to XSLT 3.0 Improvements - XML Prague 2018 (20)

PPTX
PPT
Rendering XML Documents
PPTX
transforming xml using xsl and xslt
PDF
26xslt
PDF
Xsl xslt
PPT
Learning XSLT
PPTX
Overview of XSL, XPath and XSL-FO
PPTX
programming with xml for graduate students
PPT
Inroduction to XSLT with PHP4
PDF
Xpath tutorial
PDF
XSL- XSLT.pdf
PDF
Service Oriented Architecture - Unit II
PPTX
Xml part5
PPT
Xslt by asfak mahamud
PPTX
Xslt mule
PPTX
eXtensible Markup Language (XML)
PPT
PPTX
XPATH_XSLT-1.pptx
PDF
"Getting Started with XSLT" presentation slides
PPTX
Rendering XML Documents
transforming xml using xsl and xslt
26xslt
Xsl xslt
Learning XSLT
Overview of XSL, XPath and XSL-FO
programming with xml for graduate students
Inroduction to XSLT with PHP4
Xpath tutorial
XSL- XSLT.pdf
Service Oriented Architecture - Unit II
Xml part5
Xslt by asfak mahamud
Xslt mule
eXtensible Markup Language (XML)
XPATH_XSLT-1.pptx
"Getting Started with XSLT" presentation slides
Ad

More from Octavian Nadolu (20)

PDF
Verify Content With Artificial Intelligence
PDF
Artificial Intelligence for XMLDevelopment
PDF
Artificia Intellicence and XPath Extension Functions
PDF
YAML Editing and Validation In Oxygen
PDF
Oxygen JSON Editor
PDF
Leveraging the Power of AI and Schematron for Content Verification and Correc...
PDF
OpenAPI/AsyncAPI Support in Oxygen
PDF
Validating XML and JSON Documents Using Oxygen Scripting
PDF
OpenAPI Editing, Testing, and Documenting
PDF
JSON, JSON Schema, and OpenAPI
PDF
Create an Design JSON Schema
PDF
Compare And Merge Scripts
PDF
JSON Schema Design
PDF
Schematron For Non-XML Languages
PDF
JSON and JSON Schema in Oxygen
PDF
HTML5 Editing Validation
PDF
Documentation Quality Assurance with ISO Schematron
PDF
Introduction to Schematron
PDF
Hands on JSON
ODP
JSON Edit, Validate, Query, Transform, and Convert
Verify Content With Artificial Intelligence
Artificial Intelligence for XMLDevelopment
Artificia Intellicence and XPath Extension Functions
YAML Editing and Validation In Oxygen
Oxygen JSON Editor
Leveraging the Power of AI and Schematron for Content Verification and Correc...
OpenAPI/AsyncAPI Support in Oxygen
Validating XML and JSON Documents Using Oxygen Scripting
OpenAPI Editing, Testing, and Documenting
JSON, JSON Schema, and OpenAPI
Create an Design JSON Schema
Compare And Merge Scripts
JSON Schema Design
Schematron For Non-XML Languages
JSON and JSON Schema in Oxygen
HTML5 Editing Validation
Documentation Quality Assurance with ISO Schematron
Introduction to Schematron
Hands on JSON
JSON Edit, Validate, Query, Transform, and Convert
Ad

Recently uploaded (20)

PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
17 Powerful Integrations Your Next-Gen MLM Software Needs
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PPTX
Monitoring Stack: Grafana, Loki & Promtail
PPTX
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
iTop VPN Free 5.6.0.5262 Crack latest version 2025
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Oracle Fusion HCM Cloud Demo for Beginners
PDF
wealthsignaloriginal-com-DS-text-... (1).pdf
PPTX
Patient Appointment Booking in Odoo with online payment
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PPTX
assetexplorer- product-overview - presentation
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
17 Powerful Integrations Your Next-Gen MLM Software Needs
Operating system designcfffgfgggggggvggggggggg
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Monitoring Stack: Grafana, Loki & Promtail
AMADEUS TRAVEL AGENT SOFTWARE | AMADEUS TICKETING SYSTEM
Design an Analysis of Algorithms I-SECS-1021-03
CHAPTER 2 - PM Management and IT Context
iTop VPN Free 5.6.0.5262 Crack latest version 2025
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Navsoft: AI-Powered Business Solutions & Custom Software Development
Oracle Fusion HCM Cloud Demo for Beginners
wealthsignaloriginal-com-DS-text-... (1).pdf
Patient Appointment Booking in Odoo with online payment
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Advanced SystemCare Ultimate Crack + Portable (2025)
assetexplorer- product-overview - presentation
Download FL Studio Crack Latest version 2025 ?
Adobe Illustrator 28.6 Crack My Vision of Vector Design
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus

XSLT 3.0 Improvements - XML Prague 2018

  • 1. XSLT Improvements Oxygen Users Meetup, Prague, 2017 © 2017 Syncro Soft SRL. All rights reserved. Octavian Nadolu, Syncro Soft octavian_nadolu@oxygenxml.com @OctavianNadolu
  • 2. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. Overview ● XSLT 3.0 updates ● XPath/XQuery 3.1 ● Checks for the XSLT code ● Saxon update
  • 3. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. Updated the XSLT 3.0 Support ● Text Value Templates ● Initial Template ● Shadow Attributes w3.org/TR/xslt-30
  • 4. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. XSLT 3.0 Text Value Templates ● Oxygen offers built-in support for XSLT 3.0 Text Value Templates ● Content completion to present the variables and parameters ● Syntax highlighting w3.org/TR/xslt-30/#text-value-templates <xsl:function name="f:sum" expand-text="yes" as="xs:integer"> <xsl:param name="x" as="xs:integer"/> <xsl:param name="y" as="xs:integer"/> {$x + $y} </xsl:function>
  • 5. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. XSLT 3.0 Initial Template ● Support for xsl:initial-template w3.org/TR/xslt-30/#invoking-initial-template <xsl:template name="xsl:initial-template"> <xsl:value-of select="f:sum(4, 5)"/> </xsl:template>
  • 6. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. XSLT 3.0 Shadow Attributes ● Support for shadow attributes ● Content completion ● Documentation w3.org/TR/xslt-30/#shadow-attributes <xsl:param name="output-method" static="yes" select="'xml'"/> <xsl:output _method="{$output-method}"/>
  • 7. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. XPath/XQuery 3.1 ● Validation ● Execution ● Syntax highlight – Maps: w3.org/TR/xpath-31/#id-maps – Arrays: w3.org/TR/xpath-31/#id-arrays – Lookup operator (?): w3.org/TR/xpath-31/#id-lookup – Simple Map operator (!): w3.org/TR/xpath-31/#id-map-operator map { 'first' : 'Jenna', 'last' : 'Scott' }?first array { "licorice", "ginger" }(1)
  • 8. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. XSLT Code Checks ● Code quality assurance – [XSLTFramework]/sch/xsltCodeQA.sch ● Bad practice checks – [XSLTFramework]/sch/xsltBadPractices.sch ● Documentation checks – [XSLTFramework]/sch/xsltDocCheck.sch
  • 9. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. XSLT Code Quality Assurance ● Check if an xsl:attribute contains variables or parameters in the text part ● Fixes – Insert 'xsl:value-of' element (for XSLT 1.0/2.0) – Insert Text Value Template (for XSLT 3.0) <xsl:attribute name="margin-right">$page-margin-inside</xsl:attribute>
  • 10. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. XSLT Bad Practice Checks ● XPath expression from attributes references elements with the same name as variables/params defined in the context ● XPath expression from the text value template references elements with the same name as variables/params defined in the context <xsl:param name="lang" select="'en'"/> …. <xsl:variable name="persons" select="person/name[@language=lang]"/> <xsl:variable name="persons" select="//person/name"/> ... <xsl:message expand-text="true">{persons/given}</xsl:message>
  • 11. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. XSLT Documentation Checks ● Report the undocumented template – Add documentation for parameter(s) – Add documentation for parameter(s) in the whole document ● Report the parameters that are documented but not present in the template – Add missing parameter(s) – Delete unbound documentation parameter(s)
  • 12. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. Improved Refactoring Support ● Extract template - detects parameters more accurately ● Extract function - allows you to use parts of an XPath expression to create new functions ● Convert xsl:if into xsl:choose - converts one or more xsl:if element blocks into one or more xsl:when blocks oxygenxml.com/doc/ug-editor/topics/xslt-refactoring-actions.html
  • 13. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. Compile XSL Stylesheet ● Tool to Compile XSL Stylesheet Export Files as an XML file called a stylesheet export file (sef) oxygenxml.com/ug-editor/topics/compile-xsl-for-saxon.html
  • 14. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. Debugger Editors are Dockable ● XSLT and XQuery Debugger editors and views are now dockable ● You can rearrange the workspace according to your preference ● Debugger layout option allows you to stack the editors horizontal or vertical
  • 15. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. Saxon Update ● We keep updating Saxon – Saxon 9.7.0.19 in <oXygen/> 19.1 – Saxon 9.8.0.5 available as <oXygen/> add-on – Saxon 9.8.0.8 update in progress <oXygen/> 20.0 www.saxonica.com
  • 16. XSLT ImprovementsXSLT Improvements Copyright @ Syncro Soft, 2018. All rights reserved. <oXygen/> XML Editor http://www.oxygenxml.com octavian_nadolu@oxygenxml.com @OctavianNadolu THANK YOU! Any questions?