SlideShare a Scribd company logo
Schematron QuickFix
Nico Kutscherauer
contact@schematron-quickfix.com
@nkutsche
Octavian Nadolu
octavian_nadolu@oxygenxml.com
@OctavianNadolu
Schematron QuickFixSchematron QuickFix
Error Fixes
● Fixing errors has always been a challenge
● Solutions offered by IDEs
Schematron QuickFixSchematron QuickFix
Fix Proposals
● Using fix proposals to solve errors:
– Better understanding of the problem
– Fewer (no) mistakes
– Saves time (money)
Schematron QuickFixSchematron QuickFix
XML Validation Errors
● From the user's perspective the validation error
is composed by three things
LocationLocation
How toHow to
fix it ?fix it ?
MessageMessage
Schematron QuickFixSchematron QuickFix
Fixing XML Validation Errors
● Predefined Errors - defined in the validation
engine
– Fixes generated from the validation engine
– Fixes based on the message (error code) and location
● Custom Errors - defined by the user
– Difficult to generate fixes based on message and location
– A language to create fixes is more appropriate
How toHow to
fix it ?fix it ?
Schematron QuickFixSchematron QuickFix
Schematron Fix Proposals
● User-defined fixes for Schematron errors
● Schematron QuickFix (SQF) language
– Extends the Schematron language
– SQF initiated by Nico Kutscherauer
www.schematron-quickfix.com
github.com/schematron-quickfix/sqf
Schematron QuickFixSchematron QuickFix
Schematron Quick Fixes Spec
www.w3.org/community/quickfix
schematron-quickfix.github.io/sqf
Schematron QuickFixSchematron QuickFix
SQF Extension of the Schematron
● Associated with assert and report elements
● Added as Schematron annotations
<rule context="html">
<report test="//comment()" sqf:fix="removeComments">
Comments are not allowed in document.</report>
<sqf:fix id="removeComments" role="delete">
<sqf:description>
<sqf:title>Remove all comments</sqf:title>
<sqf:p>Remove all comment nodes from the current document</sqf:p>
</sqf:description>
<sqf:delete match="//comment()"/>
</sqf:fix>
</rule>
Schematron QuickFixSchematron QuickFix
Schematron QuickFix (SQF)
<sqf:fix id="resolveBold">
<sqf:description>
<sqf:title>Change the bold element into text</sqf:title>
<sqf:p>Removes the bold (b) markup and keeps the text content.</sqf:p>
</sqf:description>
<sqf:replace match="b" select="text()"/>
</sqf:fix>
Operation
ID
Description
Title
Schematron QuickFixSchematron QuickFix
SQF Benefits
● Create custom quick fixes for errors
Schematron QuickFixSchematron QuickFix
SQF Benefits
● Create custom quick fixes for errors
● Use the power of Schematron and XSLT
Schematron QuickFixSchematron QuickFix
SQF Benefits
● Create custom quick fixes for errors
● Use the power of Schematron and XSLT
● Create refactoring actions using SQF
Schematron QuickFixSchematron QuickFix
SQF Benefits
● Create custom quick fixes for errors
● Use the power of Schematron and XSLT
● Create refactoring actions using SQF
● Fix problems in external documents
Schematron QuickFixSchematron QuickFix
SQF Benefits
● Create custom quick fixes for errors
● Use the power of Schematron and XSLT
● Create refactoring actions using SQF
● Fix problems in external documents
● Fixes for any XML documents
Schematron QuickFixSchematron QuickFix
Language Overview
● Small language
● Keep it easy, but extensible
● No knowledge of XSLT is needed for simple cases
● Integration of well-known standards for more
complex things
Schematron QuickFixSchematron QuickFix
Language Overview
● Small language
● Keep it easy, but extensible
● No knowledge of XSLT is needed for simple cases
● Integration of well-known standards for more
complex things
● Own Namespace with prefix sqf:
http://www.schematron-quickfix.com/validator/process
Schematron QuickFixSchematron QuickFix
Language Structure
● Reference / structure
● User interface
● Activity Elements (operations)
Schematron QuickFixSchematron QuickFix
Language Structure
● Reference / structure
● User interface
● Activity Elements (operations)
● Generic features
Schematron QuickFixSchematron QuickFix
Learning By Examples
● Five examples are shown
● All to find on
https://github.com/octavianN/SQFPresentation/tree/master/Samples
● Additional Examples
http://www.schematron-quickfix.com/examples.html
● Tutorial
http://www.schematron-quickfix.com/quickFix/guide.html
Schematron QuickFixSchematron QuickFix
1. Simple Replace
● Replace or unwrap a node
<sch:rule context="b">
<sch:report test="ancestor::b"
sqf:fix="italic unwrap">
Bold in bold is not allowed.</sch:report>
<sqf:fix id="italic">
<sqf:description>
<sqf:title>Change it to italic.</sqf:title>
</sqf:description>
<sqf:replace match="." node-type="element" target="i" select="node()"/>
</sqf:fix>
<sqf:fix id="unwrap">
<sqf:description>
<sqf:title>Unwrap <sch:name/> element</sqf:title>
</sqf:description>
<sqf:replace select="node()"/>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
1. Simple Replace
● Replace or unwrap a node
<sch:rule context="b">
<sch:report test="ancestor::b"
sqf:fix="italic unwrap">
Bold in bold is not allowed.</sch:report>
<sqf:fix id="italic">
<sqf:description>
<sqf:title>Change it to italic.</sqf:title>
</sqf:description>
<sqf:replace match="." node-type="element" target="i" select="node()"/>
</sqf:fix>
<sqf:fix id="unwrap">
<sqf:description>
<sqf:title>Unwrap <sch:name/> element</sqf:title>
</sqf:description>
<sqf:replace select="node()"/>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
1. Simple Replace
● Replace or unwrap a node
<sch:rule context="b">
<sch:report test="ancestor::b"
sqf:fix="italic unwrap">
Bold in bold is not allowed.</sch:report>
<sqf:fix id="italic">
<sqf:description>
<sqf:title>Change it to italic.</sqf:title>
</sqf:description>
<sqf:replace match="." node-type="element" target="i" select="node()"/>
</sqf:fix>
<sqf:fix id="unwrap">
<sqf:description>
<sqf:title>Unwrap <sch:name/> element</sqf:title>
</sqf:description>
<sqf:replace select="node()"/>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
1. Simple Replace
● Replace or unwrap a node
<sch:rule context="b">
<sch:report test="ancestor::b"
sqf:fix="italic unwrap">
Bold in bold is not allowed.</sch:report>
<sqf:fix id="italic">
<sqf:description>
<sqf:title>Change it to italic.</sqf:title>
</sqf:description>
<sqf:replace match="." node-type="element" target="i" select="node()"/>
</sqf:fix>
<sqf:fix id="unwrap">
<sqf:description>
<sqf:title>Unwrap <sch:name/> element</sqf:title>
</sqf:description>
<sqf:replace select="node()"/>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
1. Simple Replace
● Replace or unwrap a node
<sch:rule context="b">
<sch:report test="ancestor::b"
sqf:fix="italic unwrap">
Bold in bold is not allowed.</sch:report>
<sqf:fix id="italic">
<sqf:description>
<sqf:title>Change it to italic.</sqf:title>
</sqf:description>
<sqf:replace match="." node-type="element" target="i" select="node()"/>
</sqf:fix>
<sqf:fix id="unwrap">
<sqf:description>
<sqf:title>Unwrap <sch:name/> element</sqf:title>
</sqf:description>
<sqf:replace select="node()"/>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
1. Simple Replace
● Replace or unwrap a node
<sch:rule context="b">
<sch:report test="ancestor::b"
sqf:fix="italic unwrap">
Bold in bold is not allowed.</sch:report>
<sqf:fix id="italic">
<sqf:description>
<sqf:title>Change it to italic.</sqf:title>
</sqf:description>
<sqf:replace match="." node-type="element" target="i" select="node()"/>
</sqf:fix>
<sqf:fix id="unwrap">
<sqf:description>
<sqf:title>Unwrap <sch:name/> element</sqf:title>
</sqf:description>
<sqf:replace select="node()"/>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
1. Simple Replace
● Replace or unwrap a node
<sch:rule context="b">
<sch:report test="ancestor::b"
sqf:fix="italic unwrap">
Bold in bold is not allowed.</sch:report>
<sqf:fix id="italic">
<sqf:description>
<sqf:title>Change it to italic.</sqf:title>
</sqf:description>
<sqf:replace match="." node-type="element" target="i" select="node()"/>
</sqf:fix>
<sqf:fix id="unwrap">
<sqf:description>
<sqf:title>Unwrap <sch:name/> element</sqf:title>
</sqf:description>
<sqf:replace select="node()"/>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
2. User Entries
● User Entry – parameter of the QuickFix
<sch:rule context="title">
<sch:assert test="normalize-space(.) != '' " sqf:fix="title"
>A title shouldn't be empty.</sch:assert>
<sqf:fix id="title">
<sqf:description>
<sqf:title>Set a title</sqf:title>
<sqf:p>This QuickFix will set a title by using a User Entry.</sqf:p>
</sqf:description>
<sqf:user-entry name="title" type="xs:string">
<sqf:description>
<sqf:title>Please enter the new title.</sqf:title>
</sqf:description>
</sqf:user-entry>
<sqf:replace target="{name()}" node-type="element"
select="$title" />
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
2. User Entries
● User Entry – parameter of the QuickFix
<sch:rule context="title">
<sch:assert test="normalize-space(.) != '' " sqf:fix="title"
>A title shouldn't be empty.</sch:assert>
<sqf:fix id="title">
<sqf:description>
<sqf:title>Set a title</sqf:title>
<sqf:p>This QuickFix will set a title by using a User Entry.</sqf:p>
</sqf:description>
<sqf:user-entry name="title" type="xs:string">
<sqf:description>
<sqf:title>Please enter the new title.</sqf:title>
</sqf:description>
</sqf:user-entry>
<sqf:replace target="{name()}" node-type="element"
select="$title" />
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
3. QuickFix Conditions
● Conditions – provide a QuickFix only if it makes
sense
<sch:rule context="head/title">
<sch:assert test="string-length(normalize-space(.)) le 20 "
sqf:fix="title">
A title shouldn't have more than 20 characters.</sch:assert>
<sqf:fix id="title" use-when="//h1[1][string-length(.) le 20]">
<sqf:description>
<sqf:title>
Set the title to "<sch:value-of select="//h1[1]"/>".
</sqf:title>
</sqf:description>
<sqf:replace target="title" node-type="element">
<sch:value-of select="//h1[1]"/>
</sqf:replace>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
3. QuickFix Conditions
● Conditions – provide a QuickFix only if it makes
sense
<sch:rule context="head/title">
<sch:assert test="string-length(normalize-space(.)) le 20 "
sqf:fix="title">
A title shouldn't have more than 20 characters.</sch:assert>
<sqf:fix id="title" use-when="//h1[1][string-length(.) le 20]">
<sqf:description>
<sqf:title>
Set the title to "<sch:value-of select="//h1[1]"/>".
</sqf:title>
</sqf:description>
<sqf:replace target="title" node-type="element">
<sch:value-of select="//h1[1]"/>
</sqf:replace>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
3. QuickFix Conditions
● Conditions – provide a QuickFix only if it makes
sense
<sch:rule context="head/title">
<sch:assert test="string-length(normalize-space(.)) le 20 "
sqf:fix="title">
A title shouldn't have more than 20 characters.</sch:assert>
<sqf:fix id="title" use-when="//h1[1][string-length(.) le 20]">
<sqf:description>
<sqf:title>
Set the title to "<sch:value-of select="//h1[1]"/>".
</sqf:title>
</sqf:description>
<sqf:replace target="title" node-type="element">
<sch:value-of select="//h1[1]"/>
</sqf:replace>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
4. Dynamic QuickFixes
● Dynamic QuickFixes – in the future
<sch:rule context="head/title">
<sch:assert test="string-length(normalize-space(.)) le 20 "
sqf:fix="title">
A title shouldn't have more than 20 characters.</sch:assert>
<sqf:fix id="title" use-for-each="//h1[string-length(.) le 20]">
<sqf:description>
<sqf:title>
Set the title to "<sch:value-of select="$sqf:current"/>".
</sqf:title>
</sqf:description>
<sqf:replace target="title" node-type="element">
<sch:value-of select="$sqf:current"/>
</sqf:replace>
</sqf:fix>
</sch:rule>
Schematron QuickFixSchematron QuickFix
5. Call QuickFixes
<sqf:fix id="title">
<sqf:call-fix ref="createElementRowAsFirstChild">
<sqf:with-param name="match" select="."/>
<sqf:with-param name="el" select=" 'col' "/>
<sqf:with-param name="count" select="count(max(.//tr/count(td|th)))"/>
</sqf:call-fix>
</sqf:fix>
<sqf:fix id="createElementRowAsFirstChild">
<sqf:param name="match" type="node()*"/>
<sqf:param name="el" type="xs:QName"/>
<sqf:param name="count" type="xs:integer"/>
<sqf:description>
<sqf:title>Create a row of <sch:value-of select="$count"/>
<sch:name path="$el"/> elements as a first child of the
<sch:name path="$match"/> element(s).</sqf:title>
</sqf:description>
<sqf:add match="$match" position="first-child">
<xsl:for-each select="1 to $count">
<xsl:element name="{$el}"/>
</xsl:for-each>
</sqf:add>
</sqf:fix>
Schematron QuickFixSchematron QuickFix
Call QuickFixes
● In the first draft:
● Just a prototype
● Not really functional
● Improvements of the second draft:
● Multiple sqf:call-fix in one sqf:fix
● Use the description of the called fix
→ Open discussion
Schematron QuickFixSchematron QuickFix
Review
● Structure / Reference
● sqf:fix, @id, @use-when, @sqf:fix, sqf:group, sqf:fixes
● Description
● sqf:description, sqf:title, sqf:p
● Activity
● sqf:delete, sqf:replace, sqf:add, sqf:keep, sqf:stringReplace
● Generic
● sqf:call-fix, sqf:with-param, sqf:param, sqf:user-entry,
@use-for-each
→ Only 15 Elements (XSLT 2: 49, Schematron: 21)
Schematron QuickFixSchematron QuickFix
SQF Implementations
● <oXygen/> XML Editor validation engine
http://www.oxygenxml.com
● Escali Schematron engine
http://schematron-quickfix.com/escali_xsm.html
– Escali Schematron command line tool
– Oxygen plugin for invoking Escali Schematron
Schematron QuickFixSchematron QuickFix
Projects using SQF
● Thieme - publishing company uses a custom
framework to create and edit XML documents
● parsX - a product developed by pagina GmbH
used to facilitate EPUB production
● ART-DECOR - an open source tool suite that
supports SDOs active in the healthcare industry
Sample SQF embedded in XSD
● ATX custom framework – used by a major
automotive producer
Schematron QuickFixSchematron QuickFix
Projects using SQF
● Dynamic Information Model (DIM) - an
implementation of an intelligent style guide
● Schematron for TEI - collection of Schematron
and SQF resources for TEI
● <oXygen/> DITA framework - built-in framework
in <oXygen/> XML Editor for DITA documents
● <oXygen/> XML userguide - the public version of
the <oXygen/> User Manual
Schematron QuickFixSchematron QuickFix
Conclusions and Future Plans
● SQF is a simple and useful language
● Helps users to solve the problems in less time
and with fewer (no) errors
● Update the SQF specification
● Publish the second draft of the Schematron
QuickFix specification
Schematron QuickFixSchematron QuickFix
Thank you!
Questions?
contact@schematron-quickfix.com
@nkutsche
octavian_nadolu@oxygenxml.com
@OctavianNadolu

