Skip to content

Commit

Permalink
WIP commit
Browse files Browse the repository at this point in the history
  • Loading branch information
xatapult committed Sep 20, 2022
1 parent fdb67b8 commit 4e6b01e
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ I come from a technical IT background. Xatapult is deliberately looking for cont

I do not just strive for the best solution from a business and technical perspective, but also for optimal understandability. Therefore, documentation is never an afterthought. I consider my ability to explain and clarify complex technical stuff, both live and in prose, as an important non-technical skill.

In my (recent) past I have given several successful courses on topics such as XML, XSLT, XML Schema and XProc. Most of these courses I developed myself.
In my (recent) past I have given several successful courses on topics such as XML, XSLT, XML Schema and XProc. Most of these courses I developed myself. On Declarative Amsterdam 2021 I did a [tutorial on XProc](https://da.xatapult.com/) (which is still available).

I'm the author of three books:

Expand Down
2 changes: 1 addition & 1 deletion exercises/da-2022-schematron-exercises.xpr
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?xml version="1.0" encoding="UTF-8"?><project xmlns:xtlcon="http://www.xtpxlib.nl/ns/container"><meta><filters directoryPatterns="" filePatterns="" positiveFilePatterns="" showHiddenFiles="false"/><options><serialized><serializableOrderedMap><entry><String>validation.scenario.associations</String><scenarioAssociation-array><scenarioAssociation><field name="url"><String>exercise-02-01/input-1.xml</String></field><field name="scenarioIds"><list><String>exercise-02-01 - validate</String></list></field><field name="scenarioTypes"><list><String>Validation_scenario</String></list></field><field name="scenarioStorageLocations"><list><Byte>2</Byte></list></field></scenarioAssociation></scenarioAssociation-array></entry><entry><String>validation.scenarios</String><validationScenario-array><validationScenario><field name="pairs"><list><validationUnit><field name="validationType"><validationUnitType><field name="validationInputType"><String>text/xml</String></field></validationUnitType></field><field name="url"><String>${pdu}/exercise-02-01/input-1.xml</String></field><field name="validationEngine"><validationEngine><field name="engineType"><String>&lt;Default engine&gt;</String></field><field name="allowsAutomaticValidation"><Boolean>true</Boolean></field></validationEngine></field><field name="allowAutomaticValidation"><Boolean>true</Boolean></field><field name="extensions"><null/></field><field name="validationSchema"><validationUnitSchema><field name="dtdSchemaPublicID"><null/></field><field name="schematronPhase"><null/></field><field name="type"><Integer>7</Integer></field><field name="uri"><String>${pdu}/exercise-02-01/inventory-schema.xsd</String></field></validationUnitSchema></field><field name="validationAdvancedSettings"><null/></field></validationUnit></list></field><field name="type"><String>Validation_scenario</String></field><field name="name"><String>exercise-02-01 - validate</String></field></validationScenario></validationScenario-array></entry><entry><String>scenario.associations</String><scenarioAssociation-array/></entry><entry><String>scenarios</String><scenario-array/></entry></serializableOrderedMap></serialized></options></meta><projectTree name="newProject.xpr"><folder path="exercise-02-01"/><file name="syllabus.pdf"/></projectTree></project>
<?xml version="1.0" encoding="UTF-8"?><project xmlns:xtlcon="http://www.xtpxlib.nl/ns/container"><meta><filters directoryPatterns="" filePatterns="" positiveFilePatterns="" showHiddenFiles="false"/><options><serialized><serializableOrderedMap><entry><String>validation.scenario.associations</String><scenarioAssociation-array><scenarioAssociation><field name="url"><String>exercise-01-01/input.xml</String></field><field name="scenarioIds"><list><String>exercise-01-01 - validate</String></list></field><field name="scenarioTypes"><list><String>Validation_scenario</String></list></field><field name="scenarioStorageLocations"><list><Byte>2</Byte></list></field></scenarioAssociation></scenarioAssociation-array></entry><entry><String>validation.scenarios</String><validationScenario-array><validationScenario><field name="pairs"><list><validationUnit><field name="validationType"><validationUnitType><field name="validationInputType"><String>text/xml</String></field></validationUnitType></field><field name="url"><String>${pdu}/exercise-01-01/input.xml</String></field><field name="validationEngine"><validationEngine><field name="engineType"><String>&lt;Default engine&gt;</String></field><field name="allowsAutomaticValidation"><Boolean>true</Boolean></field></validationEngine></field><field name="allowAutomaticValidation"><Boolean>true</Boolean></field><field name="extensions"><null/></field><field name="validationSchema"><validationUnitSchema><field name="dtdSchemaPublicID"><null/></field><field name="schematronPhase"><null/></field><field name="type"><Integer>7</Integer></field><field name="uri"><String>${pdu}/exercise-01-01/schema.sch</String></field></validationUnitSchema></field><field name="validationAdvancedSettings"><null/></field></validationUnit></list></field><field name="type"><String>Validation_scenario</String></field><field name="name"><String>exercise-01-01 - validate</String></field></validationScenario></validationScenario-array></entry><entry><String>scenario.associations</String><scenarioAssociation-array/></entry><entry><String>scenarios</String><scenario-array/></entry></serializableOrderedMap></serialized></options></meta><projectTree name="newProject.xpr"><folder path="exercise-01-01"/><file name="syllabus.pdf"/></projectTree></project>
File renamed without changes.
Binary file not shown.
File renamed without changes.
Binary file modified exercises/syllabus.pdf
Binary file not shown.
Binary file added presentation/Schematron Tutorial DA 2022.pptx
Binary file not shown.
43 changes: 20 additions & 23 deletions src/da-2022-schematron.xcourse.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,25 +30,21 @@

</theory>

</section>

<!-- ======================================================================= -->

<section>
<title>Pre-flight check</title>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<exercises>

<exercise id="ex01">
<title>Pre-flight check</title>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<instructions xml:space="preserve">
We're going to validate the input document @input-1@:

[[[input-1]]]

The rule is that all codes must start with the value of `/*/@depcode`, `IMP`. The third and last article in the list
The rule is that all codes must start with the value of `/*/@depcode`. The third (and last) article in the list
breaks this rule.

A Schematron schema for checking this is in @schema-1@:
Expand All @@ -57,10 +53,10 @@

Please validate @input-1@ with @schema-1@ and check the validation message.
</instructions>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<input-document id="input-1">
<input-document id="input-1" name="input">
<inventory-list depcode="IMP" xmlns="">
<article code="IMP0001">
<name>Bolts</name>
Expand All @@ -76,10 +72,10 @@
</article>
</inventory-list>
</input-document>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<input-document id="schema-1" name="inventory-schema" extension="xsd">
<input-document id="schema-1" name="schema" extension="sch">
<schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt3">
<pattern>
<rule context="article">
Expand All @@ -88,19 +84,20 @@
</pattern>
</schema>
</input-document>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->

<oxygen-scenarios>
<validate type="schematron" source-idref="input-1" schema-idref="schema-1"/>
</oxygen-scenarios>

</exercise>

<!-- ======================================================================= -->


</exercises>

</section>

<!-- ======================================================================= -->



</xcourse>

0 comments on commit 4e6b01e

Please sign in to comment.