Skip to content

Commit

Permalink
Smaller updates
Browse files Browse the repository at this point in the history
  • Loading branch information
wendellpiez committed Jul 15, 2024
1 parent 9a4279b commit 87a6c53
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 21 deletions.
2 changes: 1 addition & 1 deletion testing/xproc3-house-rules.sch
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<sch:rule context="/*">
<sch:assert role="warning" test="base-uri(.) = $listed-uris">file <sch:value-of select="$filename"/> isn't listed in validation set maintained in FILESET_XPROC3_HOUSE-RULES.xpl - should it be?</sch:assert>

<sch:let name="unexpected-prefixes" value="in-scope-prefixes(.)[not(.=('','p','c','ox','xml','xsl','x','xs'))]"/>
<sch:let name="unexpected-prefixes" value="in-scope-prefixes(.)[not(.=('','p','c','ox','xml','xsl','x','xs','html'))]"/>
<sch:report test="$unexpected-prefixes => exists()">We want to see only 'p', 'c' and 'ox', 'xsl' and 'x' namespace prefixes assigned at the top of an XProc (so far, for this repository): this file has <sch:value-of select="$unexpected-prefixes => string-join(', ')"/></sch:report>
<sch:assert sqf:fix="sqf-make-version-3" test="@version = '3.0'">Expecting XProc 3.0, not <sch:value-of select="@version"/></sch:assert>
</sch:rule>
Expand Down
22 changes: 14 additions & 8 deletions tutorial/sequence/Lesson01/setup_101.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,19 @@ Run an XProc 3.0 pipeline in an XProc 3.0 engine.

With a little practice, become comfortable running XProc pipelines, seeing results on a console (command-line) window as well as in the file system.

Since pipelines can be used to download resources, setup after the first script can use XProc, so you can't finish the setup without practicing XProc as well.
Since pipelines can be used to download resources, setup after the first script use XProc. Finishing the setup gets you started practicing with the XProc.

## Prerequisites

You have Java installed with a JVM (Java Virtual Machine) available on the command line, version 8.0 and 11 (and later).

tip: check your Java version from the console using `java --version`.
You have a live Internet connection and the capability to download and save resources (binaries and code libraries) for local use.

**Tip:** check your Java version from the console using `java --version`.

You are comfortable entering commands on the command line. For installation, you want a `bash` shell if available. On Windows, both WSL (Ubuntu) and Git Bash have been found to work. If you cannot use `bash`, the setup can be done by hand (downloading and unpacking a package from SourceForge).

After installation, subsequent work on Windows does not require `bash` unless you choose to use it ??? a Windows `CMD` or Powershell can serve as your environment and the processor invoked with a Windows `bat` file (as described).
After installation, subsequent work on Windows does not require `bash` unless you choose to use it ??? a Windows `CMD` or Powershell can serve as your environment and the processor invoked with a Windows `bat` file (as described in the documentation).

## Resources

