Re: [xml] Interactive node insertion

Date view Thread view Subject view Author view

From: Daniel Veillard (Daniel.Veillard@w3.org)
Date: Sun Oct 03 1999 - 16:40:29 EDT


On Sun, Oct 03, 1999 at 10:06:24PM +0200, Mathias Hasselmann wrote:
>
> After parsing and validating a xml file I would like to insert new
> elements interactivly without breaking the validated tree.
>
> Since users don't have to know the DTD I need a way to find out, which
> insertions are allowed for a selected elements.
>
> Is there a common way to do this?

  Hum, no, and that's a good point.
I added validation to the parsing step, but it's not really glued in
the tree manipulation functions yet.

  Would something like:

  int xmlIsValidChild(const xmlChar *parent, const xmlChar *child);

  suit your needs, or does something more prospective like returning
the list of valid child be more useful. In the later, I'm afraid it
won't be really more easy to use/remap the existing list based functions
and switch to arrays. All advanced structured editors I have seen in
the past were "guiding" the user with a list of possible childs. So
the second kind of function would still be useful.

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel : +33 476 615 257  | 655, avenue de l'Europe | Linux, WWW, rpmfind,
Fax : +33 476 615 207  | 38330 Montbonnot FRANCE | rpm2html, XML,
http://www.w3.org/People/W3Cpeople.html#Veillard | badminton, and Kaffe.
----
Message from the list xml@rufus.w3.org
Archived at : http://rufus.w3.org/veillard/XML/messages
to unsubscribe: echo "unsubscribe xml" | mail  majordomo@rufus.w3.org


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Aug 02 2000 - 12:29:47 EDT