You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Evert Hoff <ev...@pixie.co.za> on 2002/08/16 13:57:37 UTC

whatCanGoHere

Hi,

I am working on Xerlin (www.xerlin.org - an open source XML editor that
used to be called Merlot).

We are still using Xerces-1.4.0 and I want to now upgrade Xerlin to use
Xerces 2.

There are three essential functions for which we need access to the
Grammar in Xerces:

1. To determine which new elements may be inserted in a specific
location. 

Xerlin has a tree structure with all the elements. Right-clicking on the
tree shows a pop-up menu with the names of the valid elements that may
be inserted there as children. 

I used to use the whatCanGoHere method in DFAContentModel to find out
what may be inserted in a certain position, but can't find an equivalent
method in Xerces 2. Do you have any suggestions for how I could
accomplish this? 

2. To validate whether the current children of a specific parent may all
be where they are.

This helps when a node is deleted, to find out if the remaining children
of the parent are still a valid set. We don't want to re-validate the
whole document just to find this out.

I have used the validateContent method in a ContentModel for this. It
looks like the validate method still does the same for DTDs. But, I
can't find something similar for Schemas. It looks like
XMLSchemaValidator is just for validating an entire document and not
just for a single element.

3. To quickly validate a single value of a specific element or attribute
to find out whether the value that the user entered is valid.

For this I used the datatypeValidator of an XMLElementDecl or an
XMLAttributeDecl. It looks like I can now use the validate method in
XSSimpleType for this.

---

Any suggestions would be appreciated.

Regards,

Evert



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org