I've been probably little bit succesful with XML schema.
It contains two tasks: DC schema extension and running validator:
1) I've tried to quickly understand XML schema and extend it in the first
approach to force root element 'audioClip' with one 'metadata' element inside.
The 'metadata' element can contain dc and dcterms elements and as extension
it should accept 'bpm' element with integer between 0 and 1000 exclusive
(it's probably unreal boundaries - may be changed)
Extension is defined in special targetNamespace: http://mdlf.org/livesupport/elements/1.0/
Here is part of ls.xsd (all tested files are attached in zip)
------ cut out from ls.xsd: ------
------ end of cut out from ls.xsd ------
2) There is probably needed to have XML schema validator callable from PHP,
but appropriate extension is in PHP5 only (does anybody know if we can upgrade?).
It's possible to call some validator as separate process - it need validator
as command line utility with some machine readable structured output.
I've tried:
PERL module http://search.cpan.org/~samtregar/XML-Validator-Schema-1.08/
but it not support all important things from schema specif. (e.g. import)
xerces-c http://xml.apache.org/xerces-c/index.html
probably usable, but I haven't found command-line interface and I'm not able
to quickly code it (it's C++ library)
w3-xsv python validator http://www.ltg.ed.ac.uk/~ht/xsv-status.html
it was complicated to run (segfaults with python2.3, ok with python2.2),
but it seems to work and I've tested ls.xsd with it.
requirements: python2.2 (probably), PyLTXML-1.3 and ltxml-1.2.7
version: XSV-2.8
What's your opinion?
Is it possible to go in this direction?
Tomas Hlava wrote:
> 2) There is probably needed to have XML schema validator callable from PHP,
> but appropriate extension is in PHP5 only (does anybody know if we can upgrade?).
I thing we should, if this is the way to go. in the C++ part we're also
using very recent libraries, because they are the ones that provide the
functionality we need.
> It's possible to call some validator as separate process - it need validator
> as command line utility with some machine readable structured output.
this would be a huge performance bottleneck, like sinking back to the
CGI age...
Akos
------------------------------------------
Posted to Phorum via PhorumMail
>There is probably needed to have XML schema validator callable from PHP,
>but appropriate extension is in PHP5 only (does anybody know if we can
upgrade?).
What would be the arguments against upgrading to PHP5? If they are minor,
let's bite the bullet and go for it. Otherwise the snaky way seems to way
to go (Python). Sebastian, Akos, Micz?
I've been probably little bit succesful with XML schema.
It contains two tasks: DC schema extension and running validator:
1) I've tried to quickly understand XML schema and extend it in the first
approach to force root element 'audioClip' with one 'metadata' element
inside.
The 'metadata' element can contain dc and dcterms elements and as
extension
it should accept 'bpm' element with integer between 0 and 1000 exclusive
(it's probably unreal boundaries - may be changed)
Extension is defined in special targetNamespace: http://mdlf.org/livesupport/elements/1.0/
Here is part of ls.xsd (all tested files are attached in zip)
------ cut out from ls.xsd: ------
type="dcterms:elementOrRefinementContainer"/>
type="BpmType"/>
------ end of cut out from ls.xsd ------
2) There is probably needed to have XML schema validator callable from PHP,
but appropriate extension is in PHP5 only (does anybody know if we can
upgrade?).
It's possible to call some validator as separate process - it need
validator
as command line utility with some machine readable structured output.
I've tried:
PERL module http://search.cpan.org/~samtregar/XML-Validator-Schema-1.08/
but it not support all important things from schema specif.
(e.g. import)
xerces-c http://xml.apache.org/xerces-c/index.html
probably usable, but I haven't found command-line interface and I'm
not able
to quickly code it (it's C++ library)
w3-xsv python validator http://www.ltg.ed.ac.uk/~ht/xsv-status.html
it was complicated to run (segfaults with python2.3, ok with
python2.2),
but it seems to work and I've tested ls.xsd with it.
requirements: python2.2 (probably), PyLTXML-1.3 and ltxml-1.2.7
version: XSV-2.8
What's your opinion?
Is it possible to go in this direction?