• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Use WDSc to Develop XSL Transformations

    August 1, 2007 Ted Holt

    I use WebSphere Development Studio client (WDSc) often for editing RPG, CL, command, and DDS source code. I was happy to learn recently that WDSc also works well for the development of XSL transformations. I don’t consider myself a pro at it, but I’m finding WDSc so helpful with my XML projects that I wanted to go ahead and share something of what I’ve learned so far.

    First, I need to mention that I am currently using WDSc 6.0.1. I have tried XSL transformations under the full product and WDSc Lite, and both have worked well for me so far. Since I don’t have WDSc 7 yet, I don’t know if the following instructions will work for that version or not.

    Let’s say you want to develop an XSL transformation. That is, you want to use XSL to convert an XML file to a different format, or to a different XML format. You’ll need to use the Resource perspective in WDSc. (According to the help text, other perspectives are acceptable, too, but I don’t know which ones they are.) There are at least two ways to switch to the Resource perspective. Here’s one of them:

    • Pull down the Window menu.
    • Select Open Perspective.
    • Select Other . . .
    • Click on Resource and then the OK button.

    Now that you’re in the Resource perspective, you need a working set in order to group resources. My setup already had a working group called xcv. I’ve been using it. If you want to create your own working group, follow these steps:

    • Pull down the Project menu.
    • Select Build Working Set.
    • Select Select Working Set. . . .
    • Click the New. . . button.
    • Click on Resource (in the Working Set Type: box).
    • Click on Next.
    • Enter the name you want to give the working set (e.g., My Working Set).
    • You’re required to select at least one resource, so click on anything (e.g., RemoteSystemsConnections).
    • Click on Finish.
    • You’re back to the Select Working Set panel.
    • Click on your new working set.
    • Click on OK.

    Now you need to activate your working set in the Navigator pane. On the Navigator pane, just below the tab, is a row of icons. The last one is an arrow head that points down.

    • Click on this down arrow to get a pop-up menu.
    • Choose Select Working Set.
    • Click on the name of your new working set.
    • Click OK.

    This screen shot may help a little:

    The working set is now open in the Navigator panel, but it’s empty. You need a project.

    • Right-click in the Navigator pane to get a pop-up menu.
    • Select New.
    • Select Project. . .
    • Expand Simple.
    • Click on Project (under Simple).
    • Click Next.
    • Enter a project name (e.g., My XSLT Project).
    • Click Finish.

    You have a working set and a project. You need to tie the two together.

    • Click on the down arrow in the Navigator pane.
    • Select Edit Active Working Set.
    • Check your project.
    • Click Finish.

    Your project should now show in the Navigator pane. Now you need to put two files–an XML file and an XSL file–into the project.

    • Right-click in the Navigator pane.
    • Select New.
    • Select File.

    You will be asked to create a new file resource. You’ll see a list of projects.

    • Click on the project you just created.
    • Tab to the File name: field and enter a name for an xml file. (For illustration purposes, I’ll use the name library.xml).
    • Click on Finish.

    The XML file is now open in the editor. It’s blank. Key in some XML data. Feel free to use the following:

    <?xml version="1.0" encoding="UTF-8" ?>
    <library>
      <book>
          <title>Anna Karenina</title>
          <author>Leo Tolstoy</author>
      </book>
      <book>
          <title>The Count of Monte Cristo</title>
          <author>Alexandre Dumas</author>
      </book>
      <book>
          <title>Horticulture for Geniuses</title>
          <author>Phil O. Dendron and Chris Anne Themumm</author>
      </book>
    </library>  
    

    Use your favorite method to save the file. Control-S works well. You can also use the File menu or click on the diskette icon of the toolbar.

    You have an XML file. Now you need an XSL file.

    • Right-click on the Navigator pane.
    • Select New.
    • Select File.

    I suggest you give the XML and XSL files the same base name. If you called the XML file library.xml, then call the XSL file library.xsl.

    The XSL file is open in the editor. (The XML file is still open as well.) Key the XSL data. (Here’s some you can use.)

    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0"
       >
       
    <xsl:template match="library">
    My Library
       <xsl:apply-templates />
    </xsl:template>   
    
    <xsl:template match="book">
       <xsl:value-of select="title" /> was written by
       <xsl:value-of select="author" />.
    </xsl:template>
    
    </xsl:stylesheet>
    

    Save the file using your method of choice.

    At this point, you have two files open in the editor, and your project shows in the Navigator pane. This is how the screen looks on my system:

    Click on the XML and XSL files in the Navigation pane to select them. You’ll need to hold down the control key while clicking the second of the files in order to select two files at once. With both files selected, right-click on either file, select Run, then XSL Transformation. If there are errors, WDSc responds with a message in red in the Console pane, as below:

    But if all is OK, you’ll see a new XML file open in the editor, as below:

    This is the output of the transformation.

    If I haven’t omitted anything, you should be on your way to developing your own XSL transformations under WDSc.



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    Rocket Software

    Unlock the full potential of your data with Rocket Software. Our scalable solutions deliver AI-driven insights, seamless integration, and advanced compliance tools to transform your business. Discover how you can simplify data management, boost efficiency, and drive informed decisions.

    Learn more today.

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    COMMON:  Join us at the Annual 2008 conference, March 30 - April 3, in Nashville, Tennessee
    Seagull Software:  Web-enable your System i apps with LegaSuite GUI
    VAULT400:  Securely archive data with Instant Back-Up & 24x7 Recovery

    IT Jungle Store Top Book Picks

    The System i Pocket RPG & RPG IV Guide: List Price, $69.95
    The iSeries Pocket Database Guide: List Price, $59.00
    The iSeries Pocket Developers' Guide: List Price, $59.00
    The iSeries Pocket SQL Guide: List Price, $59.00
    The iSeries Pocket Query Guide: List Price, $49.00
    The iSeries Pocket WebFacing Primer: List Price, $39.00
    Migrating to WebSphere Express for iSeries: List Price, $49.00
    iSeries Express Web Implementer's Guide: List Price, $59.00
    Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
    Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
    Getting Started with WebSphere Express for iSeries: List Price, $49.00
    WebFacing Application Design and Development Guide: List Price, $55.00
    Can the AS/400 Survive IBM?: List Price, $49.00
    The All-Everything Machine: List Price, $29.95
    Chip Wars: List Price, $29.95

    Ricoh Introduces Two Wide Format Printers Mainframe Vendor BluePhoenix Ready to Purchase ASNA

    Leave a Reply Cancel reply

Volume 7, Number 28 -- August 1, 2007
THIS ISSUE SPONSORED BY:

WorksRight Software
Help/Systems
COMMON

Table of Contents

  • Use WDSc to Develop XSL Transformations
  • Have Your Cake and Eat It, Too
  • Admin Alert: Getting Around System i Default Passwords, Part 2

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • Meet The Next Gen Of IBMers Helping To Build IBM i
  • Looks Like IBM Is Building A Linux-Like PASE For IBM i After All
  • Will Independent IBM i Clouds Survive PowerVS?
  • Now, IBM Is Jacking Up Hardware Maintenance Prices
  • IBM i PTF Guide, Volume 27, Number 24
  • Big Blue Raises IBM i License Transfer Fees, Other Prices
  • Keep The IBM i Youth Movement Going With More Training, Better Tools
  • Remain Begins Migrating DevOps Tools To VS Code
  • IBM Readies LTO-10 Tape Drives And Libraries
  • IBM i PTF Guide, Volume 27, Number 23

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2025 IT Jungle