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

<xsl:include> href

Subject: <xsl:include> href
From: "Anthony Ikeda" <anthony.ikeda@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 2 May 2001 12:16:43 +1000
xsl include systemid error
I've been working on using XSL stylesheets for a while now and created my
own class to deal with the transfrmations with Xalan. I've decided that I
want to use includes or imports but I'm having a few difficulties:

Using include demands an adsolute URL. If I use a relative URL, I get the
following error:

    SystemId Unknown; Line 0; Column 0; Transform error:
    javax.xml.transform.TransformerException: SAX Exception

My transformation code is:

/**
 * Xml String used to transform.
 */
  public String xmlStr = new String();
/**
 * XSL String used for transformations.
 */
  public String xslStr = new String();

  public void transformText(PrintWriter out, String xslFileIn, String
xmlString){
    ...
      XSLTProcessor xsltprocessor = XSLTProcessorFactory.getProcessor();
      StringReader strrdXML = new StringReader(xmlStr);
      StringReader strrdXSL = new StringReader(xslStr);

      xsltprocessor.process(new XSLTInputSource(strrdXML), new
XSLTInputSource(strrdXSL), new XSLTResultTarget(out));
    ...
  }

I'm calling this class from a servlet.

My xsl is:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="status">OK</xsl:param>
<xsl:include href="styles.xsl"/>

If I add the absolute URL then it works fine, but I don't want to have to
manually update this each time I use my software on a different webserver.

How can I avoid this?

Cheers,
Anthony Ikeda
Web Application Developer,
Proxima Technology Pty. Ltd.


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


Current Thread
  • <xsl:include> href
    • Anthony Ikeda - Tue, 1 May 2001 22:21:39 -0400 (EDT) <=
      • <Possible follow-ups>
      • Dylan Walsh - Thu, 3 May 2001 09:08:47 -0400 (EDT)

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.