Showing posts with label xpath. Show all posts
Showing posts with label xpath. Show all posts

Thursday, April 8, 2010

Looking for XPath/XSLT/XQuery Education?

Last year, I attended the XML-In-Practice 2009 conference. One person I met there is Ken Holman. Ken works for Crane Softwrights Ltd. which is a consultancy delivering computer systems analysis and training services with focus in structured text processing related to XML and SGML including XSL/XSL-FO, XSLT, XPath and XQuery, and UBL.

Ken and I have been collaborating recently on enabling the hands-on in-depth XSLT/XQuery classes offered to use the IBM Thin Client for XML with WebSphere Application Server V7.0. Now students with the feature pack can quickly configure Crane's exercises to utilize the latest XSLT/XQuery support from IBM.

The three upcoming publicly-subscribed deliveries for XSLT/XQuery are:

West-coast North America: April 26-30, 2010 - San Francisco area

East-coast North America: May 10-14, 2010 - Ottawa, Canada

Europe: June 7-11, 2010 - Trondheim, Norway

Ken travels the world teaching a number of XML-related classes both privately and publicly. He is willing to consider teaching anywhere and he welcomes anyone to contact him regarding a possible private or public class of any of his material. Ken has taught and offers other classes. You can see them here.

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.

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)

Wednesday, November 11, 2009

XML Feature Pack, SCA Refresh, and SAML get a date

Yesterday, IBM announced the dates for the XML Feature Pack, a major update to the Service Component Architecture Feature Pack, and SAML support in the WebSphere Application Server.

Borrowing from the announce letter:


New WebSphere® Application Server V7 capabilities promote application innovation and efficient development and management through updated Service Component Architecture (SCA) support, new XML programming model standards, and support for secure, interoperable Web services using SAML1 Token:


  • Key updates to SCA programming model support for composite application assembly and service deployment through the WebSphere Application Server V7 Feature Pack for SCA V1.0.1 Refresh

  • Support for the XSLT 2.0, XPath 2.0, and XQuery 1.0 programming model standards to benefit XML application development scenarios through the WebSphere Application Server Feature Pack for XML

  • Support for OASIS Web Services Security SAML Token Security Profile 1.1 standard delivered in the WebSphere Application Server V7 Fix Pack 7 (7.0.0.7)




XML and SCA will be generally available on November 20th, and SAML will be available on November 13th. Hopefully you can try these out over the holiday season and be ready for deployment next year.

Wednesday, October 21, 2009

Speaking at RTP WUG Next Week

If you're in the Raleigh/Durham area come to hear about the XML Feature Pack at the RTP WebSphere User's Group (WUG) on Tuesday. I'll be speaking through dinner to talk about what XPath 2.0, XSLT 2.0, and XQuery 1.0 bring to the table for JEE programmers, what features are in the XML Feature Pack Beta and how to get started. After that there will be a hands on session with WebSphere sMash.

Ryan Boyles from the WebSphere sMash team wrote up a great article that tells you how to get registered and maps to the location, etc here. Hope to see all my "local" people there.

Tuesday, September 15, 2009

XML Feature Pack Thin Client Demo - Zero to running in 6 minutes

NOTE: This post is our of date. For the same demo on the released product see this link

As we announced, the latest beta release of the XML Feature Pack contains the Thin Client for XML. As well as allowing you to use this in your client applications to WebSphere Application Servers, the thin client allows for quick and easily evaluation of the technology. Here I show a quick demo of using the following simple XML, XPath, XSLT and XQuery files along with Java files to invoke them.

Demo 7 - XML Feature Pack Beta 4 Thin Client for XML


Direct Link (HD Version)


Here are the files for the demo:

thinclientdemo.zip


Which contains (HelloXSLT.java, HelloXQuery.java, HelloXPath.java, simple.xsl, simple.xq, locations.xml)

Monday, September 14, 2009

XML Feature Pack Beta 4 - Now With Thin Client

A month ago, we announced the Beta 3 refresh which was specification complete on XPath 2.0, XSLT 2.0, and XQuery 1.0. On Friday we released a Beta 4 refresh which continues to remove any remaining restrictions as well as adds one new major feature - The Thin Client for XML with WebSphere Application Server.

As noted on the open beta download page,

The beta includes the IBM Thin Client for XML with WebSphere Application Server. The thin client allows access to the same Feature Pack API and runtime functionality (XPath 2.0, XSLT 2.0, XQuery 1.0) available in the WebSphere Application Server Feature Pack for XML. The thin client can be copied to multiple clients running Java SE 1.6 in support of a WebSphere Application Server V7.0 installation.


