Compiling schema into Java objects

2000-04-28
2000-04-29
  • Paul McGovern

    Paul McGovern - 2000-04-28

            We've been looking at ways of working with the latest rev of the XML schema spec in the context of an XML editor we are working on. The editor is an applet that an unskilled user can use to create or edit XML files and upload them to a server. It uses a tree metaphor to represent the document structure.

            Currently, the schema is wrapped by an object that reads the schema into a DOM and steps through the DOM recursively to assemble information on a given element. This state of affairs is a short-term solution and will have to be abandoned if we wish to support the entire schema specification in a maintainable manner. We are only able to support about one quarter of the spec and the code already feels goofy.

            Given that a new approach is needed, we've been considering compiling the schema into aggregates of objects that could be delat with much more easily and efficiently. Maybe 'compile' is the wrong word here, but we saw your project on Sourceforge and thought we'd check it out. Please let us know if this related to what you are intending.

            Note that data validation is not really a concern at the moment. We're thinking about how to construct documents, validation is a seperate problem. We're currently doing some revisions, but I might be able to send you a copy of the editor applet so you can see what we're on about.

                                    -Paul McGovern
                           

     
    • Curt Arnold

      Curt Arnold - 2000-04-29

      I think you have found the right place.

      I hope to put in the CVS this weekend an updated set of transforms that will take at least schema for schema and the other schema all the way down to the schema "bytecode".  I will not have restrictions of element content (which I don't believe is sufficiently defined to implement yet) implemented, but am currently debugging my attribute restriction transforms.

      Once you have that it should be fairly straight forward to generate Java code to plug into your applet.

       

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks