|
YOUR FEEDBACK
|
TODAY'S TOP SOA & WEBSERVICES LINKS Product Review Stylus Studio XML IDE
Providing tools to work efficiently with XML
By: Vijay Phagura
Oct. 10, 2007 02:45 PM
Extensible Markup Language, more popularly known as XML, has found its uses in many areas of software products. Though XML offers a lot of features and uses, it's hard to develop with and maintain without good tools. This review discusses such a tool that would help XML and Java developers use XML efficiently.
Once you download it, it is a simple install. During installation, it will ask the usual questions about the directory location but you can choose the defaults that it provides. Once it's installed and you have launched it, it will ask for the license key and some registration info. Doing all that will bring up the first screen as shown in Figure 1.
Document Creation
There are many more wizards that the Stylus Studio provides such as converting an XSD to XML document, and DTD to XSD. See Figure 2 for a snapshot of the wizard.
XML Editing Stylus Studio automatically provides multiple views of an XML file in different tabs. Three types of views are provided: text, tree, and grid. These views are helpful during development. Figure 3 and Figure 4 show the tree and grid views. The actual XML file is presented in Listing 1. An XML schema or a DTD can be easily attached to an XML document and the document can then be validated by clicking the validation button. As soon as a document is attached to an XSD or DTD, the document is validated immediately and the user is made aware of any violations present in the document. This makes it very easy for the user to detect errors and correct them at runtime as they are creating or viewing the XML document.
XML Schema In Figure 5, the editor shows an accurate graphical view of the XSD, making it very easy to edit and debug. Apart from the presented view of the XSD, Stylus Studio also provides a tree view. A really smooth feature of Stylus Studio is the documentation of the XSD. Any developer would know how tedious and frustrating it is to document an XSD. With Stylus Studio, it's easy and it generates the entire basic XSD document. The XSD can be attached to any XML document and then validated by clicking on the validation button. Any errors the XML might have are clearly displayed.
XQuery and XPath Here is an example XQuery:
for $c in //books/book This query is on the books.xml in Listing 1 and returns the subject of the book by author "Tyler Jewell"; the result of this query is shown in Figure 6. Figure 6 also shows Stylus Studio's various panes. As seen in the left-hand side of the Preview pane there are various views and execution buttons. Also, note that the execution of this query is for a particular scenario that is Scenario 1. Stylus Studio allows you to define multiple scenarios so you can evaluate different factors that might influence query performance, such as the source XML file and XQuery processors. Stylus Studio supports numerous XQuery processors, including DataDirect XQuery, which is specially optimized to execute XQuery against relational data. In this example, I used the Saxon 8.9.0.3, another popular XQuery processor supported by Stylus Studio. The XPath/XQuery debugger is accessible to the user by clicking the "bug" button. Breakpoints can be easily scattered over a query by toggling them and the user can start debugging. The Java code for the example XQuery can be generated by Stylus Studio, which can be used as a standalone program or in any other application. Listing 3 shows the Java file generated by Stylus Studio, with appropriate comments in the code about the JARs it needs. As a bonus, Stylus Studio can compile and execute the Java code it generated. Also, users can use the debugger provided by Stylus Studio to debug the Java code.
Summary Stylus Studio is very easy and intuitive to use as the Java IDEs. If you are a Java developer and use Eclipse or other IDEs, using Stylus Studio will come naturally to you
Test Environment
References SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK |
||||||||||||||||||||||||||||||