Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Schematron QuickFix on XMLPrague


Published on

Slides of the QuickFix presentation on the oXygen User Meetup at the pre-conference day at the XMLPrague 2015. See the main part of the presentation slides here

Published in: Software
  • Be the first to comment

  • Be the first to like this

Schematron QuickFix on XMLPrague

  1. 1. Nico Schematron QuickFix on XML Prague Friday, 06 February 2015
  2. 2. Nico My way to SQF • sch:diagnostic in the Schematron ISO standard: A natural-language message giving more specific details concerning a failed assertion, such as found versus expected values and repair hints. • Basic structure provided in Schematron to repair the XML – Just in human-readable language – No structure for alternatives
  3. 3. Nico Idea of Schematron QuickFix • Structure for repair instructions in Schematron (“QuickFix”) – A human-readable and technical instruction – More than one QuickFix for each Schematron error – The user is able to choose: • Which QuickFix is the right fix • For each Schematron error • Requirements – Extension Language for Schematron – Extension of the Schematron workflow – A new Schematron implementation – A GUI / an editor
  4. 4. Nico The language SQF: • Schematron was extended by an extension language • Example: <rule context="title"> <report test="comment()" sqf:fix="deleteComment resolveComment" >Comments are forbidden in &lt;title&gt; elements.</report> <sqf:fix id="deleteComment"> <sqf:description> <sqf:title>Delete the comment.</sqf:title> </sqf:description> <sqf:delete match="comment()"/> </sqf:fix> ... </rule>
  5. 5. Nico The QuickFix • The QuickFix contains – ID, description (title and optional paragraphs) – One or more activity elements • 4 kinds of activity elements – Delete one or more node  sqf:delete – Replace a node by another  sqf:replace – Add a node  sqf:add – Replace substrings of text nodes  sqf:stringReplace • Optional: – use-when construction – One or more User Entry  parameters for the QuickFix • The value will be set by the user • At the moment, he choose the QuickFix
  6. 6. Nico How does it work? 1. Regular Schematron validation 2. New compiler Escali 3. Transforms the sqf:fix elements into xsl:templates 4. User chooses the QuickFix 5. Resolver extracts the xsl:templates from the SVRL to build the Manipulator 6. Manipulator repairs the XML document
  7. 7. Nico SQF project: • Internet • Home: • W3C community group: • On twitter: • Documentation • Definition of the SQF grammar using XSD • References of all extensions (including additional Schematron extensions) • User guide • Software • Escali: • Schematron implementation • Support for SQF • Additional Schematron extension • An implementation based on XProc • Comming soon: Escali plugin for <oXygen/>