Agreed on the ability to read DTD's. It might be easier to generate though a schema.
Michael Bushe Principal Bushe Enterprises, Inc. [email protected] www.bushe.com On Wed, Feb 24, 2010 at 1:32 PM, Greg Brown <[email protected]> wrote: > Yeah, but they are a lot easier to understand. :-) IMO, XSD is a bit > overdesigned... > > On Feb 24, 2010, at 1:29 PM, Michael Bushe wrote: > > Ah, it was under "DTD" not "Schema" > http://issues.apache.org/jira/browse/PIVOT-385 > > DTD's are so 1990's... > > Michael Bushe > Principal > Bushe Enterprises, Inc. > [email protected] > www.bushe.com > > > On Wed, Feb 24, 2010 at 1:23 PM, Todd Volkert <[email protected]> wrote: > >> Agreed. I actually think there's already a JIRA ticket for this feature >> request. >> >> -T >> >> >> On Wed, Feb 24, 2010 at 1:21 PM, Michael Bushe <[email protected]> wrote: >> >>> Even though this is simple and clear, it would be helpful to have the >>> schema so that tools can parse it and give developers assistant when writing >>> XML like they have from Java. Would it be worth it/possible to >>> auto-generate a schema from the code? >>> >>> Michael Bushe >>> Principal >>> Bushe Enterprises, Inc. >>> [email protected] >>> www.bushe.com >>> >>> >>> >>> On Wed, Feb 24, 2010 at 1:17 PM, Todd Volkert <[email protected]>wrote: >>> >>>> Yup - it's a 1:1 relationship. The WTKXSerializer actually translates >>>> the WTKX into Java API calls by applying the direct translation. >>>> >>>> For instance, to set a push button to be a toolbar button, you set the >>>> "toolbar" style on the button, like so: <PushButton >>>> xmlns="org.apache.pivot.wtk" buttonData="Click Me" >>>> styles="{toolbar:true}"/> >>>> >>>> What is happening here is you're creating an instance of >>>> "org.apache.pivot.wtk.PushButton", calling setButtonData("Click Me") and >>>> setStyles("{toolbar:true}"). The latter call is shorthand for setting a >>>> number of styles en mass that would otherwise be set via a series of calls >>>> to getStyles().put(key,value). Finally, the styles dictionary in general >>>> is >>>> a virtual passthrough to bean properties on the component's skin, so in >>>> this >>>> case, you can find the supported styles for PushButton by looking at >>>> org.apache.pivot.wtk.skin.terra.PushButtonSkin (the default push button >>>> skin). In this example, what ends up getting called is >>>> http://pivot.apache.org/1.4/docs/api/org/apache/pivot/wtk/skin/terra/TerraPushButtonSkin.html#setToolbar%28boolean%29 >>>> >>>> One area where we could do better is explaining what the default skin is >>>> for any given component. In general, you should look to the >>>> org.apache.pivot.wtk.skin.terra package, but some skins don't need theming, >>>> so their skin lies in org.apache.pivot.wtk.skin... In your case, looking >>>> at >>>> the bean properties of org.apache.piviot.wtk.skin.terra.TerraPushButtonSkin >>>> will tell you what styles are supported for push buttons. >>>> >>>> Hope that helps, >>>> -T >>>> >>>> >>>> On Wed, Feb 24, 2010 at 12:57 PM, Mathias Versichele < >>>> [email protected]> wrote: >>>> >>>>> But is this really a 1 one 1 relation ? For example, I'm looking up how >>>>> to make a pushbutton a toolbar-styled pushbutton. I dont think I can find >>>>> this in the javadoc ? >>>>> >>>>> 2010/2/24 Greg Brown <[email protected]> >>>>> >>>>> I think we need to make this question #1 on the FAQ. ;-) >>>>>> >>>>>> WTKX is just a "shortcut" to writing Java code. The relationship >>>>>> between WTKX and Java is described here: >>>>>> >>>>>> http://pivot.apache.org/tutorials/wtkx-primer.html >>>>>> >>>>>> >>>>>> On Feb 24, 2010, at 12:51 PM, Mathias Versichele wrote: >>>>>> >>>>>> > I might have missed it, but is there some kind of reference document >>>>>> for the wtkx markup language which lists all options, attributes, ... of >>>>>> all >>>>>> components ? >>>>>> > >>>>>> > -- >>>>>> > Mathias Versichele >>>>>> > Bio-ir milieutechnologie / Msc. geografie >>>>>> > Oudburgstraat 16 >>>>>> > 9240 Zele >>>>>> > 0485/16.07.08 >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Mathias Versichele >>>>> Bio-ir milieutechnologie / Msc. geografie >>>>> Oudburgstraat 16 >>>>> 9240 Zele >>>>> 0485/16.07.08 >>>>> >>>> >>>> >>> >> > >