More Related Content

What's hot

JChem Microservices
JChem MicroservicesJChem Microservices
JChem Microservices
ChemAxon
 
Sql plsql online training
Sql plsql online trainingSql plsql online training
Sql plsql online training
enrollmy training
 
Gatling overview
Gatling overviewGatling overview
Gatling overview
Viral Jain
 
Module Owb External Execution
Module Owb External ExecutionModule Owb External Execution
Module Owb External ExecutionNicholas Goodman
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
Sai Krishna
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara Anjargolian
Hakka Labs
 
Plsql commons
Plsql commons Plsql commons
Plsql commons
Arnold Reuser
 
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Javantura v4 - Java and lambdas and streams - are they better than for loops ...Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 
Load testing with gatling
Load testing with gatlingLoad testing with gatling
Load testing with gatlingChris Birchall
 
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
HUJAK - Hrvatska udruga Java korisnika / Croatian Java User Association
 

What's hot (10)

JChem Microservices
JChem MicroservicesJChem Microservices
JChem Microservices
 
Sql plsql online training
Sql plsql online trainingSql plsql online training
Sql plsql online training
 
Gatling overview
Gatling overviewGatling overview
Gatling overview
 
Module Owb External Execution
Module Owb External ExecutionModule Owb External Execution
Module Owb External Execution
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
 