This means if you have client applications to WebSphere Application Servers you can copy the XML Feature Pack thin client file to these clients and get the same XML programming model support in your clients.

We also believe this thin client support will help "new to WebSphere" folks evaluate this technology. As such, we have added a download link to the jar file on the open beta website. Click on that link and then click on "Local install using Download Director or HTTP" and follow through to download "IBM Thin Client for XML with WebSphere Application Server
com.ibm.xml.thinclient_1.0.0.jar". I hope to show a demo of how fast you can get up and going with the thin client in the next day or so.

Saturday, September 12, 2009

Hidden nodes in XPath - fail on namespaces by me

I was working on a sample with the XML Feature Pack last week to show good integration between the XML Feature Pack Beta and databases that support XML columns, such as DB2 pureXML.

I ran into an issue that stumped me for a while and wanted to write about it so maybe others won't be slowed down as long as I. I was writing a XCollectionResolver and XResultsResolver that connected to the database. For some reason, while these resolvers returned data that looked valid, they couldn't be navigated by XPath 2.0. I saw things like this is XQuery:

let $a := trace($domainSpammers/spammers/spammer/email, "email =")

Traced nothing, while

let $a := trace(node-name($domainSpammers/*/*/*), "threestars = ")

Traced email, uri, and name. I even put domainSpammers into the output of the XQuery and could see the spammers/spammer/email tree:

<spammers xmlns="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <spammer>
    <name>Joe Smith</name>
    <email>jsmith@email.com</email>
    <uri>http://joe.uri.com</uri>
  </spammer>
</spammers>

I looked at this for a few hours. Luckily one of my team members saw the issue. You can see by the title of this post and the above xml, the issue was the elements are in the XHTML namespace.

It turns out I was writing to the document from XSLT 2.0 using the new feature of multiple result documents. While I wanted my browser returned page to be in the default namespace of XHTML, I didn't want the data written to the database to be in the XHTML namespace. However, since I didn't clarify this, it mistakenly was written to that namespace.

Next time, and maybe this will help you, I'll add namespace-uri() to my debugging arsenal:

let $a := trace(
  (node-name($domainSpammers/*/*/*),
  namespace-uri($domainSpammers/*/*/*)), "threestars = ")

Which would clearly have shown that email was in the XHTML space:

a = email http://www.w3.org/1999/xhtml;

Which would have saved me a few hours of pulling my hair out.

Monday, August 24, 2009

Information Center for XML Feature Pack Beta Posted

In software development, it's not just about creating the runtimes and API's and install images. As a customer, information to help understand how to use the features of any product is as important or more important than the product itself. This is why we've spent so much time on creating samples for the XML Feature Pack. Today we go a big step further by releasing the XML Feature Pack Information Center.

The Feature Pack for XML Information Center is comprehensive documentation on the XML Feature Pack. The content of this documentation is live and can change as we get more information articles. If there are features you have questions on, please let me know and I'll ensure we consider updates for future updates. Also note that we have moved the Javadoc for the API to this information center.

Tuesday, August 18, 2009

Other XML Feature Pack Beta 3 Highlights

Yesterday I blogged about one of the major focus areas of the Beta 3 of the XML Feature Pack. In today's video demo, I show the other major items of note in Beta 3. The major features of Beta 3 are:

- Spec complete on XPath 2.0, XSLT 2.0, and XQuery
- Changes to the XML Feature Pack API to adjust for new features and results of usability studies
- Focus on development and deployment issues with full command line support to pre-compile XML artifacts for performance, ANT commands to do the same, and support for running with Java 2 Security enabled.
- As always, more samples. In addition to the end to end sample of XQuery I demoed yesterday, we have over 40 samples that show the new features of the new standards.

Here is the video that overviews these features:

Demo 6 - XML Feature Pack Beta 3 Highlights


Direct Link (HD Version)


For more information on the WAS V7.0 XML Feature Pack Beta, please go here to download the code, samples, documentation as well as see other demos.

Saturday, August 15, 2009

Download Stats Extreme Makeover - The Value of XSLT 2.0 and XQuery 1.0

On Friday, I had the opportunity to use XSLT 2.0 and XQuery 1.0 in a way that proved the value of the new standards.

For our Beta programs, we get a weekly report of how many downloads have occurred. Over time we have asked for more and more breakdowns of the data (how many were from IBM'ers vs. non-IBM'ers, how many were from non gmail/hotmail/etc email addresses, how many for code vs. how many for documentation, how many unique users have downloaded, etc.). We use these reports to gauge the interest in our betas and the effectiveness of our beta programs.

Currently the process for doing these reports is:

