ntra00 / marc2bibframe

Convert marc to BIBFRAME 1.0 - see lcnetdev/marc2bibframe2 for current release
http://www.loc.gov/bibframe/
Other
64 stars 20 forks source link

Trouble with saxon converter #251

Closed kiegel closed 8 years ago

kiegel commented 8 years ago

I do not get output using either saxon.xqy or saxon3.xqy in Oxygen (ver. 17.0).

The output file is:

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:bf="http://bibframe.org/vocab/" xmlns:bf2="http://bibframe.org/vocab2/" xmlns:madsrdf="http://www.loc.gov/mads/rdf/v1#" xmlns:relators="http://id.loc.gov/vocabulary/relators/"/>

With saxon.xqy I get warnings, although not with saxon3.xqy.

Engine name: Saxon-PE XQuery 9.6.0.5 Severity: warning Description: in {...ult """http://example.org/"...}: Unknown Saxon option declaration: saxon:default

Engine name: Saxon-PE XQuery 9.6.0.5 Severity: warning Description: in {...ion saxon:default """false"...}: Unknown Saxon option declaration: saxon:default

Engine name: Saxon-PE XQuery 9.6.0.5 Severity: warning Description: in {...tion saxon:default """NONE"...}: Unknown Saxon option declaration: saxon:default

Engine name: Saxon-PE XQuery 9.6.0.5 Severity: warning Description: in {...on saxon:default """rdfxml"...}: Unknown Saxon option declaration: saxon:default

The input file is a record I have converted in the past, so the problem does not lie there.

kirkhess commented 8 years ago

First, try using Saxon 9.5 instead of 9.6. Both work with that version according to my unit test.

I see the issue with Saxon.xqy using 9.6; but Saxon3.xqy works with w/ 9.6 for me from the command line specifying the marcxmluri parameter. (I didn't try Oxygen). Let us know if this works - thanks!

kiegel commented 8 years ago

I tried 9.5 in earlier versions of Oxygen but got the same output, just the rdf:RDF statement.

Oxygen Version 16.1, with Saxon XQuery 9.5.1.7 Version 16.0, with 9.5.1.5 Version 15.2, with 9.5.1.3 Version 15.0, with 9.5.0.2

They all run without the error warning but produce the same output with the latest version of saxon.xqy. I used these early versions of Oxygen and got good output from earlier versions of saxon.xqy.

I tried Oxygen 16.1 with saxon3.xqy but got an error message: XQuery 3.0 was not enabled when invoking Saxon. I did not try saxon3.xqy with earlier versions of Oxygen.

Oxygen 17.0 only offers Saxon XQuery 9.6.0.5. I tried all three versions (HE, PE, EE) with the same result. It is not possible to revert to Saxon 9.5 within Oxygen 17.0.

Clearly something is going on in Oxygen that is not happening with the command line. Please give Oxygen a try. It's a major development platform and much easier for some of us (non-programmers) to use than the command line.

kirkhess commented 8 years ago

In Oxygen apparently you have to enable XQuery 3.0 support - so in the edit scenario screen, there's a gear next to the Saxon you've selected, click on the gear and in next screen check 'enable XQuery 1.1 support'.

I think what's happening with XQuery 1.0 w/Saxon 9.6, Saxonica has removed support for default options (and I don't think this was on purpose, 9.6 is not considered stable). So again in the edit scenario screen, if you click parameters and put in values for all four options (baseuri="http://example.org", usebnodes="false", serialization="rdfxml" and marcxmluri="{path to your xml}" it also should work.

I hope this helps!

kiegel commented 8 years ago

Success.

The problem was the marcxmluri parameter. When I put the path name for the input file there, it worked. Apparently, the input path is not picked up from the XML URL box on the first screen of the scenario definition.

Thanks very much for your help!

kirkhess commented 8 years ago

Glad that worked!