Christian,
I will do so next time.
Thanx, Rob
-----Oorspronkelijk bericht----- Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: dinsdag 22 maart 2016 15:53 Aan: Rob Stapper; BaseX Onderwerp: Re: [basex-talk] using Xerces2 with schema-validation
Hi Rob (cc to the list),
You may be better off using the ZIP distribution. Usually, it’s mostly the basex.jar and basex-api.jar files that need to be updated.
Hope this helps, Christian
On Tue, Mar 22, 2016 at 3:04 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
HI Christian,
Oops, not too clever. But to my defense, in my original code I use an xsd-file starting with the xml-processor for defining the version: <?xml version="1.1" encoding="UTF-8"?>
It turns out that my ignorance of java's classpath and BaseX's installation procedure are the cause of this trouble:
- Environment-variable classpath is ignored when java is started with
the -cp option
- Manually copying the Xerces-file to the BaseX-library and changes to the basexgui.bat-file[1] are getting undone when installing a new BaseX-version.
My solution for the moment is to keep an edited basexgui.bat-file in my document directory which I copy to BaseX-bin directory every time I install a new Basex-version.
What is the best strategy for preserving for example classpath-extensions when installing a new version of BaseX? Is it an idea preserving all non BaseX batch-file in BaseX/bin-directory, in my case: "myBasexgui.bat", when executing the BaseX-installation-procedure?
[1] line added to basexgui.bat: "for %%a in (L:\xerces-2_11_0-xml-schema-1.1-beta*.jar) do set CP=!CP!;%%a"
Take care, Rob
PS, calling Xerces2's validation works now as does XML-schema's assert. Thanx.
-----Oorspronkelijk bericht----- Van: Christian Grün [mailto:christian.gruen@gmail.com] Verzonden: maandag 21 maart 2016 18:11 Aan: Rob Stapper CC: BaseX Onderwerp: Re: [basex-talk] using Xerces2 with schema-validation
Hi Rob,
it seems you forgot the version argument?
Cheers, Christian
On Mon, Mar 21, 2016 at 12:06 PM, Rob Stapper r.stapper@lijbrandt.nl wrote:
Hi,
I would like to use xerces2 for schema-validation. See attached file, but I can’t get it activated from within BaseX.
I’ve read the chapter on validation [1] and followed the instructions : copying the 4 files to the library.
I can see that these 4 file are part of the –cp option when calling java.
But the use of assert-element while validating gives an error:
Stopped at L:/Program Files/BaseX/demo-xsd-validation.xq, 1/14:
[bxerr:BXVA0001] Validation failed: file:/C:/Users/Rob/AppData/Local/Temp/BaseX-375999151462208291.tmp, 6:33: s4s-elt-invalid-content.1: The content of '#AnonType_assert-demo' is invalid. Element 'assert' is invalid, misplaced, or occurs too often.
[1] http://docs.basex.org/wiki/Validation_Module#XML_Schema_Validation
What am I doing wrong?
TIA for your response,
Rob
PS I’m using the latest or one of the latest snapshot and java 1.8 runtime on a windows-Vista machine