aspose file tools*
The moose likes Websphere and the fly likes XSL Include validation in Rational Application Developer 6.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "XSL Include validation in Rational Application Developer 6.0" Watch "XSL Include validation in Rational Application Developer 6.0" New topic
Author

XSL Include validation in Rational Application Developer 6.0

Michael Belt
Greenhorn

Joined: Aug 09, 2006
Posts: 5
I'm having trouble locating the XSL Context Path setting for XSL
validation in Rational Application Developer 6.0. I know that in
Websphere Studio Application Developer it was located under
Window->Preferences->XML->XSL Debugging->Context Path. Unfortunately
there appears to be no corresponding setting in RAD 6.0.1.1 FP2. This
is causing me to receive a "Had IO Exception with stylesheet file"
every time I have an XSL:INCLUDE statement. It used to validate
perfectly in WSAD 5.1.2. Anyone know where this preference is?

MANY thanks.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

Look for the help topics "Using the XSL Transformation launch configuration" or "Creating Run configurations to transform your files". They tell you how to get to a place where you can set the "URI base" for the transformation. It's rather a long topic so I won't paste the whole thing here.
Michael Belt
Greenhorn

Joined: Aug 09, 2006
Posts: 5
Paul, you're close, but that's not quite what I need. I'm not trying to run an XSL transformation on XML. I'm just trying to get past erronious problems reported when I "Run Validation" on an XSL file (more similar to compilation errors in Java except we are dealing with XSL).
Michael Belt
Greenhorn

Joined: Aug 09, 2006
Posts: 5
Allow me to be a bit more verbose. In my web project I have (of course) the default �WebContent� folder which is the J2ee �Web content folder name� specified in the Web projects properties. The J2ee �Context Root� is �/�.

Now I have a directory under WebContent I�ve called directory1. I�ve also created two files in this directory named file1.xsl & file2.xsl.

Given the above setup the URL for file1.xsl locally is (for any XML file who wishes to use file1.xsl for its transformation): http://localhost:9080/directory1/file1.xsl

Likewise if I want to include file2.xsl into file1.xsl I merely need to add into the stylesheet:
<xsl:include href="/directory1/file2.xsl"/>

This works just dandy when it transforms in the browser; however, when I select �Run Validation� from the context menu of file1.xsl the Problem view now reports:
�Had IO Exception with stylesheet file: /directory1/file2.xsl�

Now back in the good-old-days of WSAD all I had to do is set the �Context Path� in the XSL Debugging preferences (see thread start post). This option has since vanished. There appears to be no way to correctly configure XSL Validation (NOT execution).
Michael Belt
Greenhorn

Joined: Aug 09, 2006
Posts: 5
OK, the forum striped out the XSL so use your imagination & replace the square brackets with the appropriate greater than & less than for my above post:
[xsl:include href="/directory1/file2.xsl"/]
Michael Belt
Greenhorn

Joined: Aug 09, 2006
Posts: 5
OK, this is NUTS! When I drag the XSL file from the navigator view into the href attribute; RAD tries to use the following path:
"WebContent/directory1/file2.xsl"

THEN it won't even validate with it's own "suggestion". How screwed up is that?!?
 
 
subject: XSL Include validation in Rational Application Developer 6.0