1. Load a webpage somewhere on the intranet that returns in either HTML or space and newline separated text the download records (and I don't have the time nor contacts to change this "service").
2. Import these download records into Excel
3. Write VBScript that processes the rows into summary tables, but not all summaries have VBScript written for them due to the fact that VBScript can get quite complicated.
4. Read the summary tables and hand compute some summaries and transpose them into emails and presentations to beta teams.

This process can take a few hours and is error prone.

I asked for the raw data for the service as I knew there had to be an easier way.

First I started with the HTML as its pretty much XML and I figured I could just write some simple XQuery summaries. This failed as HTML isn't XML (if its not XHTML). Don't get me started on that rant (in this case, we had things like width=-1 with no quotes)! So I restarted with the text file version of the data.

XSLT 2.0 has a new function - unparsed-text() that lets you load from text files. This allows you to load any data into XSLT 2.0, but only as a string. As the XSLT 2.0 specification shows the real power of this function is magnified by XPath 2.0's support of regular expressions. Combining the unparsed-text() with regex tokenize() with newline as the separator allowed me to for-each across every line in the file. Adding another new XSLT 2.0 function into the mix - analyze-string() with a regular expression that did capturing of each of the fields allowed me to transform each line into a well formed XML element with sub-elements for each of the fields (download element with elements for filename, email address, etc). Ah, now I have data in a well formed structured XML format. Life is good.

Once I had this transformation of the input data, I returned to the task of creating the summaries. With XQuery, any query I want is just moments away. To prove the point, I decided to write a simple query that would break down the downloads for IBM'ers and non-IBM'ers separately. I would also group each unique user and list all the downloads that user had done with summaries at all levels of how many code vs. how many documentation downloads had occured. I want to put this in XML format, so others could query my summaries or I could put the summaries into HTML or load back into Excel (if you really really want to).

It took me approximately 30 minutes to create all of the above queries. The code is approximately 20 lines long and is well designed into re-usable functions that could be customized later. The code is easy for most of my peer Java developers to understand as XQuery looks alot like an imperative language with SQL like queries mixed into templating of output.

My next step is to move this to a web application (what I did so far was prototyped it with sample data) that connects directly to the service. The web application could easily offer up web forms that allowed the user to specify search criteria supported by the back end service (date range for example) along with what XQuery/summary view was required.

There are still some items that can't be automated and need human intervention. As an example, the process of deciding what constitutes an IBM'er is complex as some IBM'ers have "ibm.com" email address and some do not. Also, IBM could be "IBM, International Business Machines, or mistyped". It would take a bit of time to create some services that approximate what a human eye could spot manually. Adding a human facing pop-up that allowed visual inspection of the automated data analysis steps would be valuable. Also, I admit that I didn't create the charts and graphs - just the raw data that could be loaded into Excel to create charts and graphs.

But in the end I have converted a manual error prone data processing scenario into an automated approach (for data query and summaries) that creates all the same valuable raw data for reports with the potential to add more reports much more quickly. All of this was made possible using well documented W3C standards that have all the needed features (some new with XPath/XSLT 2.0 and XQuery 1.0) that make this scenario possible.

Thursday, August 13, 2009

Specification complete on XPath 2.0, XSLT 2.0, XQuery 1.0 - Beta 3 of XML Feature Pack Released

I'm happy to announce another update of the XML Feature Pack. The first beta focused on XPath 2.0. The second beta focused on XSLT 2.0. This third beta rounds out the specs with support for XQuery 1.0.

Once we're not in beta, we'll post final numbers on the W3C website on the XML Query Test Suite conformance. Currently we're at 96.8% on minimal conformance and we have support for the optional full axis and serialization features. As for XPath 2.0, and XSLT 2.0, we consider this beta release to support all of the specifications with minor restrictions as listed in the getting started guide. This means that we now have support for all for the W3C recommended standards for Querying, Transforming, and Accessing XML data (except the less popular XQuery/X).

We have expanded the XML Feature Pack API to handle feedback from usability studies and to handle new features required by the standards.

We have focused on items that make the feature pack easier to use. We have made changes to allow the feature pack runtime to run under Java 2 Security, without requiring an application to enable any more security than minimally needed. We have expanded the options for the command line tools for pre-compiling xml artifacts. We have also added ANT tasks for integrating this pre-compilation support into your build scripts.

With the full standards support, updated API, and runtime and development time improvements, this feature pack release should be quite useful. In the next few days, I'll post some videos to demonstrate the new capabilities on YouTube. In the meantime, you can download the feature pack beta and join the web forums to ask questions.

Tuesday, July 28, 2009

Quick summary of Summer XML Conference

I attended the Summer XML Conference in Raleigh on Monday and Tuesday. I presented on what is new in XPath 2.0, XSLT 2.0, and XQuery 1.0 and how similar technologies are being used in Java based middleware.

I was a little worried, given the crowd, about how well the "what's new" presentation would go as a) I'm knowledgeable with the new standards, but don't use the standards in very large programs every day (some of the crowd were deeply knowledged XSLT 1.0 users) and b) it was the first time I've given the presentation. I did get two points of good feedback from the attendees, so I guess it better than I had hoped. I'm going to look to post the slides as they were information packed and other conference attendees said they would be useful for other members of their companies.

