Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Creating a generic editor for an XML Schema
Creating a generic editor for an XML Schema [message #563453] Fri, 25 October 2002 06:10
Eclipse UserFriend
Originally posted by: troynet+web.ugcs.net

Is anyone aware of generic patterns to approaching building an editor or
form based on an XML Schema?

Basically, given an XML schema, I'm trying to maximize the amount of
automation that is done generating an editor based on it and minimize the
amount of schema-specific code I have to write.

For example, let's say I just want to have an XML editor in the form of a
hierarchical tree. Now the user wants to add a child element to a
selected parent element, but I want to make sure that adding that element
does not invalidate the entire XML document and I want to give the user an
immediate error if it does. I could just validate the entire document
upon every action of the user, but this clearly does not scale. Thus an
incremental approach would work best.

Ideally, given a specific context within the XML document being built by
the user, my program should be able to figure out exactly what elements
would be allowed at that spot and only offer the user the chance to insert
these given validating elements. In other words, it would be best if my
program could call something like
schema.getPossibleElements( context )

The same thing goes for attributes. If I had a form that asked the user
to specify the value of attributes, my program should be able to
"incrementally parse" the schema and present the valid values of an
attribute if they are enumerated or easily translate the XML Schema
constraints into code. Something like:
schema.getPossibleAttributes( context )
schema.validate( context, attributeValue )

From what I've seen of Eclipse XSD or Castor, what we have are still
low-level libraries.

Is anyone aware of higher-level libraries or uniform approaches in
industry to generalizing the schema-to-editor problem? Don't have to be
with Eclipse XSD.
Previous Topic:NIST's XSD Test Suite
Next Topic:Creating a generic editor for an XML Schema
Goto Forum:
  


Current Time: Fri Apr 19 10:15:38 GMT 2024

Powered by FUDForum. Page generated in 0.01794 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top