Expand All @@ -35,7 +37,7 @@ The following pipelines will be run. They are described in top-level [README](..
* [smoketest/SMOKETEST-XSPEC.xpl](../../../smoketest/SMOKETEST-XSPEC.xpl)


## Step One - setup
## Step One: Setup

Find setup instructions for the repository in the [Project README](../../README.md) and in the linked [Setup Notes](../../setup-notes.md).

Expand All @@ -48,23 +50,27 @@ As noted in the docs, if you happen already to have [Morgana XProc III](https://

When you can run all the smoke tests without ugly tracebacks, this lesson is complete.

## Step Two - confirm
## Step Two: Confirm

The top-level README and setup notes also describe testing your installation. Do this next.

You know things are working in your XProc when either or both of two things are happening:

* On the console, notifications show up with reassuring messages announcing progress
* When you expect files to be produced, they appear (or are updated) as expected


Both of those will occur with this lesson. The files produced by download scripts are written into the project `lib` directory, as documented. Refresh or restore by deleting the downloaded files and running the pipelines to acquire them again.
Both of those will occur with this lesson. The files produced by downloading scripts are written into the project `lib` directory, as documented. Refresh or restore by deleting the downloaded files and running the pipelines to acquire them again.

Note: you need a live Internet connection for your http requests to go through.

## Comments / review

Within the project as a whole, everything is done with XProc 3.0, meaning everything can be done using a single script, which invokes an XProc processor to read and execute a pipeline.

Among other effects, this makes an XProc-based system largely or entirely platform-independent and portable.
Among other benefits, this makes an XProc-based system largely or entirely platform-independent and portable.

`xp3.sh` and `xp3.bat` are examples of such scripts written for this project. Either of them enables a user to run, without further configuration, the [Morgana XProcIIIse]() processor on any XProc 3.0 pipeline, assuming the appropriate platform for each (`bash` in the case of the shell script, Windows batch command syntax for the `bat` file). Other platforms supporting Java (and hence Morgana with its libraries) could be provided with similar scripts. (PR opportunity!)
`xp3.sh` and `xp3.bat` are examples of such scripts written for this project. Either of them enables a user to run, without further configuration, the [Morgana XProcIIIse]() processor on any XProc 3.0 pipeline, assuming the appropriate platform for each (`bash` in the case of the shell script, Windows batch command syntax for the `bat` file). Other platforms supporting Java (and hence Morgana with its libraries) could be provided with similar scripts. (Pull request opportunity.)

XProc 3.0 is both scalable and flexible enough to open a wide range of possibilities for data processing, both XML-based and using other formats such as JSON and plain text. The scripts in the repo show only one way of running XProc. Keep in mind that even simple scripts can be used in more than one way.

Expand Down
28 changes: 16 additions & 12 deletions tutorial/source/setup/setup_101_src.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,23 @@ <h2>Goals</h2>
<p>Run an XProc 3.0 pipeline in an XProc 3.0 engine.</p>
<p>With a little practice, become comfortable running XProc pipelines, seeing results on a console
(command-line) window as well as in the file system.</p>
<p>Since pipelines can be used to download resources, setup after the first script can use XProc, so you can't
finish the setup without practicing XProc as well.</p>
<p>Since pipelines can be used to download resources, setup after the first script use XProc. Finishing the
setup gets you started practicing with the XProc.</p>
</section>
<section>
<h2>Prerequisites</h2>
<p>You have Java installed with a JVM (Java Virtual Machine) available on the command line, version 8.0 and 11
(and later).</p>
<p>tip: check your Java version from the console using <code>java --version</code>.</p>
<p>You have a live Internet connection and the capability to download and save resources (binaries and code
libraries) for local use.</p>
<p><b>Tip:</b> check your Java version from the console using <code>java --version</code>.</p>
<p>You are comfortable entering commands on the command line. For installation, you want a <code>bash</code>
shell if available. On Windows, both WSL (Ubuntu) and Git Bash have been found to work. If you cannot use
<code>bash</code>, the setup can be done by hand (downloading and unpacking a package from
SourceForge).</p>
<p>After installation, subsequent work on Windows does not require <code>bash</code> unless you choose to use
it – a Windows <code>CMD</code> or Powershell can serve as your environment and the processor invoked with a
Windows <code>bat</code> file (as described).</p>
Windows <code>bat</code> file (as described in the documentation).</p>
</section>
<section>
<h2>Resources</h2>
Expand All @@ -42,7 +44,7 @@ <h2>Resources</h2>
</ul>
</section>
<section>
<h2>Step One - setup</h2>
<h2>Step One: Setup</h2>
<p>Find setup instructions for the repository in the <a href="../../README.md">Project README</a> and in the linked <a href="../../setup-notes.md">Setup Notes</a>.</p>
<p>After reading and reviewing these documents, perform the setup as instructed. To do this you can either
fork or clone the repository in Github or simply download and decompress a zip of the <a
Expand All @@ -58,28 +60,30 @@ <h2>Step One - setup</h2>
<p>When you can run all the smoke tests without ugly tracebacks, this lesson is complete.</p>
</section>
<section>
<h2>Step Two - confirm</h2>
<h2>Step Two: Confirm</h2>
<p>The top-level README and setup notes also describe testing your installation. Do this next.</p>
<p>You know things are working in your XProc when either or both of two things are happening:</p>
<ul>
<li>On the console, notifications show up with reassuring messages announcing progress</li>
<li>When you expect files to be produced, they appear (or are updated) as expected</li>
</ul>
</section>
<p>Both of those will occur with this lesson. The files produced by download scripts are written into the project
<code>lib</code> directory, as documented. Refresh or restore by deleting the downloaded files and running
the pipelines to acquire them again.</p>
<p>Both of those will occur with this lesson. The files produced by downloading scripts are written into the
project <code>lib</code> directory, as documented. Refresh or restore by deleting the downloaded files and
running the pipelines to acquire them again.</p>
<p>Note: you need a live Internet connection for your http requests to go through.</p>
<section>
<h2>Comments / review</h2>
<p>Within the project as a whole, everything is done with XProc 3.0, meaning everything can be done using a
single script, which invokes an XProc processor to read and execute a pipeline.</p>
<p>Among other effects, this makes an XProc-based system largely or entirely platform-independent and
<p>Among other benefits, this makes an XProc-based system largely or entirely platform-independent and
portable.</p>
<p><code>xp3.sh</code> and <code>xp3.bat</code> are examples of such scripts written for this project. Either
of them enables a user to run, without further configuration, the <a href="">Morgana XProcIIIse</a>
processor on any XProc 3.0 pipeline, assuming the appropriate platform for each (<code>bash</code> in the
case of the shell script, Windows batch command syntax for the <code>bat</code> file). Other platforms
supporting Java (and hence Morgana with its libraries) could be provided with similar scripts. (PR
opportunity!)</p>
supporting Java (and hence Morgana with its libraries) could be provided with similar scripts. (Pull request
opportunity.)</p>
<p>XProc 3.0 is both scalable and flexible enough to open a wide range of possibilities for data processing,
both XML-based and using other formats such as JSON and plain text. The scripts in the repo show only one
way of running XProc. Keep in mind that even simple scripts can be used in more than one way. </p>
Expand Down

0 comments on commit 87a6c53

Please sign in to comment.