I, along with two of my team members, attended sessions on XSLT patterns, XML Schema 1.1, Schematron, HTML 5, XForms, SVG/Canvas, Testing XML Documents, and many presentations related to XML based document publishing for books and electronic help. The conference seemed to be 1/3 focused on XML technologies, 1/2 on document publishing with the rest being focused on data/application programming. Hopefully my talk on how these technologies are being used in middleware helps the group keep focus on XML scenarios outside of the document publishing space.

On the document publishing front, I learned even more than I ever imagined about what our documentation teams deal with on a daily basis. I also got great insight to the challenges of companies or parts of companies that deal entirely in products centered about content management and document re-use.

Summary: Great conference. Thanks to Kay and all the other conference presenters and attendees.

Thursday, July 2, 2009

Presenting At Summer XML 2009 Conference - Raleigh, NC - July27/28th

As I'm finishing up my presentations for this conference, I wanted to let you know about it. Please consider attending to hear my session and the other excellent presentations planned. Let me know if you're coming into town and we can meet up at the event.

Link: http://www.aboveandbeyondlearning.com/xmlconference.html

Session 1: XPath 2.0, XSLT 2.0, and XQuery 1.0 - Basic Introduction with Focus on What's New

Introductory session covering changes to these technologies. Great for newbies and gurus alike.

Session 2: Using the new XML standards of XPath 2.0, XSLT 2.0, and XQuery 1.0 in Java based Middleware

This intermediate session will document some common usage scenarios of the W3C XPath 2.0, XSLT 2.0, and XQuery 1.0 in Java middleware environments. Through the use of scenarios, the session will explain why to use each standard, what common issues are and how to best avoid them. Comparisons will be drawn between using these XML programming models and their object oriented counterparts – Document Object Model (DOM) and Java API for XML Binding (JAXB). The session will then focus on API’s for invoking XML programming models from Java. An analysis of the Java API for XML Processing (JAXP) will show how this API is lacking when providing for XPath 2.0, XSLT 2.0, and XQuery 1.0. Alternative Java API’s beyond JAXP will be discussed and advantages of each will be discussed. Finally, enterprise usage in Java based middleware will be considered focusing on performance, reliability, and full standards compliance.

XML Feature Pack (XPath 2.0/XSLT 2.0/XQuery 1.0) Beta Links

I have been discussing the WAS V7 Feature Pack for XML Beta (XML Feature Pack for short) with enough folks lately to realize that a single link that listed all the links that can help you start would be useful. So here goes. Go ahead and bookmark this link as I'll be updating it as the Beta moves along.

- General Availability Release Data Announcement - Nov 20th.

- Open Beta Website
-- Download code
-- Online documentation - Online Javadoc
-- Download documentation
-- Forum for discussion

- The WebSphere Community Blog (where I frequently post updates)
-- Beta 1 Blog Announcement
-- Beta 2 Blog Announcement
-- Beta 3 Blog Announcement
-- Beta 4 Blog Announcement
-- Release Date Annoucement

- Demo #1 (Introduction to the XML Feature Pack)
-- Part 1 (Standard/HD)
-- Part 2 (Standard/HD)

- Demo #2 (An end to end XPath 2.0 Application)
-- Part 1 (Standard/HD)
-- Part 2 (Standard/HD)

-Demo #3 (An end to end XSLT 2.0 Application)
-- Part 1 (Standard/HD)
-- Part 2 (Standard/HD)

- Demo #4 (Beta 2 Refresh valuable features)
-- Part 1 (Standard/HD)
-- Part 2 (Standard/HD)

- Demo #5 (An end to end XQuery 1.0 Application)
-- Part 1 (Standard/HD)
-- Part 2 (Standard/HD)

- Demo #6 (Beta 3 Highlights)
-- Part 1 (Standard/HD)

- Demo #7 (Thin Client for XML - Beta 4)
-- Part 1 (Standard/HD)

- 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

