Showing posts with label xml feature pack. Show all posts
Showing posts with label xml feature pack. Show all posts

Monday, April 18, 2011

XML Feature Pack Tech Preview Available

Just in time for IBM Impact, the IBM XML team cranked out an updated tech preview of the XML Feature Pack with three key new features.

First - XQuery modules is a way to break up larger XQuery based programs into modular units. This was the last optional feature of XQuery not yet supported and rounds out the XQuery 1.0 support. Not only does this feature help you break up your own XQuery programs, but it also allows you to use open source XQuery libraries such as FunctX.

Next is support for easier to bind Java functions. In previous releases you could binding to existing Java logic and data, but now binding to existing Java logic is even easier. The support is common across both XSLT 2.0 and XQuery and supports invocation of both instance and static methods. Here is an example that I showed at Impact:


package org.company;

public class Calculator {
public static int sqrt(int val) {
return (int)Math.sqrt(val);
}
}



<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xltxe="http://www.ibm.com/xmlns/prod/xltxe-j"
xmlns:calc="http://com.example/myApp/calculator">

<xltxe:java-extension prefix="calc“ class="org.company.Calculator"/>

<xsl:template match="/">
<xsl:value-of select=“calc:sqrt(64) "/>
</xsl:template>

</xsl:stylesheet>


You can see in the XSLT that using our extention, we were able to map any functions starting with calc to Java calls to org.company.Calculator. Specifically the function sqrt was called in this example. With this support, no Java code is needed to link existing Java logic to an XSLT or XQuery program.

Finally, we spent alot of time on runtime error messages. We have made sure that error messages now include line and column numbers that help you track back to the error that caused execution to fail.

You can read more about these features on developerWorks and download the tech preview from the IBM download site.

Tuesday, October 5, 2010

Joint WAS XML Feature Pack and DB2 pureXML Article on FpML Lives

I've mentioned this work a few times on the blog, so I wanted to make sure people saw the final article on DeveloperWorks.

Programming XML across the multiple tiers, Part 2: Write efficient Java EE applications that exploit an XML database server

This article uses the example of Financial Products Markup Language (FpML) to show how to program realistic native XML across the Application Server and DB2 pureXML. It shows how you can use one consistent programming model (XQuery) and one consistent data model (XML) across data access, transformation, and filtering across both the mid tier and database tier. Using this one data model which doesn't require mapping to Java objects should increase the agility of your XML centric applications as no mapping code needs to be generated or maintained across both tiers.

Even though the article is based upon FpML (which is really useful to the financial sector), the concept is applicable to all industries that have substantial amounts of XML data.

The article has code attached (both a Rational Application Developer ear project and Eclipse/ANT builds) and database load scripts, so you can play with the code to see how it works. All you need to do is define the JDBC resources to point to your DB2 instance. I also have a virtual image for this based upon the free of charge WebSphere Application Server For Developers and DB2 Express-C in case you're interested.

Friday, August 13, 2010

A view from the road

It's been a very long time since I blogged. Twitter seems to keep me from thinking about blogging as often. Also, I've been hitting a second travel season.

Last week I was at Balisage 2010 talking about Web 2.0 and XML discussing how to introduce MVC frameworks into DOJO (and other Web 2.0 widget libraries) that provides all sorts of interesting value add to DOJO. Also once MVC is in place, XML centric models integrate better into the browser. Specifically I discussed Ubiquity XForms. The goal of this work would be a clean XML story of storage to mid tier joins and query that exposed REST/XML in its original form to the browser. This avoids having to write XML to POJO to JSON conversion routines for data that originates and is stored in XML - a common case in many clients I talk to.

This week, I've been between New York and New Jersey. I've been hearing about how the financial and insurance industries work with XML. I've heard about how enterprise content management systems and data storage systems are closely related. I've heard about how XQuery as a general purpose programming model on top of such data is being used. However, I've heard of challenges that relate in linking systems together. I've also heard that having "hybrid servers" that allow XML to bridge into relational and Java systems and JSON is important. Finally, I built a nice VMware based demo of FpML processing across DB2 pureXML and the WebSphere XML Feature Pack. If you're interested in seeing how to efficiently program native XML end to end (whether you're into FpML or not), let me know and we can arrange a demo.

Thursday, May 27, 2010