Performant Django - Ara Anjargolian
Performant Django - Ara AnjargolianPerformant Django - Ara Anjargolian
Performant Django - Ara Anjargolian
 
Plsql commons
Plsql commons Plsql commons
Plsql commons
 
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Javantura v4 - Java and lambdas and streams - are they better than for loops ...Javantura v4 - Java and lambdas and streams - are they better than for loops ...
Javantura v4 - Java and lambdas and streams - are they better than for loops ...
 
Load testing with gatling
Load testing with gatlingLoad testing with gatling
Load testing with gatling
 
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
Javantura v4 - Java or Scala – Web development with Playframework 2.5.x - Kre...
 

Similar to Schematron QuickFix

XML Quick Fixes
XML Quick FixesXML Quick Fixes
XML Quick Fixes
Octavian Nadolu
 
Schematron 2016 and SQF Update
Schematron 2016 and SQF Update Schematron 2016 and SQF Update
Schematron 2016 and SQF Update
Octavian Nadolu
 
The Power Of Schematron Quick Fixes - XML Prague 2019
The Power Of Schematron Quick Fixes - XML Prague 2019The Power Of Schematron Quick Fixes - XML Prague 2019
The Power Of Schematron Quick Fixes - XML Prague 2019
Octavian Nadolu
 
Struts2-Spring=Hibernate
Struts2-Spring=HibernateStruts2-Spring=Hibernate
Struts2-Spring=Hibernate
Jay Shah
 
Varnish - PLNOG 4
Varnish - PLNOG 4Varnish - PLNOG 4
Varnish - PLNOG 4
Leszek Urbanski
 
