XML schema for GWT UIBinder

2019-07-07 07:01发布

I'm wonderring whether Google is ready to publish (or there is at least any chance to "produce") the full formal xml schema for GWT UIBinder.

I've searched the latest entire GWT-SDK-2.4 distribution but found nothing. Does GWT simply look up java sources or reflect the classes of the widgets to validate the UIBinder xml counterparts, assuming that the xml schema was actually by no means predefined thus adopted to govern the validation?

@EDIT

According to the answer from @Ganesh Kumar, I've looked into ui.xsd (r6836) and found something e.g. in lines 496-499:

   <!--
        A complex type that contains both text and elements. There is no schema
        for the elements, they can be any elements.
    -->

There're also other similar occurrences indicating no schema for the elements alike. It seems that Google has not yet fully defined even agreed on the xml schema for UIBinder xml instances, doesn't it?

标签: gwt uibinder
2条回答
SAY GOODBYE
2楼-- · 2019-07-07 07:10

AFAIK, the XSD is only there to help the Google Plugin for Eclipse doe autocomplete.

There's no schema per se, UiBinder generator directly matches the elements with classes and the attributes with setters (with a few exceptions, such as addStyleNames, this is documented in the UIObject javadoc). There are a bunch of element parsers specific to some widgets (each widget that uses one has some specific documentation in its javadoc), and there are attribute parsers to unmarshal attribute values into Java objects to pass to setters.

查看更多
forever°为你锁心
3楼-- · 2019-07-07 07:22

Yes, Google is publishing the XSD for UiBinder as part of GWT source. You can get the latest GWT source which is available at http://google-web-toolkit.googlecode.com/svn/trunk/. You can view the XSD at here

查看更多
登录 后发表回答