Loading ...
Sorry, an error occurred while loading the content.
 

Re: [rng-users] RelaxNG Object Model for UI generation (Rngom, Trang, JAXB)

Expand Messages
  • Tatu Saloranta
    ... These tools are very different -- JAXB is for binding Java objects to XML, and rngom is parsing RNG grammar and representing that as object graph. So
    Message 1 of 4 , Jan 2, 2010
      --- On Wed, 12/30/09, Younos Aboulnaga <younos.naga@...> wrote:

      > From: Younos Aboulnaga <younos.naga@...>
      > Subject: [rng-users] RelaxNG Object Model for UI generation (Rngom, Trang, JAXB)
      >
      ...
      > I'm considering using an Object Model for a RelanxNG
      > Compact schema, and build on top of it a Dynamic UI
      > generator that progressively generates UI Components for
      > allowed children; it is more like a graphical XML editor to
      > be more precise. The question is that I don't know how will
      > I generate a suitable Object Model; should I use Rngom or
      > the part of Trang that generates the Object Model, or should
      > I use JAXB 2.1? Openions, please... and feel free to talk

      These tools are very different -- JAXB is for binding Java objects to XML, and rngom is parsing RNG grammar and representing that as object graph.
      So latter could help in building a tool like that, but does not offer much for actual data binding part (representing your UI object hierarchy).

      My understanding is that object/data binding is one area where XML Schema is a better choice than RNG, since it is geared more as type definition language than validation one. Converse is true for RNG: it focuses on xml validation, its core strength, and does not try to model object hierarchies (inheritance etc). RNG does one thing very well, and does not add complexity of representing object class relationships.

      One reason there aren't many tools (and that JAXB does not support RNG, nor DTDs for that matter) is because it would be more difficult to offer support, and in the end, XML Schema works (as ugly as it is).

      So, as far as I know, your best bet might be to consider using XML Schema, unless you want to try building a good data binding library that uses RelaxNG.

      Just my nickel,

      -+ Tatu +-
    • MURATA Makoto (FAMILY Given)
      It is true that there are not so many data binding tools for RELAX NG. I don t think that the reason is the language design, however. JAXB V1 supported
      Message 2 of 4 , Jan 2, 2010
        It is true that there are not so many data binding tools for RELAX NG. I
        don't think that the reason is the language design, however. JAXB V1
        supported RELAX NG.

        http://java.sun.com/webservices/docs/1.5/jaxb/relaxng.html

        There was another data binding tool, namely Relaxer, for RELAX NG, but
        it is not supported any more.

        In my understanding, the reason is the lack of interest (both users and
        developers).

        Cheers,
        Makoto
      • Uche Ogbuji
        On Sat, Jan 2, 2010 at 1:32 PM, MURATA Makoto (FAMILY Given)
        Message 3 of 4 , Jan 2, 2010
          On Sat, Jan 2, 2010 at 1:32 PM, MURATA Makoto (FAMILY Given) <EB2M-MRT@...> wrote:
           

          It is true that there are not so many data binding tools for RELAX NG. I
          don't think that the reason is the language design, however. JAXB V1
          supported RELAX NG.

          http://java.sun.com/webservices/docs/1.5/jaxb/relaxng.html

          There was another data binding tool, namely Relaxer, for RELAX NG, but
          it is not supported any more.

          In my understanding, the reason is the lack of interest (both users and
          developers).


          I tend to think the issue is a philosophical one.  I feel RELAX NG's aesthetic as "text first, data incidentally."  That goes well at odds with the idea of rigidly mapping XML structures to programmatic structures, which is the essence of most data binding tools.


          --
          Uche Ogbuji                       http://uche.ogbuji.net
          Founding Partner, Zepheira        http://zepheira.com
          Linked-in profile: http://www.linkedin.com/in/ucheogbuji
          Articles: http://uche.ogbuji.net/tech/publications/
          TNB: http://www.thenervousbreakdown.com/author/uogbuji/
          Friendfeed: http://friendfeed.com/uche
          Twitter: http://twitter.com/uogbuji
          http://www.google.com/profiles/uche.ogbuji
        Your message has been successfully submitted and would be delivered to recipients shortly.