"B.W.H. van Beest" <[email protected]> wrote on 07/30/2010 05:19:17 PM:

> Hi,
>
> I would like to support this request, but broaden it so that its
> usefulness is bigger.
> The functionality that I think would be much more useful is to have
> not only the possibility to validate in memory a given DOM-tree (for
> which there indeed exists a work-around -however, see below), but
> the functionality that I'm really looking for is to ask a given DOM-
> node which attributes/child elements are allowed (and how many)
> according to the schema.  This would allow you to interactively edit
> a DOM-tree, with suggestions which edits are possible.
> From the outside this looks a related topic: if validation fails, I
> would like to know what the correct options are that would lead to
> validation.
> But here I might be completely wrong. I would like to hear Boris'
opinion.
> Anyway, an api that supports this type f functionalty would be
> extremely useful.

There's a W3C standard API (DOM Level 3 Validation) [1] for that but I
don't think it ever got widely implemented.

> Now on the in-memory validation:  my experience is that this works
> ok if the validation succeeds. However, if validation fails and you
> want to print details of what and where the error occurs, I always
> get core dumps. So instead I serialise a DOM-tree first to a
> temporary file on disk, the do the validation with possible error
> reporting on this temporary file.
> I would love to see how it is supposed to be done. Earlier requests
> along this line in this newsgroup have not lead to any answer, but
> the problem remains..
>
>
>
> Kind Regards,
> Bertwim

[1] http://www.w3.org/TR/DOM-Level-3-Val/validation.html

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [email protected]
E-mail: [email protected]

Reply via email to