- Coverage of XML Feature Pack by news sites
-- Coverage of XPath 2.0, XSLT 2.0, and XQuery 1.0 (Beta 1)
-- Coverage of thin client (Beta 4)

Last updated: 2009-11-11

Monday, June 15, 2009

WAS XML Feature Pack Demo #2

As announced last week, I have created three new demos for the WAS XML Feature Pack.

I released the first demo two months ago introducing the XML Feature Pack:

Demo 1(Part 1, Part 2). Remember to click, view in HD.

In the second demo, I expand upon this same basic application to show how to use XPath 2.0 in and end-to-end J2EE application. In the demo, I show some of the new valuable features of XPath 2.0. Also, I show how to bridge the gap between Java and XML processing by showing binding of Java data to the XPath queries and calling user defined Java extension functions as part of the XPath processing. Finally, I show how to gather data from the returned XPath sequence cursors and how to integrate that data with Java beans.

Demo 2 - End to End XPath 2.0 (Part 1)


Direct Link (HD Version)


Demo 2 - End to End XPath 2.0 (Part 2)


Direct Link (HD Version)

Wednesday, June 10, 2009

WAS V7 XML Feature Pack Beta Refreshed (With focus on XSLT 2.0)

Today we have released an updated XML Feature Pack Beta. The beta is available here.

Since the first release two months ago (which had full XPath 2.0 and partial XSLT 2.0/XQuery 1.0), we have added quite a bit to XSLT 2.0 (making us nearly spec complete) and more to XQuery 1.0.

Among the biggest features added in the XSLT 2.0 area is XML Schema awareness. This includes validation which allows you to validate (make sure it contains data that is allowed per the schema) the incoming data to transformations, temporary trees of data, and output data from transformations. Also, as is important when working with vertical industry standard schemas, our schema awareness support includes schema assessment. This means that your XSLT stylesheets know when an attribute or element content is an integer or date and you can treat it as such. Taking this to the next level, if you extend your industry standard schema type of a bill of materials, you can write templates that match that type (schema-element(*, tns:BillOfMaterialsType)). In the past you would have had to made templates that were of the industry standard element names as well as all extending element names (tns:BillOfMaterialsName, mycompany:FullfillmentBillOfMaterialsName, mycompany:PurchasingBillOfMaterialsName, etc.).

Other new XSLT 2.0 features in this refresh are collections support (allows multiple input data sources in a well defined way), "undeclare-prefixes" serialization parameter(simplifies namespace in XML 1.1), next-match (allows you to call overridden templates) element, required parameters and "as" attributes (helps guarantee stylesheet elements are called correctly) and full support of XSLT keys.

Another major feature of this refresh is ability to pre-compile XML artifacts. This refresh contains tools that compile XPath, XSLT, and XQuery to java classes. These classes are basically the same logic that previously was interpreted by the XML runtime. However, with them now being compiled, they run much faster than interpreted. The refresh offers three modes:


  • interpreted - best when the XML artifacts are created ad hoc at runtime and not reused

  • compiled - best when the XML artifacts are created ad hoc at runtime but reused

  • pre-compiled - best when the XML artifacts are known at compile time of your application



We have also expanded our XQuery 1.0 support in this refresh.

Please let me know if any of these new features help you in your applications. I'm excited to hear of all the applications that are being tested against this functionality.

Finally, I have created another three demos to be posted on YouTube. Over the couple of days, I'll post them with links here. Hopefully they will help you understand how to use this functionality in your own applications.

Friday, April 17, 2009

WAS XML Feature Pack Open Beta Available (XPath 2.0, XSLT 2.0, XQuery 1.0)

I've been relatively quiet on the blog as of late. That tends to happen when you spend a lot of time working on something big.

My team and I have been working very hard to bring the W3C standards of XPath 2.0, XSLT 2.0, and XQuery 1.0 to life. I'm proud to announce, that today, you can download, install, and work with the WebSphere Application Server V7.0 Feature Pack for XML Beta containing these critically important standards.

We have delivered a beta XML runtime that supports these standards as well as offers a new API to interact with these standards. We believe these standards will simplify and increase the reliability of XML oriented WAS applications. The standards will also enable new scenarios never possible before in WAS - like querying large amounts of XML data located outside of databases in parallel with databases with XML support, or making navigation/transformations decisions based upon industry standard XML schema support.

You can download the beta from our open beta website.

You can discuss the beta on our forum.

In order to help you understand the feature pack, I put together a quick demo (in two parts). I hope to put more demos together soon, but let me know what you think of these first.

Demo 1 (Part 1)


Direct Link (ensure you click on watch in HD)


Demo 1 (Part 2)


Direct Link (ensure you click on watch in HD)