Project

Profile

Help

Bug #3178

closed

Updates for Saxon sample resources

Added by Debbie Lockett about 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Low
Category:
Build and release
Sprint/Milestone:
-
Start date:
2017-03-21
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7, trunk
Fixed in Maintenance Release:
Platforms:

Description

Bug 3157 https://saxonica.plan.io/issues/3157?pn=1#change-8041 was raised by a user to point out files missing from the saxon-resources download. While working on this, a number of other issues with the sample resources have been uncovered. Rather than cluttering up that specific bug, this new one will be used to log the wider issues and changes.


Related issues

Related to Saxon - Bug #2848: The file saxon-resources9-7.zip missing C# samplesClosedO'Neil Delpratt2016-07-19

Actions
Actions #1

Updated by Debbie Lockett about 7 years ago

As noted in bug 3157:

A number of JAXPExamples tests use the "Books List sample", and this has a couple of issues. The DTD reference is missing from data/books.xml, which is required for the associated stylesheet styles/books.xsl to work correctly (it uses the fn:id() function). Adding this requires a change to data/books.xsd, and I also need to check that all the other tests which use this "Books List sample" work as required (S9APIExamples, cs/Examples, etc.)...

Actions #2

Updated by Debbie Lockett about 7 years ago

  • Status changed from New to In Progress

Recreated and added missing resources: add-ids.xsl, rename-to-lowercase.xsl, more-books.xml

Books List sample resources updates:

* add DTD reference to books.xml, and update books.xsd accordingly;

* update books.xsl to add (and use) another xsl:param for use by test JAXPExamples.exampleParam; correct the header title generation; use fn:avg(); remove unused decimal format "comma"

* books-csv.xsl corrections (to calculate stock value entries; and use correct categories data)

Various updates to the Java Samples, to get all the tests working correctly, improve comments and output stream statements, remove use of deprecated Saxon method (Configuration.buildDocument), remove junk, etc.

Particular test updates of note:

* prevent S9APIExamples QueryUpdateA test from really updating the (shared) resource books.xml

* fix S9APIExamples SerializeD

* sort out JAXPExamples.exampleDOMtoDOM, exampleParam, exampleTransformerReuse

* update the XPath as tested by XPathExampleSA

Changes committed on 9.7 and 9.8 branches.

Actions #3

Updated by Debbie Lockett about 7 years ago

Still to do:

  1. Sort out the .NET samples. It looks like we have not been adding the correct resources to the saxon-resources download (i.e. there is some problem in the build). The documentation http://saxonica.com/documentation/index.html#!samples/dotnetsamples refers to " three programs ExamplesHE.cs, ExamplesPE.cs, and ExamplesEE.cs" in the /samples/cs directory of the saxon-resources download. However, these have not been included in the 9.7 saxon-resources releases, instead it contains an old version Examples.cs (which is out of date - it refers to Saxon-SA and Saxon-B).

We need to ensure that the correct resources are in the download, and that they work properly.

  1. Documentation updates. The "Sample Saxon Applications" section of the documentation (http://saxonica.com/documentation/index.html#!samples) could generally be improved - to add further useful information and better correlate with the samples supplied in the download.
Actions #4

Updated by O'Neil Delpratt about 7 years ago

  • Related to Bug #2848: The file saxon-resources9-7.zip missing C# samples added
Actions #5

Updated by O'Neil Delpratt about 7 years ago

  • Related to deleted (Bug #2848: The file saxon-resources9-7.zip missing C# samples)
Actions #6

Updated by O'Neil Delpratt about 7 years ago

  • Related to Bug #2848: The file saxon-resources9-7.zip missing C# samples added
Actions #7

Updated by Debbie Lockett about 7 years ago

Various updates to the documentation relating to the samples. In particular the "Sample Saxon Applications" (http://saxonica.com/documentation/index.html#!samples). Including:

  • Rewritten first page to describe more of the sample resources provided in the saxon-resources download, e.g. mention more of the sample Java applications, and give documentation links

  • Expanded the "Books List Example" page to describe other related resources included in the samples.

  • Added a page for the S9APIExamples.java sample application.

Changes committed on 9.7 and 9.8 branches, and updated 9.7 documentation online (XML and HTML versions).

Actions #8

Updated by Debbie Lockett about 7 years ago

.NET samples updates. Tidied up ExamplesHE.cs, ExamplesPE.cs, ExamplesEE.cs, and SampleExtensions.cs:

  • Check and correct test descriptions (in comments)

  • Add mechanism to produce message for invalid supplied test name

  • Ensure tests use licensed processor as necessary (XsltShowingLineNumbers, XQueryToStream, etc.)

  • Add XPathSimple2 test to PE and EE, correct for HE

  • XsltUsingRegisteredCollection - remove unused XdmNode input

  • XQueryFromXmlReader - add output line to say "Output saved to testoutput2.xml"

  • PE & EE XQueryTryCatch - use XQuery version 3.0 not 1.1

  • EE XQueryUpdate - Change test so that books.xml is not really updated

  • EE Validate - reinstate books-invalid.xml in samples; add message; fix to use schema awareness; fix case for valid document

  • EE XPathSchemaAware - fix by adding XmlReaderSettings with DtdProcessing.Ignore

Committed changes under 9.8 branch (Saxon.Net directory) and added to 9.7 archive latest9.7/hen/csource/samples.

Actions #9

Updated by Debbie Lockett about 7 years ago

Build changes for cs samples (in build97 and build98):

  • Added build of XPathExample.exe to build-n (in compile-samples-n task).

  • Edited test-n to run up-to-date samples: ExamplesEE, ExamplesPE and ExamplesHE.

Actions #10

Updated by Debbie Lockett about 7 years ago

  • Status changed from In Progress to Resolved
  • Fix Committed on Branch 9.7, 9.8 added

Marking this bug as resolved now. A new saxon-resources.zip was released 2017-04-10.

Further work has been done to try to tidy up the build scripts for the Saxon resources; committed on the 9.7 and 9.8 branches.

The resources build remains fragile, but I'm not sure there's much more we can do. For instance, the samples-n target (which compiles and assembles the samples for .NET) must be run on the Windows machine; meanwhile, the builds of the javadoc and dotnetdoc (for the documentation supplied in the saxon-resources) do not work on the Windows machine. We can work around things like this, but it does mean the build remains a little messy.

Actions #11

Updated by O'Neil Delpratt almost 7 years ago

  • Fix Committed on Branch trunk added
  • Fix Committed on Branch deleted (9.8)
Actions #12

Updated by O'Neil Delpratt almost 7 years ago

  • Applies to branch deleted (9.8)
Actions #13

Updated by O'Neil Delpratt almost 7 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 9.7.0.19 added

Bug fix applied in the 9.7.0.19 maintenance release.

Please register to edit this issue

Also available in: Atom PDF