Menu

How to use CAMV processor using the XML Doc

jcamnewbie
2009-10-22
2012-09-22
  • jcamnewbie

    jcamnewbie - 2009-10-22

    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

     
  • Martin Roberts

    Martin Roberts - 2009-10-22

    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

     
  • jcamnewbie

    jcamnewbie - 2009-10-28

    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

     
  • jcamnewbie

    jcamnewbie - 2009-11-07

    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.

    1. How do I use this interface?
    2. How can I create / cast the jdom Document to uk.org.jcam.sdom.Document?
    3. Also is there any documentation exists for sample usage?
    4. Are there any samples available for demonstrating the usage?
     

Log in to post a comment.