Return-Path: Delivered-To: apmail-xml-general-archive@www.apache.org Received: (qmail 89254 invoked from network); 21 Oct 2003 15:36:18 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 21 Oct 2003 15:36:18 -0000 Received: (qmail 52897 invoked by uid 500); 21 Oct 2003 15:36:06 -0000 Delivered-To: apmail-xml-general-archive@xml.apache.org Received: (qmail 52853 invoked by uid 500); 21 Oct 2003 15:36:06 -0000 Mailing-List: contact general-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: general@xml.apache.org Delivered-To: mailing list general@xml.apache.org Received: (qmail 52830 invoked from network); 21 Oct 2003 15:36:06 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 21 Oct 2003 15:36:06 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AByYK-0001cw-00 for ; Tue, 21 Oct 2003 17:36:08 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: general@xml.apache.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AByYI-0001ci-00 for ; Tue, 21 Oct 2003 17:36:06 +0200 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AByYI-0004Q7-00 for ; Tue, 21 Oct 2003 17:36:06 +0200 From: Christian Schuhegger Subject: Re: JARV and DocumentFragment validation Date: Tue, 21 Oct 2003 17:33:24 +0200 Lines: 57 Message-ID: References: <3F952818.8010107@vafer.org> <3F95392B.9030005@nada.kth.se> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en In-Reply-To: <3F95392B.9030005@nada.kth.se> Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi, > I think one can use MSV > http://wwws.sun.com/software/xml/developers/multischema/ or > https://msv.dev.java.net/ for partial validation. It doesn't give this > functionality OOTB though, but its internal API at least, IIUC, contain > the components you need for building e.g. a DOM-tree with partial > validation functionality for sub trees. Take a look at the native > validation interface > https://msv.dev.java.net/unbranded-source/browse/*checkout*/msv/msv/doc/acceptor.html?rev=1.1 Thanks for your hint. Actually I do all my tests with MSV, but at least with the JARV interface partial validation does not work OOTB as you mentioned already. I also got a reply from Kohsuke Kawaguchi who proposed an implementation path: http://groups.yahoo.com/group/reldeve/message/407 > W3C have defined an API for partial validation: DOM Level 3 Validation > Specification http://www.w3.org/TR/DOM-Level-3-Val/ it is designed for > schema based editing, so besides partial validation you can also ask > what kind of element that is allowed to insert at a certain place in the > DOM-tree. Quite cool IMO, but I don't know if there are any > implementations yet. Yes, this sounds interesting. Perhaps while I am just asking perhaps it would also be a good idea to explain a bit about the background of my question. There are several form validation packages out there, basically one for every web application framework. But in fact the form validation task is in large parts exactly the same functionality as implemented in xml validation libraries, except that xml validation libraries do not support cross checks between the values of different fields and they do not allow to configure a custom failure message in case that a field could not be validated. In order to find out which element in the form caused the validation error I would like to validate each sub-element one at a time. I have seen that the interface org.w3c.dom.DOMError has a method: public DOMLocator getLocation(); But at least the current Xerces-j implementation does not implement the: public Node getRelatedNode(); method of the DOMLocator object. Another problem I will have to solve is how to receive real Java objects from the validated XML file. I mean after I know that the data is in the correct string format I thought there should be an easy way to query e.g. the PSVI interfaces for the real Java value like Integer, Date, Double, ... but I had to find out that the Xerces-j team is currently planning to implement an extension of the current PSVI interfaces to allow something in that direction. It is not available right now. If anybody has a suggestion for that problem in the meantime I would be happy to hear about that. Thanks again for your information!! -- Christian Schuhegger http://galileo.spaceports.com/~cschuheg --------------------------------------------------------------------- To unsubscribe, e-mail: general-unsubscribe@xml.apache.org For additional commands, e-mail: general-help@xml.apache.org