XQuery: Powerful, Simple, Cool .. "Demo"

At IBM Impact this year, I did talks about the XML Feature Pack as well as basic introduction to the XPath 2.0, XSLT 2.0 and XQuery 1.0. I think one of the most useful parts of my talk was when I demoed code in XQuery. I found that people really saw the light (how simple and fully functioned XQuery is) once people saw the code in a useful application. Also, people that were experienced with XPath 1.0 appreciated the new features and people who had experience with XSLT 1.0 appreciated the syntax (closer to imperative coding). The application I used in the demo was the download stats program I have blogged about before. Let me take a second to do the same "demo" here.

First, I have an XML input file of all the downloads over a certain time period. That XML file could come from a web services, a JMS message, or be loaded from a XML database. The data looks something like:


<?xml version="1.0" encoding="UTF-8"?>
<downloads>
<download>
<transaction>1</transaction>
<userid>user1</userid>
<uniqueCustomerId>uid-1</uniqueCustomerId>
<filename>xml_and_import_repositories.zip</filename>
<name>Mr. Andrew Spyker</name>
<email>user@email.com</email>
<companyname>IBM</companyname>
<datedownloaded>2009-11-20</datedownloaded>
</download>
<!-- more download records repeating -->
</downloads>


First I want to quickly get rid of all downloads that have "education" in the filename. Next I want to split the downloads that come from IBM'ers (email or company has some version of IBM in it) vs. the downloads that come from clients. Of those groups, I want to quickly group repeat downloaders (by uniqueCustomerId). I won't include it here, but I've show how to write some of this with Java and DOM in the past. It's sufficient to say that this code is very complex (imagine all the loops through the data you'd write for each of these steps). Let's look at these steps in XQuery:


(: Quickly get rid of education downloads :)
declare variable $allNonEducationDownloads := /downloads/download[not(contains(filename, '/education/'))];

(: Split the IBM downloads from non-IBM downloads :)
declare variable $allIBMDownloads :=
$allNonEducationDownloads[contains(upper-case(email), 'IBM')] |
$allNonEducationDownloads[contains(upper-case(companyname), 'IBM')] |
$allNonEducationDownloads[contains(upper-case(companyname), 'INTERNATIONAL BUSINESS MACHINES')];

(: Get the unique IBM downloader id's :)
declare variable $allIBMUniqueIds := distinct-values($allIBMDownloads/uniqueCustomerId);

(: Get the non-IBM downloads :)
declare variable $allNonIBMDownloads := $allNonEducationDownloads except $allIBMDownloads;

(: Get the unique non-IBM downloader id's :)
declare variable $allINonIBMUniqueIds := distinct-values($allNonIBMDownloads/uniqueCustomerId);


I think the most powerful line of the above code is the "except" statement. In that one quick statement, I can quickly express that we want to take all the downloads and remove the IBM downloads which leaves us with the non-IBM downloads. I think it's quite impressive that XQuery expresses the above statements in about the same amount of lines as the English language I used to describe the requirements.

Additionally, since you are telling the runtime what you want to do instead of how you want to do it, our runtime can aggressively optimize the data access in ways that we couldn't if we had to try to understand the Java byte codes were doing on top of the DOM programming model. Also, since XQuery is functional (the above variables are final) we could span this to multi-core more safely than imperative code as we can guarantee there are no side-effects. This is why, as a performance guy, I think declarative languages are a key to the future of performance.

Back to the code. For people used to XPath 1.0 and its lack of all the built-in schema types, dealing with things as simple as dates was problematic (they were just strings). Here are a few functions that show, with schema awareness, XPath 2.0 and XQuery 1.0 are much more powerful than before:


declare function my:downloadsInDateRange($downloads, $startDate as xs:date, $endDate as xs:date) {
$downloads[xs:date(datedownloaded) >= $startDate and xs:date(datedownloaded) <= $endDate]
};

declare function my:codeDownloadsInDateRange($downloads, $startDate as xs:date, $endDate as xs:date) {
let $onlyCodeDownloads := my:onlyCodeDownloads($downloads)
return my:downloadsInDateRange($onlyCodeDownloads, $startDate, $endDate)
};


These two functions give me a quick way to look for "code" downloads within a date range. In the first function, it's very easy to understand that this functions take the downloads and returns only the subset that has a datedownloaded that is after the start date and before the end date. In the second function, you can see it's easy to call the first function. At this point, I think most Java programmers might be saying "this isn't like what I expected based on my previous work with XSLT". While XSLT is a great language for transformation (XSLT 2.0 even better), I think XQuery gets a little closer to a general purpose language with the ability to declare functions and variables in a more terse syntax.

Finally, let's cover two more important powerful features - FLOWR and output construction. Once I have sliced and diced the data, I need to output the data into a XML report. XQuery gives you a very nice way to mix XML and declarative code as shown below:


declare function my:downloadsByUniqid($uniqid, $downloads) {
for $id in $uniqid
let
$allDownloadsByUniqueId := $downloads[uniqueCustomerId = $id],
$allCodeDownloadsByUniqueId := $downloads[uniqueCustomerId = $id and (contains(filename, 'repositories'))]
return
<downloadById id="{ $id }" codeDownloads="{ count($allCodeDownloadsByUniqueId) }" >
<name>{ data($allDownloadsByUniqueId[1]/name) }</name>
<companyName>{ data($allDownloadsByUniqueId[1]/companyname) }</companyName>
<codeDownloads>
{
for $download in $allCodeDownloadsByUniqueId order by $download/datedownloaded return
<download>
<filename>{ data($download/filename) }</filename>
<datedownloaded>{ data($download/datedownloaded) }</datedownloaded>
</download>
}
</codeDownloads>
</downloadById>
};



This shows how you can create new XML documents and quickly mix in XQuery code. Some people I've talked to think this looks like scripting languages in terms of simplicity. Also, you'll see a For ($id in $uniqid) Let ($allDownloadsByUniqueId, ohters) Return (downloadsById). These three parts make up part of what people call FLOWR (and pronounce flower) which stands for for, let, order by, where, return. The FLOWR statement is a very powerful construct -- able to do all the sorts of joins of data you're used to in SQL -- but in this example I've chosen to show how it can be used to simplify code in the general case where joining data wasn't the focus. For Java people, think of it as a much more powerful looping construct that integrates all the power of SQL for XML.

In the end, I have a 200 line program that takes all the download reports and organizes them by unique IBM vs. unique non-IBM ids and produces a month by month summary. I'd be surprised if you could come up with anything shorter and more maintainable that worked with Java and DOM. I hope this "demo" encourages you to consider using XQuery in your next project where you need to work with data.

Finally, if you find people trying to convince you that XQuery isn't capable enough to be a general language, take a look at a complete ray tracer written in XQuery in a mere 300 lines of code (a real statement of XQuery's power and brevity).

PS. You can download this XQuery program here and some sample input here. You can run them by getting the XML Feature Pack thin client here. The thin client is a general purpose Java based XQuery processor that you can use for evaluation and in production when used with the WebSphere Application Server. All you need to do is download the thin client, unzip and run the below command:


.\executeXQuery.bat -input downloads-fake.xml summary.xq

Wednesday, May 26, 2010

Why the -outputfile switch in XML Thin Client is useful

A simple tip...

I was recently working with a set of files that contained non-English Unicode characters and trying to process the data with XSLT 2.0 and XQuery 1.0. I was using the Thin Client for XML that is part of the XML Feature Pack which offers J2SE and command line invocation options for XSLT and XQuery when used in a WebSphere environment.

I did something like:


.\executeXSLT.bat -input input.xml stylesheet.xslt > temp.xml
.\executeXQuery.bat -input temp.xml query.xq > final.xml


And this resulted in something like:


... executeXSLT "works" fine ...
... executeXQuery "fails" with ...
An invalid XML character (Unicode: 0x[8D,3F,E6,8D]) was found in the element content of the document
.
An invalid XML character (Unicode: 0x[8D,3F,E6,8D]) was found in the element content of the document
.


I figured something was wrong with the encodings in the XSLT output method or the xml encoding of the files themselves or -- worse yet -- something wrong with our processor. After some quick thinking by my excellent team, they had me replace the output redirection (where my OS and console got a chance to see/mess with the data between the processor and temp.xml) with the -outputfile option (which allows the processor to directly write to the file) like:


.\executeXSLT.bat -input input.xml -outputfile temp.xml stylesheet.xslt
.\executeXQuery.bat -input temp.xml -outputfile final.xml query.xq


Problem solved. No corruption of the data.

Lesson learned: Keep all the data inside of the processor and don't introduce things (like the Windows Console) into the pipeline that won't honor (or know) the encoding.

Wednesday, April 7, 2010

XML Feature Pack 1.0.0.3 Available

I'm happy to announce another major update to the XML Feature Pack and its impact on our development tooling - Rational Application Developer for WebSphere.

We just released the 1.0.0.3 version of the XML Feature Pack that has two major new features (as well as some small bug fixes). The two new features are:

XQuery Schema Awareness



In the initial release we had Schema Awareness for XSLT 2.0. In this release we add similar function to XQuery. Specifically this means we started to support the optional XQuery 1.0 features of schema import and schema validation. With these features you can use your own type information in XQuery programs. A common scenario would be looking for all addresses in an input document, regardless of they were "billingAddress" or "shippingAddress". Programming based on type information is a powerful concept that leads to more flexible implementations. Also, validation allows you to validate incoming documents, xml trees and whole output documents. This allows for greater reliability in your XML processing.

Debugging support for XSLT 2.0 under Rational Application Developer (RAD) for WebSphere



Previously with RAD you could debug XSLT 1.0 stylesheets. With this new release of the XML Feature Pack and with RAD 7.5.5.1 you can debug XSLT 2.0 stylesheets. This isn't just about moving to a newer stylesheet level. With all the changes in the data model and advanced new concepts like grouping, there are many improvements in visualization with debugging over the XSLT 1.0 debugger.

What is also interesting is that this is a converged debugger. While there are other XSLT 2.0 debuggers out there, they only work on the stylesheet itself. With this support in RAD, you can debug not only the stylesheet, but also the Java code in your web application that invokes the XSLT engine along with any Java extension functions you might have. If you are using XSLT 2.0 in the application server, this is the tool you want for debugging end to end.

I hope to do a video demo of this Rational Application Developer functionality. Imagine setting breakpoints in XSLT as well as Java and being to jump between them. Anyone interested in seeing such a video demo?

Have fun with the new functions!

Wednesday, March 31, 2010

Programming XML Across Multiple Tiers

In the XML Feature Pack, we ship a sample that shows how to use XML centric programming in the middle tier. The sample shows how to unlock data in Web 2.0 ATOM XML encoded feeds using XQuery and present the data in a typical web application using XSLT. As an extension to this sample, we also have a sample that shows how to persist data from these feeds into an XML Database such as DB2 pureXML or Apache Derby. We included this example as we found, frequently, that people working with XML centric programming typically had large XML datastores in XML centric databases.

While the sample is there, with source code, in the XML Feature Pack, we don't explain why we coded the sample the way we did. In this new developerWorks article (Programming XML across the multiple tiers: Use XML in the middle tier for performance, fidelity, and development ease), we go into detail why for simplicity, performance, and flexibility reasons we coded the sample the way we did.

The article is worth a read. It will walk you through the new features in the XML Feature Pack and JDBC 4.0 that allow an end to end native XML programming model across the XML Feature Pack and an XML database. We hope to expand this article over time to cover more advanced concepts when working with XML databases.

Finally, here are two quick videos that show how to get the sample working with DB2 pureXML and Apache Derby.

DB2 pureXML (Part 1/2)
Direct Link (HD Version)

Apache Derby (Part 2/2)
Direct Link (HD Version)

Monday, February 22, 2010

XPath, XSLT 2.0 and XQuery 1.0 in five minutes

You may remember a similar demo back in the open beta timeframe. Now, the IBM Thin Client for XML with WebSphere Application Server v7.0 is available based upon the shipping version of the XML Feature Pack. The following video will show you how to get up and running in about five minutes (including download time).

The thin client for the XML Feature Pack allows you to use the XPath 2.0, XSLT 2.0, and XQuery 1.0 runtime in your client applications of the application server using the same API's as when running in the application server. Before, you could get the thin client by installing the XML Feature Pack on top of the application server. Now, we've made the thin client separately downloadable which makes prototyping very simple.

Here are the links shown in the demo:

Direct link to download the thin client, Demo files

XML Feature Pack Thin Client Demo



Direct Link (HD Version)


Please note that the thin client is only supported on Java 1.6 JVM's.

Wednesday, February 17, 2010

Simple XQuery execution in Eclipse using XQDT/XML Feature Pack

I recently was shown that the current version of XQDT works with the XML Feature Pack. XQDT is working to become a main Eclipse project, currently under incubator. You can follow the instructions here on how to install .

After installing, here is how to setup the right things to make it call the XML Feature Pack:

1. Setup the interpreter to point to the XML Feature Pack thin client (note you can obtain the thin client from here for evaluation, or obtain it from a XML Feature Pack installation)
2. Create a new XQuery project
3. Setup the run as XQuery options to set the input file
4. Run and view the output

This will get you to a place where you can quickly edit and run XQuery programs. It won't allow you to debug and doesn't integrate with your Rational Application Developer projects, but for quick edit/run/fix development of XQuery it does a decent job. Its worth noting that this is something I discovered as working and given you get this from Eclipse/open source, there is no IBM support. However, if you give it a try and have some feedback, post it on the forum and I'll get it back to our tooling teams.

In the spirit of another big post, here are some images that show these steps, using the locations.xml and simple.xq that I used in this previous post.

To setup the interpreter to point to the XML Feature Pack thin client, load up Windows -> Preferences and navigate to XQuery -> Interpreters and click Add.



The settings to put into the dialog are:


Interpreter type: Java XQuery Engine
Interpreter name: XMLFEP
Interpreter JAR/WAR: C:\ibm\WebSphere\AppServer\feature_packs\xml\runtimes\com.ibm.xml.thinclient_1.0.0.jar
Main class: com.ibm.xml.xci.internal.cmdline.ExecuteXQuery
Interpreter arguments: ${query_file}


And it looks like this:



Next you need to create an XQuery project. It would be nice if you could use this functionality outside of an XQuery project, but I haven't been able to get that to work yet. You can create a new project by right clicking the project window New -> Other -> XQuery -> XQuery Project. Give it whatever name you want. Make sure you pick the XMLFEP (or whatever you named it) as the default interpreter. This looks like this:



Next, copy the simple.xq and locations.xml into your project and refresh. Once you have done that you should be able to right click on simple.xq and do Run As->Run Configurations.... That looks like this:



Once you're in there, navigate to Arguments. You can add any command line options here, but most importantly you want to add the -input parameter and point it to the input file (locations.xml in this simple sample). That looks like this:



Once you have this setup, you can Run the XQuery file in the project by right click Run As->XQuery or simply Control-F11. If it all is setup right, you'll see the output in the console window. That should look like this:



Update 2010-02-22: Note that if you have Java 1.5 on your path, make sure you replace it with Java 1.6. Otherwise you'll get an error about invalid class formats or magic numbers since the thin client only supports Java 1.6 JDK's. You can tell if your system have Java 1.5 on the path by opening a command prompt or shell and typing java -fullversion. Hopefully XQDT at some point will allow you to control what Java the execution is run on instead of defaulting to the global path version of Java.

Update 2010-10-06:

XQDT has moved to WTP Incubator at Eclipse. The XQDT team just release a new milestone, which in particular brings compatibility with the latest Eclipse Helios (Eclipse 3.6). For more details changes, go look at the New and Noteworthy page on the Eclipse web site:

http://wiki.eclipse.org/XQDT/New_and_Noteworthy/0.8.0

To install the latest XQDT build from Eclipse, make sure to stop using the old XQDT update site. Instead use the Eclipse update site:


http://download.eclipse.org/webtools/incubator/repository/xquery/milestones/

Monday, February 8, 2010

Some Learning Experiences with XQuery/XSLT2

While working on a demo of XQuery, I ran into issues with the following things and wanted to share in case others new to XQuery could benefit. The demo was the first time I linked XQuery to Web 2.0 (was populating DOJO graphs from XML data) in an application.

First, DOJO is based upon JavaScript. When you write an XQuery that generates a dynamic web pages that mixes XQuery and DOJO, you need to be careful of the "{" character. JavaScript structures love to use the "{" character, as does XQuery. XQuery allows you to escape the "{" character by using "{{" (similarly for "}"). This isn't a huge issue once you realize what is going on as the XML Feature Pack will complain when compiling a XQuery + JavaScript program telling you that some XQuery script subsection isn't valid (its trying to interpret the JavaScript structure as XQuery).

Second, similar to a problem I had before, you have to be careful with namespaces. I had something like:


<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>Title</title>
</head>
<body>
{
for $i in /some/path/in/input/document
return $i
}


And the some path in input document wasn't returning any data, even though I knew there was data at that path. The issue here is documented in the spec. The default namespace of xhtml in the direct constructor becomes the default namespace for the path step elements. I found the simplest way to fix this was to move the path logic into a declared function that was outside of the direct constructor where the XHTML default namespace wasn't in scope. I could have also re-declared the default namespace or prefixed all xhtml nodes, but that wouldn't look as clean.

Speaking of declared functions, I also was tripped up for a little bit by the fact that declared functions don't get the same context passed to them automatically as the does the main execution of the same module. This exhibited by the runtime telling that the path I was executing was invalid as the context was unknown. Again the spec tells me that the context is undefined. In order to deal with this, you just need to pass the context of interest to the function and have all relative paths work off of the passed context.

Finally, I did get tripped up on XSLT 2.0 as well. When running a stylesheet that took no direct input, I mistakenly called setXSLTInitialMode (good for defining multiple paths through a XSLT 2.0 stylesheet) instead of setXSLTInitialTemplate (good for loading data from multiple input docs or unparsed text, etc.). Luckily, the errors of IXJXE0793E and ERR XTDE0045 came out in the logs and helped me spot the code completion generated typo.

Hopefully some small help if, like myself, you're working to use XQuery/XSLT 2.0 more and more in your ever day coding. Now, if I could just stop typing ";" at the end of XQuery let statements.

Friday, January 8, 2010

External Coverage of XML Feature Pack

Last year InfoQ did a nice article on the XML Feature Pack. The article does a good job of talking to application scenarios where the new XPath 2.0, XSLT 2.0, and XQuery 1.0 standards are valuable. It also talks about why native XML programming is better for performance, multi-core, and cloud strategically as compared to object oriented imperative approaches. The article also mentions comparisons to other technologies.

Today, Dustin Amrheim, wrote an article that focused on the declarative vs. imperative comments in the InfoQ article and talked about how this matters in the cloud. He argues that this is an interesting approach as compared to packaging existing imperative programming models.

Both are worth a read.

Friday, December 18, 2009

RAD 7.5.5 adds support for XPath 2.0 and XSLT 2.0

Today, RAD 7.5.5 became available. Of interest to WebSphere XML customers, you'll see major new function in the XML areas to complement the features provided by the Feature Pack for XML.

IBM Rational Application Developer 7.5.5 provides enhancements to the existing XSLT 1.0 and XPath 1.0 authoring tools to support XSLT 2.0 and XPath 2.0, as well as the ability to program against the new IBM XML API and invoke the XML runtime provided by the WAS Feature Pack for XML. Developer benefits include: the ability to work seamlessly with XSLT 1.0 and 2.0 artifacts using a consistent set of tools, the ability to author - create, edit, validate - XSLT 2.0 artifacts, the ability to invoke the XSLT 1.0 or 2.0 processor with ease using the enhanced XSLT launch configuration and the ability to easily configure a project's classpath to program against the new XML Application Programming Interface.

There is more info on what's new here.


- You can now compile and integrate XSL 1.0 and 2.0 stylesheet documents into Java projects. This new functionality automatically handles classpath and runtime configurations. Also, a new option is available to incorporate a Java utility class is offered so that you can integrate compiled stylesheets.
- The Expression Builder tool in the XSL Editor now supports as-you-type evaluation for XPath 1.0 and 2.0.
- The XSL Editor now supports grammars for XSL versions 1.0 and 2.0. Content assist has been enhanced to incorporate better prefix handling, customized icons and detailed descriptions for all XSL element suggestions. Version sensitive file decorations are now available for XSL documents.
- You can now run XSLT 2.0 transformations.
- Content assist for XPath 2.0 and XSLT 2.0 functions in the XSL editor and XPath Expression Builder is now available.
- The XSLT validator now supports both XSLT 1.0 and XSLT 2.0, and provides build, manual and as-you-type validation. The validator helps you ensure that your XSLT documents are correct according to the XSLT 1.0 or 2.0 specifications.
- XSL templates are now available that can be added to new XSL files from the New XSL wizard. The templates can also be inserted into XSL files through the content-assist feature in the XSL editor.
You can modify the XSL templates through XML preferences page (Window > Preferences > XML > XSL> Editor > Templates).
- A new XSLT 2.0 sample is available that demonstrates the XSLT 2.0 transformation using context menu and Java code.


There are many other improvements and new features in RAD 7.5.5 and I expect Tim or I will blog about them in an upcoming blog post.

Thursday, November 26, 2009

WebSphere XML Feature Pack V1.0 Released

I'd proud to announce that we released the XML Feature Pack which means it's ready for production deployment in WebSphere Application Server 7.0 environments.

The WebSphere Application Server V7.0 Feature Pack for XML 1.0.0.0 provides an XML programming model that has support of the W3C XML standards of XSLT 2.0, XPath 2.0, and XQuery 1.0. These newer standards provide developers with innovative capabilities for simplified development of XML-based and document-centric applications. The programming model consists of two parts:

- The new XML Transform and Query (XPath 2.0, XSLT 2.0, and XQuery 1.0) runtime which has been optimized for performance, runs under Java 2 security, has an thread-safe model appropriate for server environments, and provides for reliability, availability, and serviceability.

- A new API to invoke all three languages that allows applications to navigate, transform or query XML from a single consistent Java API. This API also allows the XML runtime to incorporate existing Java business logic and data.

Other important parts of this feature pack are:

- The IBM Thin Client for XML with WebSphere Application Server provides all the same functionality in J2SE clients that are used in WebSphere Application Server environments.

- The samples (with easy to browse source code) which show over 40 different aspects of the new XPath 2.0, XSLT 2.0, and XQuery technologies, three end to end web applications that show how to use these technologies to navigate, transform, and query XML atom blog feeds, and an end to end web application that shows how to integrate data from databases that support XML natively with other XML data sources in the most simple and performant way.

- Command line and ANT tools for pre-compiling XML artifacts for optimal performance

- Command line tools for simple execution of XML artifacts

- The Information Center for complete documentation of the XML Feature Pack

I will be posting all links to public information on the XML Feature on this blog post. Already, there is a video that shows how to get the XML Feature Pack installed (including the samples), so you can get started easily.

Update 2009-01-18: Rational Application Developer 7.5.5 tools add support for XPath 2.0 and XSLT 2.0.

Tuesday, November 24, 2009

WebSphere Application Server Feature Pack for XML Links

As I talk to folks about the WAS Feature Pack for XML, I usually need a single link to all public information. There was a open beta link like this but now the open beta is closed. This blog post will be updated over time to include all links that are important for the XML Feature Pack.

Main Links
- Quick Blog Overview of XML Feature Pack
- New Features Added in XML Feature Pack 1.0.0.3 (XQuery Schema Awareness, XSLT 2.0 Debugging Support)
- New Features in XML Feature Pack 1.0.0.9 Tech Preview (XQuery Modules, easier to bind Java functions, better error messages)
- XML Feature Pack website

Installing on the application server
- Install WebSphere Application Server for Developers
- The If network connected, install IBM Installation Manager for WebSphere and update
- If behind firewall, download repository and install locally

Obtaining the simple Thin Client
- Download the thin client
- Download tech preview of latest thin client

Documentation
- XML Feature Pack Infocenter
- Javadoc for XML Feature API

Tools
- Rational Application Developer 7.5.5 XSLT 2.0 support
- Simple XQuery execution with XQDT

Video demos
- How to install and get running with XML Feature Pack samples
- Using the thin client to get up and running in five minutes
- IBM Education Assistant video on the XML Feature Pack 1.0
- Using the XML Feature Pack with an XML Database

Industry Coverage
- InfoQ article that overviews the XML Feature Pack contents and makes comparisons to other related technologies

Developerworks Articles
- Programming XML across the multiple tiers: Use XML in the middle tier for performance, fidelity, and development ease
- Programming XML across the multiple tiers, Part 2: Write efficient Java EE applications that exploit an XML database server

W3C Specifications
- XPath 2.0
- XSLT 2.0
- XQuery 1.0

Great books on the standards
- XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)
- XQuery

Last updated: 2009-02-23 (added XQuery tools and thin client information)