Enforcing Business Rules - Automatic Fixes
Enforcing Business Rules - Automatic FixesEnforcing Business Rules - Automatic Fixes
Enforcing Business Rules - Automatic Fixes
Octavian Nadolu
 
Strut2-Spring-Hibernate
Strut2-Spring-HibernateStrut2-Spring-Hibernate
Strut2-Spring-HibernateJay Shah
 
Jboss World 2011 Infinispan
Jboss World 2011 InfinispanJboss World 2011 Infinispan
Jboss World 2011 Infinispancbo_
 
Tech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagyTech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagySkills Matter
 
Tuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on MobicentsTuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on Mobicents
Jean Deruelle
 
Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?
Robert MacLean
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
Yakov Fain
 
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Fwdays
 
REACT.JS : Rethinking UI Development Using JavaScript
REACT.JS : Rethinking UI Development Using JavaScriptREACT.JS : Rethinking UI Development Using JavaScript
REACT.JS : Rethinking UI Development Using JavaScript
Deepu S Nath
 
Sql Portfolio
Sql PortfolioSql Portfolio
Sql Portfolio
Shelli Ciaschini
 
Make your gui shine with ajax solr
Make your gui shine with ajax solrMake your gui shine with ajax solr
Make your gui shine with ajax solrlucenerevolution
 
Complex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxComplex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBox
bobmcwhirter
 
Angular 2 at solutions.hamburg
Angular 2 at solutions.hamburgAngular 2 at solutions.hamburg
Angular 2 at solutions.hamburg
Baqend
 
Fast federated SQL with Apache Calcite
Fast federated SQL with Apache CalciteFast federated SQL with Apache Calcite
Fast federated SQL with Apache Calcite
Chris Baynes
 
SamzaSQL QCon'16 presentation
SamzaSQL QCon'16 presentationSamzaSQL QCon'16 presentation
SamzaSQL QCon'16 presentation
Yi Pan
 

Similar to Schematron QuickFix (20)

XML Quick Fixes
XML Quick FixesXML Quick Fixes
XML Quick Fixes
 
Schematron 2016 and SQF Update
Schematron 2016 and SQF Update Schematron 2016 and SQF Update
Schematron 2016 and SQF Update
 
The Power Of Schematron Quick Fixes - XML Prague 2019
The Power Of Schematron Quick Fixes - XML Prague 2019The Power Of Schematron Quick Fixes - XML Prague 2019
The Power Of Schematron Quick Fixes - XML Prague 2019
 
Struts2-Spring=Hibernate
Struts2-Spring=HibernateStruts2-Spring=Hibernate
Struts2-Spring=Hibernate
 
Varnish - PLNOG 4
Varnish - PLNOG 4Varnish - PLNOG 4
Varnish - PLNOG 4
 
Enforcing Business Rules - Automatic Fixes
Enforcing Business Rules - Automatic FixesEnforcing Business Rules - Automatic Fixes
Enforcing Business Rules - Automatic Fixes
 
Strut2-Spring-Hibernate
Strut2-Spring-HibernateStrut2-Spring-Hibernate
Strut2-Spring-Hibernate
 
Jboss World 2011 Infinispan
Jboss World 2011 InfinispanJboss World 2011 Infinispan
Jboss World 2011 Infinispan
 
Tech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagyTech talk specflow_bddx_hassa_nagy
Tech talk specflow_bddx_hassa_nagy
 
Tuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on MobicentsTuning and development with SIP Servlets on Mobicents
Tuning and development with SIP Servlets on Mobicents
 
Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?Windows Server AppFabric Caching - What it is & when you should use it?
Windows Server AppFabric Caching - What it is & when you should use it?
 
Angular 2 for Java Developers
Angular 2 for Java DevelopersAngular 2 for Java Developers
Angular 2 for Java Developers
 
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
Alexander Mostovenko "'Devide at impera' with GraphQL and SSR"
 
REACT.JS : Rethinking UI Development Using JavaScript
REACT.JS : Rethinking UI Development Using JavaScriptREACT.JS : Rethinking UI Development Using JavaScript
REACT.JS : Rethinking UI Development Using JavaScript
 
Sql Portfolio
Sql PortfolioSql Portfolio
Sql Portfolio
 
Make your gui shine with ajax solr
Make your gui shine with ajax solrMake your gui shine with ajax solr
Make your gui shine with ajax solr
 
Complex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBoxComplex Made Simple: Sleep Better with TorqueBox
Complex Made Simple: Sleep Better with TorqueBox
 
Angular 2 at solutions.hamburg
Angular 2 at solutions.hamburgAngular 2 at solutions.hamburg
Angular 2 at solutions.hamburg
 
Fast federated SQL with Apache Calcite
Fast federated SQL with Apache CalciteFast federated SQL with Apache Calcite
Fast federated SQL with Apache Calcite
 
SamzaSQL QCon'16 presentation
SamzaSQL QCon'16 presentationSamzaSQL QCon'16 presentation
SamzaSQL QCon'16 presentation
 

More from Octavian Nadolu

Verify Content With Artificial Intelligence
Verify Content With Artificial IntelligenceVerify Content With Artificial Intelligence
Verify Content With Artificial Intelligence
Octavian Nadolu
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
YAML Editing and Validation In Oxygen
YAML Editing and Validation In OxygenYAML Editing and Validation In Oxygen
YAML Editing and Validation In Oxygen
Octavian Nadolu
 
Oxygen JSON Editor
Oxygen JSON EditorOxygen JSON Editor
Oxygen JSON Editor
Octavian Nadolu
 
Leveraging the Power of AI and Schematron for Content Verification and Correc...
Leveraging the Power of AI and Schematron for Content Verification and Correc...Leveraging the Power of AI and Schematron for Content Verification and Correc...
Leveraging the Power of AI and Schematron for Content Verification and Correc...
Octavian Nadolu
 
OpenAPI/AsyncAPI Support in Oxygen
OpenAPI/AsyncAPI Support in OxygenOpenAPI/AsyncAPI Support in Oxygen
OpenAPI/AsyncAPI Support in Oxygen
Octavian Nadolu
 
Validating XML and JSON Documents Using Oxygen Scripting
 Validating XML and JSON Documents Using Oxygen Scripting Validating XML and JSON Documents Using Oxygen Scripting
