>This is a rambling list of cramps floating around in my head, where it is head is anybody’s guess.
XPath Content Assistance and Validation.
One of the community members for XSL Tools made a request to have XPath Assistance, and Validation support. Well, we already do provide some basic XPath function and accessor assistance, and basic syntax checking on the XPath, but that is about it.
Well, with the extended holiday weekend, and a cat that decided I was to be a cushion the entire day, I started off on seeing what I could do about the bug. One of the features I always liked about Oxygen XML, was the XPath Aware content assistance it provided, particularly when it came to the Input document:
The above image is from Oxygen XMLs implementation, and it is pretty smart. One thing that always bothered me about this implementation is that you had to associate a Input XML to the particular stylesheet. This was accomplished through setting up a transformation scenario. However this always seemed liked an extra step, especially since they had an XML Catalog that could have been leveraged, and the namespaces were defined typically within the stylesheet being used.
I tried on and off over the years to get Oxygen XML to leverage the Web Standard Tools framework for eclipse instead of inventing it themselves, but alas they continue on their own. So for bug 259575, I’ve taken a different approach in implementing this with XSL Tools. XSL Tools will try to provide proposals of available elements from the Namespaces that have been defined. It does this by leveraging the ContentModel that is created when the stylesheet is loaded. The ContentModel is created by the resolvers and xml catalog implementation, and the namespaces and grammars defined. The Xpath content assistance has been implemented, for select, test, and match attributes. However, it currently doesn’t try to filter the proposals down, as Oxygen XML does. That will be the next step to make it a little more aware.
XML and Eclipse
The last year I have worked as an XML Evangelist within the eclipse community. The role of Eclipse evangelist is pretty well taken by others more experienced and passionate about eclipse as whole, than I am. I’m still amazed by how much of XML that is created is not backed by some sort of model, whether that be an EMF model, XSD, or DTD. Most is just free form. Do not even get me started on how the XML Schema is used within the PDE for extensions, I could write a whole blog on that alone. Some of these problems are education issues with the developer community, most don’t think about having or requiring a model for the xml files. Introduce the concept of XML with namespaces, and watch the question marks start to form above their heads.
I guess unless you work with XML consistently it just appears like a convient way to dump objects. Unfortunately that seems to be rule rather than the exception. Hopefully that can be addressed over the next year.
In general in the the XML community, when you think of XML tooling, you don’t think of eclipse. If you do, it is because of OxygenXML and it’s eclispe plugin. Until this last year, I would definitely agree that the existing support from the web tools platform has been very buggy, with spotty understanding at times of the various specifications. There is still a gapping hole in the WTP DOM implementation, and some misunderstandings of how certain XML specific features are to work (i.e. the xml prefix always resolving to the xml namespace, i.e. xml:space, xml:lang attributes should always return the xml namespace, not null).
With this said, the release of Web Tools Platform 3.0 greatly improved specification compliance. The editor no longer cares what order attributes and namespaces are defined (yes it was order dependent in the past). The performance of the XSD editor when working with large real world schemas by various standard organizations is much improved. There also has been a little bit of revitalization on the tooling front, primarily generated by the eclipse user community and not the strategic members.
The commiters working on this may have the expertise in the related JEE specs, and the xml specifications that go with them, but may not be as familiar with the overall picture of the specs. As an example, the current WTP DOM does not support the concept that Attributes have nodes. However according to the DOM Level 1 spec, they do have Text and Entity Reference nodes. But because changes to the way the DOM is implemented might break existing adopters there is resistance to change to make a compliant implementation.
Overall, the support has improved, but it needs to get better. The only way that is going to happen is to bring in more expertise on implementing the various XML specifications. Bugs in the current implementations when they break compatibility or violate the rules of a specification needs to be addressed sooner rather than later. Yes this may break some existing strategic members implementations, but it promotes a more stable and compliant product for the eclipse xml community as a whole. It makes the tooling being built off of WTP more stable and compatible with other XML tooling out there. Long term this compliance is not going to come from the strategic members as they will always go with the features that are key to their products. The support will have to come from the community in the way of new committers or contributions and patches. I have done my share over the last year to help where I can with patches and contributions. I still plan to do more, but help from the whole XML community is needed as well.
New XML Tooling at Eclipse.
With the above statement, this last year actually has seen a new focus on some XML tooling at eclipse. XSL Tools is picking up steam, and there is renewed interest in a revitalized Visual Editor for XML (VEX) after it moved from sourceforge to eclipse. In addition, Dominick Schadow has brought over XML Security Tools for working with Encryption and Digital Signatures, and the XQuery Development Tools google summer of code project, has also made it’s way into the WTP incubator. The SOA project is working on a WS-Policy Editor, as well as some renewed interest in Declartive UI design by E4.
There is still more that needs to be done though. RelaxNG and NVDL support are starting to grow outside of the traditional strategic members. REST is reviving as a way to do web services without the bloat of the WS-splat set of specifications. As the use of XML continues to spread it is more critical that the frameworks and tooling that make this easier to use and implement are also compliant. I hope to continue to see the growth in 2009, and continued improvement on the compliance stand point. I also hope that the developer community looks to leverage and create models for the XML that they use. Learn to use EMF, DTD, and particularly XML Schema to their full extent in the way of validation. If you don’t already know it, learn XPath for helping to manipulate your DOM related XML documents. Learn XSLT and XQuery. Do less with the DOM and more with XML Databases. Do less data binding of your XML, you’ll have more control. If you do data bind, be aware of how your choosen data binding framework works. Just because you can bind, doesn’t mean you should.
I see a brighter future for XML at eclipse over the next year. I hope that those in the eclipse and XML community will help to continue to improve the basic support, so that first class commercial quality applications that leverage this support can continue to be built.
Have a happy and safe new year.