I am trying to use CAMV as JCAM will be phased out and it also provides
complete XPATH in the error.
While there is almost negligible documentation available on how to use it
following two lines of code did the trick
tv = new TemplateValidator(templateFileName);
boolean suc = tv.validate(xmlDocumentFilename);
However this is useful only in case the XML is available as a file. I need
pointer to how to use this when the XML is available in memory say as JDOM
document.
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You are quite correct in your understanding of the process at the moment. I
seemed to have overlooked the need to put a validate from DOM or JDOM based
input. I am sorry. Are you in a hurry? I should be able to get a new version
out by next week. I need to reset my environment so I am unable to do it
earlier.
What I would propose to do would be to add a validate(JDOM). One of the
problems is that the use of files is the default for the editor and I need to
check that not having a file name does not cause a problem.
Can you please submit a high priority feature request explaining exactly the
scenario you need, for example do you need to submit the cam file in a JDOM
form as well?
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, thanks yes I have raised a feature request so please incorporate the
feature. However what's the timeline we are looking at for it being GA as I
see it is still in beta phase
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Martin,
I am trying to use the newly available interface where tv.validate(Document)
has been created but the Document in argument is of type
uk.org.jcam.sdom.Document whereas I have org.jdom.Document object available to
me via. my codebase.
How do I use this interface?
How can I create / cast the jdom Document to uk.org.jcam.sdom.Document?
Also is there any documentation exists for sample usage?
Are there any samples available for demonstrating the usage?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to use CAMV as JCAM will be phased out and it also provides
complete XPATH in the error.
While there is almost negligible documentation available on how to use it
following two lines of code did the trick
tv = new TemplateValidator(templateFileName);
boolean suc = tv.validate(xmlDocumentFilename);
However this is useful only in case the XML is available as a file. I need
pointer to how to use this when the XML is available in memory say as JDOM
document.
Thanks in advance
You are quite correct in your understanding of the process at the moment. I
seemed to have overlooked the need to put a validate from DOM or JDOM based
input. I am sorry. Are you in a hurry? I should be able to get a new version
out by next week. I need to reset my environment so I am unable to do it
earlier.
What I would propose to do would be to add a validate(JDOM). One of the
problems is that the use of files is the default for the editor and I need to
check that not having a file name does not cause a problem.
Can you please submit a high priority feature request explaining exactly the
scenario you need, for example do you need to submit the cam file in a JDOM
form as well?
Thanks
Ok, thanks yes I have raised a feature request so please incorporate the
feature. However what's the timeline we are looking at for it being GA as I
see it is still in beta phase
Martin,
I am trying to use the newly available interface where tv.validate(Document)
has been created but the Document in argument is of type
uk.org.jcam.sdom.Document whereas I have org.jdom.Document object available to
me via. my codebase.