Validating XML and JSON Documents Using Oxygen Scripting
Octavian Nadolu
 
OpenAPI Editing, Testing, and Documenting
OpenAPI Editing, Testing, and DocumentingOpenAPI Editing, Testing, and Documenting
OpenAPI Editing, Testing, and Documenting
Octavian Nadolu
 
JSON, JSON Schema, and OpenAPI
JSON, JSON Schema, and OpenAPIJSON, JSON Schema, and OpenAPI
JSON, JSON Schema, and OpenAPI
Octavian Nadolu
 
Create an Design JSON Schema
Create an Design JSON SchemaCreate an Design JSON Schema
Create an Design JSON Schema
Octavian Nadolu
 
Compare And Merge Scripts
Compare And Merge ScriptsCompare And Merge Scripts
Compare And Merge Scripts
Octavian Nadolu
 
JSON Schema Design
JSON Schema DesignJSON Schema Design
JSON Schema Design
Octavian Nadolu
 
Schematron For Non-XML Languages
Schematron For Non-XML LanguagesSchematron For Non-XML Languages
Schematron For Non-XML Languages
Octavian Nadolu
 
JSON and JSON Schema in Oxygen
JSON and JSON Schema in OxygenJSON and JSON Schema in Oxygen
JSON and JSON Schema in Oxygen
Octavian Nadolu
 
HTML5 Editing Validation
HTML5 Editing ValidationHTML5 Editing Validation
HTML5 Editing Validation
Octavian Nadolu
 
Documentation Quality Assurance with ISO Schematron
Documentation Quality Assurance with ISO SchematronDocumentation Quality Assurance with ISO Schematron
Documentation Quality Assurance with ISO Schematron
Octavian Nadolu
 
Introduction to Schematron
Introduction to SchematronIntroduction to Schematron
Introduction to Schematron
Octavian Nadolu
 
Hands on JSON
Hands on JSONHands on JSON
Hands on JSON
Octavian Nadolu
 
JSON Edit, Validate, Query, Transform, and Convert
JSON Edit, Validate, Query, Transform, and ConvertJSON Edit, Validate, Query, Transform, and Convert
JSON Edit, Validate, Query, Transform, and Convert
Octavian Nadolu
 

More from Octavian Nadolu (20)

Verify Content With Artificial Intelligence
Verify Content With Artificial IntelligenceVerify Content With Artificial Intelligence
Verify Content With Artificial Intelligence
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
YAML Editing and Validation In Oxygen
YAML Editing and Validation In OxygenYAML Editing and Validation In Oxygen
YAML Editing and Validation In Oxygen
 
Oxygen JSON Editor
Oxygen JSON EditorOxygen JSON Editor
Oxygen JSON Editor
 
Leveraging the Power of AI and Schematron for Content Verification and Correc...
Leveraging the Power of AI and Schematron for Content Verification and Correc...Leveraging the Power of AI and Schematron for Content Verification and Correc...
Leveraging the Power of AI and Schematron for Content Verification and Correc...
 
OpenAPI/AsyncAPI Support in Oxygen
OpenAPI/AsyncAPI Support in OxygenOpenAPI/AsyncAPI Support in Oxygen
OpenAPI/AsyncAPI Support in Oxygen
 
Validating XML and JSON Documents Using Oxygen Scripting
 Validating XML and JSON Documents Using Oxygen Scripting Validating XML and JSON Documents Using Oxygen Scripting
Validating XML and JSON Documents Using Oxygen Scripting
 
OpenAPI Editing, Testing, and Documenting
OpenAPI Editing, Testing, and DocumentingOpenAPI Editing, Testing, and Documenting
OpenAPI Editing, Testing, and Documenting
 
JSON, JSON Schema, and OpenAPI
JSON, JSON Schema, and OpenAPIJSON, JSON Schema, and OpenAPI
JSON, JSON Schema, and OpenAPI
 
Create an Design JSON Schema
Create an Design JSON SchemaCreate an Design JSON Schema
Create an Design JSON Schema
 
Compare And Merge Scripts
Compare And Merge ScriptsCompare And Merge Scripts
Compare And Merge Scripts
 
JSON Schema Design
JSON Schema DesignJSON Schema Design
JSON Schema Design
 
Schematron For Non-XML Languages
Schematron For Non-XML LanguagesSchematron For Non-XML Languages
Schematron For Non-XML Languages
 
JSON and JSON Schema in Oxygen
JSON and JSON Schema in OxygenJSON and JSON Schema in Oxygen
JSON and JSON Schema in Oxygen
 
HTML5 Editing Validation
HTML5 Editing ValidationHTML5 Editing Validation
HTML5 Editing Validation
 
Documentation Quality Assurance with ISO Schematron
Documentation Quality Assurance with ISO SchematronDocumentation Quality Assurance with ISO Schematron
Documentation Quality Assurance with ISO Schematron
 
Introduction to Schematron
Introduction to SchematronIntroduction to Schematron
Introduction to Schematron
 
Hands on JSON
Hands on JSONHands on JSON
Hands on JSON
 
JSON Edit, Validate, Query, Transform, and Convert
JSON Edit, Validate, Query, Transform, and ConvertJSON Edit, Validate, Query, Transform, and Convert
JSON Edit, Validate, Query, Transform, and Convert
 

Recently uploaded

AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AwangAniqkmals
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
OWASP Beja
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
IP ServerOne
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
khadija278284
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
faizulhassanfaiz1670
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
eCommerce Institute
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
Faculty of Medicine And Health Sciences
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
gharris9
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
Vladimir Samoylov
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
Howard Spence
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Sebastiano Panichella
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
amekonnen
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
kkirkland2
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Access Innovations, Inc.
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Dutch Power
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
Sebastiano Panichella
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Matjaž Lipuš
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Dutch Power
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Sebastiano Panichella
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
OECD Directorate for Financial and Enterprise Affairs
 

Recently uploaded (20)

AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
AWANG ANIQKMALBIN AWANG TAJUDIN B22080004 ASSIGNMENT 2 MPU3193 PHILOSOPHY AND...
 
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
0x01 - Newton's Third Law:  Static vs. Dynamic Abusers0x01 - Newton's Third Law:  Static vs. Dynamic Abusers
0x01 - Newton's Third Law: Static vs. Dynamic Abusers
 
Acorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutesAcorn Recovery: Restore IT infra within minutes
Acorn Recovery: Restore IT infra within minutes
 
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdfBonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
Bonzo subscription_hjjjjjjjj5hhhhhhh_2024.pdf
 
Media as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern EraMedia as a Mind Controlling Strategy In Old and Modern Era
Media as a Mind Controlling Strategy In Old and Modern Era
 
María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024María Carolina Martínez - eCommerce Day Colombia 2024
María Carolina Martínez - eCommerce Day Colombia 2024
 
Obesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditionsObesity causes and management and associated medical conditions
Obesity causes and management and associated medical conditions
 
Gregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptxGregory Harris' Civics Presentation.pptx
Gregory Harris' Civics Presentation.pptx
 
Getting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control TowerGetting started with Amazon Bedrock Studio and Control Tower
Getting started with Amazon Bedrock Studio and Control Tower
 
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptxsomanykidsbutsofewfathers-140705000023-phpapp02.pptx
somanykidsbutsofewfathers-140705000023-phpapp02.pptx
 
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...Doctoral Symposium at the 17th IEEE International Conference on Software Test...
Doctoral Symposium at the 17th IEEE International Conference on Software Test...
 
Tom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issueTom tresser burning issue.pptx My Burning issue
Tom tresser burning issue.pptx My Burning issue
 
Burning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdfBurning Issue Presentation By Kenmaryon.pdf
Burning Issue Presentation By Kenmaryon.pdf
 
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdfSupercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
Supercharge your AI - SSP Industry Breakout Session 2024-v2_1.pdf
 
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
Presentatie 4. Jochen Cremer - TU Delft 28 mei 2024
 
International Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software TestingInternational Workshop on Artificial Intelligence in Software Testing
International Workshop on Artificial Intelligence in Software Testing
 
Bitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXOBitcoin Lightning wallet and tic-tac-toe game XOXO
Bitcoin Lightning wallet and tic-tac-toe game XOXO
 
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
Presentatie 8. Joost van der Linde & Daniel Anderton - Eliq 28 mei 2024
 
Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...Announcement of 18th IEEE International Conference on Software Testing, Verif...
Announcement of 18th IEEE International Conference on Software Testing, Verif...
 
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
Competition and Regulation in Professional Services – KLEINER – June 2024 OEC...
 

