论坛首页 Java企业应用论坛

是XSL文件的路径问题?还是环境问题?

浏览 1543 次
该帖已经被评为隐藏帖
作者 正文
   发表时间:2008-04-03  
我遇到了一个问题,请求大家的帮助,我在自己的电脑搭建环境,xslt都没有出现过路径错误的情况,最近买了T61本本,不知道是上面预装些软件的原因什么其他原因,总是抱下面的异常

javax.xml.transform.TransformerException: Had IO Exception with stylesheet file: Header.xsl
org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:963)
org.apache.xalan.processor.StylesheetHandler.error(StylesheetHandler.java:991)
org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:333)
org.apache.xalan.processor.ProcessorInclude.startElement(ProcessorInclude.java:192)
org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:665)
org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:983)
com.hikehi.servlet.XMLPage.getXSL(XMLPage.java:259)
com.hikehi.servlet.XMLPage.toHTML(XMLPage.java:240)
com.hikehi.servlet.BaseServlet.toHTML(BaseServlet.java:234)
com.hikehi.servlet.Invoker.runAction(Invoker.java:254)
com.hikehi.servlet.Invoker.runAction(Invoker.java:264)
com.hikehi.servlet.Invoker.realRun(Invoker.java:133)
com.hikehi.servlet.Invoker.runDoGet(Invoker.java:286)
com.hikehi.servlet.BaseServlet.doGet(BaseServlet.java:130)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

xsl文件中的内容是:
<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml"
>

<xsl:import href="Header.xsl"/> <!-- 这里有问题? -->

<xsl:variable name="locale.title">标题</xsl:variable>

<xsl:template match="/Root"><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><meta name="generator" content="Vim[GNU/Linux]" />
<title><xsl:copy-of select="$locale.title"/></title>

<html>
<head></head>
<body>
Test
</body>
</html>

</xsl:template>
</xsl:stylesheet>
论坛首页 Java企业应用版

跳转论坛:
Global site tag (gtag.js) - Google Analytics