[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

getting xsl:include to work in XT 19991105

Subject: getting xsl:include to work in XT 19991105
From: "Philip Puccio" <Philip.Puccio@xxxxxxxx>
Date: 21 Dec 1999 15:23:02 -0700
xt 19991105
Hi,

I'm getting a "MalformedURLException: no protocol" error message output to 
System.out whenever I use xsl:include.  What's wrong with this scenario:

My "main" xsl file includes another xsl file and tries to access a variable 
that is declared in the included file.  The main xsl looks like this:

<?xml version="1.0"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:include href="xt-test-include.xsl"/>
<xsl:template match="/">
	<xt-test-include-result>
		<xsl:value-of select="$xt-test-include-variable"/>
	</xt-test-include-result>
</xsl:template>
</xsl:transform>

The included xsl file is named xt-test-include.xsl and lives in directory at 
c:\IBMVJava\ide\project_resources\Advice 
Utility\com\aexp\advice\formatting\production xsl.  It looks like this:

<?xml version="1.0"?>
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform/1.0">
<xsl:variable name="xt-test-include-variable" select="'Congratulations, you 
found me!'"/>
</xsl:transform>

Before I invoke the XSLProcessor, I instantiate an InputSource for the xsl and 
send it setSystemId("c:\IBMVJava\ide\project_resources\Advice 
Utility\com\aexp\advice\formatting\production xsl\").  When I run the 
processor, I get the following line of output on my console:

java.net.MalformedURLException: no protocol: xt-test-include.xsl

The comment for method InputSource.setSystemId(String) says the system 
identifier is optional if there is a character stream (which is the way I'm 
using it), but "it is still useful to provide one, since the application can 
use it to resolve relative URIs...".  Obviously, my attempt to use 
href="filename" along with setSystemId(fileLocation) isn't what XT had in 
mind.

Can someone let me know how I need to use setSystemId() and xsl:include?

Thanks!

. . . Phil Puccio


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.