Schematron QuickFix

  • 2. Schematron QuickFixSchematron QuickFix Error Fixes ● Fixing errors has always been a challenge ● Solutions offered by IDEs
  • 3. Schematron QuickFixSchematron QuickFix Fix Proposals ● Using fix proposals to solve errors: – Better understanding of the problem – Fewer (no) mistakes – Saves time (money)
  • 4. Schematron QuickFixSchematron QuickFix XML Validation Errors ● From the user's perspective the validation error is composed by three things LocationLocation How toHow to fix it ?fix it ? MessageMessage
  • 5. Schematron QuickFixSchematron QuickFix Fixing XML Validation Errors ● Predefined Errors - defined in the validation engine – Fixes generated from the validation engine – Fixes based on the message (error code) and location ● Custom Errors - defined by the user – Difficult to generate fixes based on message and location – A language to create fixes is more appropriate How toHow to fix it ?fix it ?
  • 6. Schematron QuickFixSchematron QuickFix Schematron Fix Proposals ● User-defined fixes for Schematron errors ● Schematron QuickFix (SQF) language – Extends the Schematron language – SQF initiated by Nico Kutscherauer www.schematron-quickfix.com github.com/schematron-quickfix/sqf
  • 7. Schematron QuickFixSchematron QuickFix Schematron Quick Fixes Spec www.w3.org/community/quickfix schematron-quickfix.github.io/sqf
  • 8. Schematron QuickFixSchematron QuickFix SQF Extension of the Schematron ● Associated with assert and report elements ● Added as Schematron annotations <rule context="html"> <report test="//comment()" sqf:fix="removeComments"> Comments are not allowed in document.</report> <sqf:fix id="removeComments" role="delete"> <sqf:description> <sqf:title>Remove all comments</sqf:title> <sqf:p>Remove all comment nodes from the current document</sqf:p> </sqf:description> <sqf:delete match="//comment()"/> </sqf:fix> </rule>
  • 9. Schematron QuickFixSchematron QuickFix Schematron QuickFix (SQF) <sqf:fix id="resolveBold"> <sqf:description> <sqf:title>Change the bold element into text</sqf:title> <sqf:p>Removes the bold (b) markup and keeps the text content.</sqf:p> </sqf:description> <sqf:replace match="b" select="text()"/> </sqf:fix> Operation ID Description Title
  • 10. Schematron QuickFixSchematron QuickFix SQF Benefits ● Create custom quick fixes for errors
  • 11. Schematron QuickFixSchematron QuickFix SQF Benefits ● Create custom quick fixes for errors ● Use the power of Schematron and XSLT
  • 12. Schematron QuickFixSchematron QuickFix SQF Benefits ● Create custom quick fixes for errors ● Use the power of Schematron and XSLT ● Create refactoring actions using SQF
  • 13. Schematron QuickFixSchematron QuickFix SQF Benefits ● Create custom quick fixes for errors ● Use the power of Schematron and XSLT ● Create refactoring actions using SQF ● Fix problems in external documents
  • 14. Schematron QuickFixSchematron QuickFix SQF Benefits ● Create custom quick fixes for errors ● Use the power of Schematron and XSLT ● Create refactoring actions using SQF ● Fix problems in external documents ● Fixes for any XML documents
  • 15. Schematron QuickFixSchematron QuickFix Language Overview ● Small language ● Keep it easy, but extensible ● No knowledge of XSLT is needed for simple cases ● Integration of well-known standards for more complex things
  • 16. Schematron QuickFixSchematron QuickFix Language Overview ● Small language ● Keep it easy, but extensible ● No knowledge of XSLT is needed for simple cases ● Integration of well-known standards for more complex things ● Own Namespace with prefix sqf: http://www.schematron-quickfix.com/validator/process
  • 17. Schematron QuickFixSchematron QuickFix Language Structure ● Reference / structure ● User interface ● Activity Elements (operations)
  • 18. Schematron QuickFixSchematron QuickFix Language Structure ● Reference / structure ● User interface ● Activity Elements (operations) ● Generic features
  • 19. Schematron QuickFixSchematron QuickFix Learning By Examples ● Five examples are shown ● All to find on https://github.com/octavianN/SQFPresentation/tree/master/Samples ● Additional Examples http://www.schematron-quickfix.com/examples.html ● Tutorial http://www.schematron-quickfix.com/quickFix/guide.html
  • 20. Schematron QuickFixSchematron QuickFix 1. Simple Replace ● Replace or unwrap a node <sch:rule context="b"> <sch:report test="ancestor::b" sqf:fix="italic unwrap"> Bold in bold is not allowed.</sch:report> <sqf:fix id="italic"> <sqf:description> <sqf:title>Change it to italic.</sqf:title> </sqf:description> <sqf:replace match="." node-type="element" target="i" select="node()"/> </sqf:fix> <sqf:fix id="unwrap"> <sqf:description> <sqf:title>Unwrap <sch:name/> element</sqf:title> </sqf:description> <sqf:replace select="node()"/> </sqf:fix> </sch:rule>
  • 21. Schematron QuickFixSchematron QuickFix 1. Simple Replace ● Replace or unwrap a node <sch:rule context="b"> <sch:report test="ancestor::b" sqf:fix="italic unwrap"> Bold in bold is not allowed.</sch:report> <sqf:fix id="italic"> <sqf:description> <sqf:title>Change it to italic.</sqf:title> </sqf:description> <sqf:replace match="." node-type="element" target="i" select="node()"/> </sqf:fix> <sqf:fix id="unwrap"> <sqf:description> <sqf:title>Unwrap <sch:name/> element</sqf:title> </sqf:description> <sqf:replace select="node()"/> </sqf:fix> </sch:rule>
  • 22. Schematron QuickFixSchematron QuickFix 1. Simple Replace ● Replace or unwrap a node <sch:rule context="b"> <sch:report test="ancestor::b" sqf:fix="italic unwrap"> Bold in bold is not allowed.</sch:report> <sqf:fix id="italic"> <sqf:description> <sqf:title>Change it to italic.</sqf:title> </sqf:description> <sqf:replace match="." node-type="element" target="i" select="node()"/> </sqf:fix> <sqf:fix id="unwrap"> <sqf:description> <sqf:title>Unwrap <sch:name/> element</sqf:title> </sqf:description> <sqf:replace select="node()"/> </sqf:fix> </sch:rule>
  • 23. Schematron QuickFixSchematron QuickFix 1. Simple Replace ● Replace or unwrap a node <sch:rule context="b"> <sch:report test="ancestor::b" sqf:fix="italic unwrap"> Bold in bold is not allowed.</sch:report> <sqf:fix id="italic"> <sqf:description> <sqf:title>Change it to italic.</sqf:title> </sqf:description> <sqf:replace match="." node-type="element" target="i" select="node()"/> </sqf:fix> <sqf:fix id="unwrap"> <sqf:description> <sqf:title>Unwrap <sch:name/> element</sqf:title> </sqf:description> <sqf:replace select="node()"/> </sqf:fix> </sch:rule>
  • 24. Schematron QuickFixSchematron QuickFix 1. Simple Replace ● Replace or unwrap a node <sch:rule context="b"> <sch:report test="ancestor::b" sqf:fix="italic unwrap"> Bold in bold is not allowed.</sch:report> <sqf:fix id="italic"> <sqf:description> <sqf:title>Change it to italic.</sqf:title> </sqf:description> <sqf:replace match="." node-type="element" target="i" select="node()"/> </sqf:fix> <sqf:fix id="unwrap"> <sqf:description> <sqf:title>Unwrap <sch:name/> element</sqf:title> </sqf:description> <sqf:replace select="node()"/> </sqf:fix> </sch:rule>
  • 25. Schematron QuickFixSchematron QuickFix 1. Simple Replace ● Replace or unwrap a node <sch:rule context="b"> <sch:report test="ancestor::b" sqf:fix="italic unwrap"> Bold in bold is not allowed.</sch:report> <sqf:fix id="italic"> <sqf:description> <sqf:title>Change it to italic.</sqf:title> </sqf:description> <sqf:replace match="." node-type="element" target="i" select="node()"/> </sqf:fix> <sqf:fix id="unwrap"> <sqf:description> <sqf:title>Unwrap <sch:name/> element</sqf:title> </sqf:description> <sqf:replace select="node()"/> </sqf:fix> </sch:rule>
  • 26. Schematron QuickFixSchematron QuickFix 1. Simple Replace ● Replace or unwrap a node <sch:rule context="b"> <sch:report test="ancestor::b" sqf:fix="italic unwrap"> Bold in bold is not allowed.</sch:report> <sqf:fix id="italic"> <sqf:description> <sqf:title>Change it to italic.</sqf:title> </sqf:description> <sqf:replace match="." node-type="element" target="i" select="node()"/> </sqf:fix> <sqf:fix id="unwrap"> <sqf:description> <sqf:title>Unwrap <sch:name/> element</sqf:title> </sqf:description> <sqf:replace select="node()"/> </sqf:fix> </sch:rule>
  • 27. Schematron QuickFixSchematron QuickFix 2. User Entries ● User Entry – parameter of the QuickFix <sch:rule context="title"> <sch:assert test="normalize-space(.) != '' " sqf:fix="title" >A title shouldn't be empty.</sch:assert> <sqf:fix id="title"> <sqf:description> <sqf:title>Set a title</sqf:title> <sqf:p>This QuickFix will set a title by using a User Entry.</sqf:p> </sqf:description> <sqf:user-entry name="title" type="xs:string"> <sqf:description> <sqf:title>Please enter the new title.</sqf:title> </sqf:description> </sqf:user-entry> <sqf:replace target="{name()}" node-type="element" select="$title" /> </sqf:fix> </sch:rule>
  • 28. Schematron QuickFixSchematron QuickFix 2. User Entries ● User Entry – parameter of the QuickFix <sch:rule context="title"> <sch:assert test="normalize-space(.) != '' " sqf:fix="title" >A title shouldn't be empty.</sch:assert> <sqf:fix id="title"> <sqf:description> <sqf:title>Set a title</sqf:title> <sqf:p>This QuickFix will set a title by using a User Entry.</sqf:p> </sqf:description> <sqf:user-entry name="title" type="xs:string"> <sqf:description> <sqf:title>Please enter the new title.</sqf:title> </sqf:description> </sqf:user-entry> <sqf:replace target="{name()}" node-type="element" select="$title" /> </sqf:fix> </sch:rule>
  • 29. Schematron QuickFixSchematron QuickFix 3. QuickFix Conditions ● Conditions – provide a QuickFix only if it makes sense <sch:rule context="head/title"> <sch:assert test="string-length(normalize-space(.)) le 20 " sqf:fix="title"> A title shouldn't have more than 20 characters.</sch:assert> <sqf:fix id="title" use-when="//h1[1][string-length(.) le 20]"> <sqf:description> <sqf:title> Set the title to "<sch:value-of select="//h1[1]"/>". </sqf:title> </sqf:description> <sqf:replace target="title" node-type="element"> <sch:value-of select="//h1[1]"/> </sqf:replace> </sqf:fix> </sch:rule>
  • 30. Schematron QuickFixSchematron QuickFix 3. QuickFix Conditions ● Conditions – provide a QuickFix only if it makes sense <sch:rule context="head/title"> <sch:assert test="string-length(normalize-space(.)) le 20 " sqf:fix="title"> A title shouldn't have more than 20 characters.</sch:assert> <sqf:fix id="title" use-when="//h1[1][string-length(.) le 20]"> <sqf:description> <sqf:title> Set the title to "<sch:value-of select="//h1[1]"/>". </sqf:title> </sqf:description> <sqf:replace target="title" node-type="element"> <sch:value-of select="//h1[1]"/> </sqf:replace> </sqf:fix> </sch:rule>
  • 31. Schematron QuickFixSchematron QuickFix 3. QuickFix Conditions ● Conditions – provide a QuickFix only if it makes sense <sch:rule context="head/title"> <sch:assert test="string-length(normalize-space(.)) le 20 " sqf:fix="title"> A title shouldn't have more than 20 characters.</sch:assert> <sqf:fix id="title" use-when="//h1[1][string-length(.) le 20]"> <sqf:description> <sqf:title> Set the title to "<sch:value-of select="//h1[1]"/>". </sqf:title> </sqf:description> <sqf:replace target="title" node-type="element"> <sch:value-of select="//h1[1]"/> </sqf:replace> </sqf:fix> </sch:rule>
  • 32. Schematron QuickFixSchematron QuickFix 4. Dynamic QuickFixes ● Dynamic QuickFixes – in the future <sch:rule context="head/title"> <sch:assert test="string-length(normalize-space(.)) le 20 " sqf:fix="title"> A title shouldn't have more than 20 characters.</sch:assert> <sqf:fix id="title" use-for-each="//h1[string-length(.) le 20]"> <sqf:description> <sqf:title> Set the title to "<sch:value-of select="$sqf:current"/>". </sqf:title> </sqf:description> <sqf:replace target="title" node-type="element"> <sch:value-of select="$sqf:current"/> </sqf:replace> </sqf:fix> </sch:rule>
  • 33. Schematron QuickFixSchematron QuickFix 5. Call QuickFixes <sqf:fix id="title"> <sqf:call-fix ref="createElementRowAsFirstChild"> <sqf:with-param name="match" select="."/> <sqf:with-param name="el" select=" 'col' "/> <sqf:with-param name="count" select="count(max(.//tr/count(td|th)))"/> </sqf:call-fix> </sqf:fix> <sqf:fix id="createElementRowAsFirstChild"> <sqf:param name="match" type="node()*"/> <sqf:param name="el" type="xs:QName"/> <sqf:param name="count" type="xs:integer"/> <sqf:description> <sqf:title>Create a row of <sch:value-of select="$count"/> <sch:name path="$el"/> elements as a first child of the <sch:name path="$match"/> element(s).</sqf:title> </sqf:description> <sqf:add match="$match" position="first-child"> <xsl:for-each select="1 to $count"> <xsl:element name="{$el}"/> </xsl:for-each> </sqf:add> </sqf:fix>
  • 34. Schematron QuickFixSchematron QuickFix Call QuickFixes ● In the first draft: ● Just a prototype ● Not really functional ● Improvements of the second draft: ● Multiple sqf:call-fix in one sqf:fix ● Use the description of the called fix → Open discussion
  • 35. Schematron QuickFixSchematron QuickFix Review ● Structure / Reference ● sqf:fix, @id, @use-when, @sqf:fix, sqf:group, sqf:fixes ● Description ● sqf:description, sqf:title, sqf:p ● Activity ● sqf:delete, sqf:replace, sqf:add, sqf:keep, sqf:stringReplace ● Generic ● sqf:call-fix, sqf:with-param, sqf:param, sqf:user-entry, @use-for-each → Only 15 Elements (XSLT 2: 49, Schematron: 21)
  • 36. Schematron QuickFixSchematron QuickFix SQF Implementations ● <oXygen/> XML Editor validation engine http://www.oxygenxml.com ● Escali Schematron engine http://schematron-quickfix.com/escali_xsm.html – Escali Schematron command line tool – Oxygen plugin for invoking Escali Schematron
  • 37. Schematron QuickFixSchematron QuickFix Projects using SQF ● Thieme - publishing company uses a custom framework to create and edit XML documents ● parsX - a product developed by pagina GmbH used to facilitate EPUB production ● ART-DECOR - an open source tool suite that supports SDOs active in the healthcare industry Sample SQF embedded in XSD ● ATX custom framework – used by a major automotive producer
  • 38. Schematron QuickFixSchematron QuickFix Projects using SQF ● Dynamic Information Model (DIM) - an implementation of an intelligent style guide ● Schematron for TEI - collection of Schematron and SQF resources for TEI ● <oXygen/> DITA framework - built-in framework in <oXygen/> XML Editor for DITA documents ● <oXygen/> XML userguide - the public version of the <oXygen/> User Manual
  • 39. Schematron QuickFixSchematron QuickFix Conclusions and Future Plans ● SQF is a simple and useful language ● Helps users to solve the problems in less time and with fewer (no) errors ● Update the SQF specification ● Publish the second draft of the Schematron QuickFix specification
  • 40. Schematron QuickFixSchematron QuickFix Thank you! Questions? contact@schematron-quickfix.com @nkutsche octavian_nadolu@oxygenxml.com @OctavianNadolu