Re: [oXygen-user] schematron validation in a batch file

2019-10-09 Thread Oxygen XML Editor Support (Radu Coravu)

Hi Lou,

We plan to have in the future an Oxygen command line tool allowing 
validation and transformation. So I added your feedback (which covers 
very well the use case) to the opened internal issue, we will get back 
to you when we do.
So for now you can probably put something together using Jing for 
RelaxNG validation and the Schematron stylesheets but indeed you would 
still need some kind of detector to read the header from each XML file 
and get the xml-model instructions there, obtain the schemas and use 
them for validation (which is more or less what Oxygen does).


Regards,
Radu

Radu Coravu
 XML Editor
http://www.oxygenxml.com

On 10/9/2019 12:57 PM, Lou Burnard wrote:

One of the features of oXygen which I really love is the way it allows
me to combine schema validation with RELAXNG and with schematron just by
adding a couple of PIs to the top of my file. But this requires me to
fire up oXygen and open up each file one by one which is not so
convenient if I have 100 or more independent documents to validate. I
would rather do this in a bash script, along with all the other
pre-validation sanitation work. But

(a) only oXygen will take any notice of my PIs (obviously)

(b) none of the open source validators I've looked at seems to have a
hook for including schematron validation

(c) oxyGen will do a batch validation of documents included in a project
file, which is close to what I want, but still requires me to fire up
oXygen, make the project file and click a couple of times, so not really
a batch process

Maybe someone else has found a way round this, or could explain to me
why it's just not possible. And how exactly does oXygen do this magic?




___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user


___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user


Re: [oXygen-user] schematron validation in a batch file

2019-10-09 Thread director

Lou,


(b) none of the open source validators I've looked at seems to have a
hook for including schematron validation


You might want to look at David Maus's SchXslt...
https://github.com/schxslt/schxslt
...which I've lately used to do what I imagine to be something close to 
what you want to do. I developed it further for my own project's needs, 
documented in the README-REV.md in my fork:

https://github.com/Arithmeticus/schxslt

Best wishes,

jk
--
Joel Kalvesmaki
Director, Text Alignment Network
http://textalign.net
___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user


Re: [oXygen-user] schematron validation in a batch file

2019-10-09 Thread Christophe Marchand
I think I've presented in pre-conference day at XMLPrague 2019 - not 
recorded - a maven plugin that do validation against RelaxNg AND 
Schematron, but I can't find code.


It's based on Jim Etevenard's work, located here : 
https://github.com/cmarchand/Jing-JAXP-Wrapper


It requires, for ISO-schematron, a patched release of Jing/Trang. You 
can find one here, but it's not available on maven central : 
https://github.com/ELSGestion/jing-trang/commits/master


Added Jim Etevenard as cc.


Ok, found it : here is an extract of pom.xml, definining 
xml-maven-plugin and controls. See dependencies, there are all published 
on maven-central, except Jing.


You should be able to write a simple java program that can be used to 
validate input files from command line, exploring PIs.


  
    org.codehaus.mojo
    xml-maven-plugin
    1.0.2
    
  
    
  validate
    
  
    
    
  
    
src/main/resources/eu/els/sie/publication/conf/env
  
    *.xml
  
  els-conf.ns.rng
http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0
    
    
src/main/resources/eu/els/sie/publication/conf/env
  
    *.xml
  
  flash.sch
http://purl.oclc.org/dsdl/schematron
    
  
target/test-classes/catalogs/catalog.xml
    
    
  
    com.jimetevenard.xml
    Jing-JAXP-Wrapper
    1.0.1
  
  
    net.sf.saxon
    Saxon-HE
    9.8.0-14
  
  
    eu.els.oss
    jing
    20180404
  
  
    com.google.code.gson
    gson
    2.8.5
  
    
  

Best regards,
Christophe


Le 09/10/2019 à 11:57, Lou Burnard a écrit :


One of the features of oXygen which I really love is the way it allows 
me to combine schema validation with RELAXNG and with schematron just 
by adding a couple of PIs to the top of my file. But this requires me 
to fire up oXygen and open up each file one by one which is not so 
convenient if I have 100 or more independent documents to validate. I 
would rather do this in a bash script, along with all the other 
pre-validation sanitation work. But


(a) only oXygen will take any notice of my PIs (obviously)

(b) none of the open source validators I've looked at seems to have a 
hook for including schematron validation


(c) oxyGen will do a batch validation of documents included in a 
project file, which is close to what I want, but still requires me to 
fire up oXygen, make the project file and click a couple of times, so 
not really a batch process


Maybe someone else has found a way round this, or could explain to me 
why it's just not possible. And how exactly does oXygen do this magic?




___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user
___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user


[oXygen-user] schematron validation in a batch file

2019-10-09 Thread Lou Burnard
One of the features of oXygen which I really love is the way it allows 
me to combine schema validation with RELAXNG and with schematron just by 
adding a couple of PIs to the top of my file. But this requires me to 
fire up oXygen and open up each file one by one which is not so 
convenient if I have 100 or more independent documents to validate. I 
would rather do this in a bash script, along with all the other 
pre-validation sanitation work. But


(a) only oXygen will take any notice of my PIs (obviously)

(b) none of the open source validators I've looked at seems to have a 
hook for including schematron validation


(c) oxyGen will do a batch validation of documents included in a project 
file, which is close to what I want, but still requires me to fire up 
oXygen, make the project file and click a couple of times, so not really 
a batch process


Maybe someone else has found a way round this, or could explain to me 
why it's just not possible. And how exactly does oXygen do this magic?



___
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user