Re: Microsoft Hypes Up XUL As The Greatest Expiriment Since Ad
>> Now let's look what a button looks like in the >>"revolutionary" Microsoft XAML thingy: >> >> <Button Background="LightSeaGreen" FontSize="24pt"> >> Calculate >> </Button> >> >> Whow. Compared to the XUL version: >> >> <button label="Calculate" style="background: >>lightSeaGreen; font-size: 24pt" /> > > Hmm. To me it looks like XAML is considerably better > designed than > XUL. This is very much like the difference between > SVG and XSL-FO > that I wrote about in Item 11 of Effective XML, Make > structure > explicit through markup. XUL is using a double > syntax with embedded > CSS. The syntax should be XML, even if the semantics > come from CSS. > XAML and XSL-FO get this right. XUL and SVG get this > wrong. Well, my point was that Microsoft doesn't care about standards and blissfully ignores CSS and reinvents the wheel to take full control. As far as I know in SVG you can use either CSS style properties or full-blown XML attributes. As far as XUL goes it's all in flux and adding full-blown XML attributes in addition to CSS style properties is just syntatic sugar and convenience and thus easy to addon. > I think someone asked if it would be possible to > write an XSLT > stylesheet to convert from XAML to XUL. One > consequence of XUL's > design is that it is much easier to write a > stylesheet to go from > XAML to XUL than from XUL to XAML. XAML-->XUL is > straightforward > because all the important XAML structures are marked > up in XML. > XUL-->XAML requires writing a CSS parser in XSLT, > doable but ugly and > hard. Well, again adding full-blown XML attributes for CSS style properties is easy, but the core questions still remains. Will Microsoft play together with others? Of course, not. They want it all for themselves. > The use of a potentially structured label is also a > decided > improvement in XAML, as I wrote about in Item 12 of > Effective XML, > Store metadata in attributes. XUL's approach is > decidedly limited. It > can't easily be extended to make a label anything > other than plain > text. I've put that chapter online too: Well, XUL already supports strutured labels that use XHTML for rich text and not some new markup language resembling XHTML. For example: <button> <label><b>Hello</b></label> </button> Is perfectly legal in XUL in XAML it's <button> <bold>Hello</bold> </button> > Of course, I'm basing all of this on just one > example, so it's > possible there are other issues here. Again, the main issue here is Microsoft go it alone approach. > Either way, this is an instructive example of the > right and wrong way > to use markup. For a change, it looks like Microsoft > is the one doing > it right. Well, I wouldn't say that reinventing CSS, XHTML, XUL and SVG is the right thing to do. The main point of XML is interoperability as far as I know. If you tell the world my way or the highway how is this true to the XML charter? - Gerald ______________________________________________________________________ Post your free ad now! http://personals.yahoo.ca
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format