You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by chris markiewicz <cm...@commnav.com> on 2001/02/01 19:34:41 UTC

RE: Namespace not supported by SAXParser ???

hello again.  this thread started a few days ago..i've tried some different
things but i am still having the same problem...i have included a lot more
detail this time...

first, i am using xalan-j_2_0_D07 and the xerces jar that ships with that
version of xalan.
I have the following code:


DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
TransformerFactory tFactory = TransformerFactory.newInstance();
String xslSheet = xslSheetName;
StreamSource streamSource = new StreamSource(xslSheet);
Transformer transformer = tFactory.newTransformer(streamSource);

the xslSheet value is a fully qualified url path to an xsl sheet, something
like http://cmarkiew.mars.dev.commnav.com/login.xsl

when it gets to the last line (newTransformer), it throws the following
exception:

javax.xml.transform.TransformerConfigurationException: Namespace not
supported by SAXParser
	at
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFa
ctoryImpl.java:749)
	at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transformer
FactoryImpl.java:601)
	at
com.commnav.sbh.applications.wrappers.XSLXalanEngine.generateContent(XSLXala
nEngine.java:173)
	at
com.commnav.sbh.servlets.CommnavServlet.writeXSL(CommnavServlet.java:411)
	at com.commnav.sbh.servlets.LoginServlet.doGet(LoginServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
	at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
	at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
	at
allaire.jrun.servlet.JRunNamedDispatcher.forward(JRunNamedDispatcher.java:34
)
	at allaire.jrun.servlet.Invoker.service(Invoker.java:84)
	at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
	at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
	at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
	at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
	at allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
	at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
	at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
	at allaire.jrun.WorkerThread.run(WorkerThread.java:74)

the xsl sheet itself is pretty simple...it's just supposed to display a
login page...there isn't even any xml passed to it, if i remember rightly.
and if i plug this page into the sample - SimpleTransform - it works
fine...no errors and it gives me the correct output.

is there a problem with me giving it a URL? (i tried it with an input stream
and i got the same error)

i don't know why else it would work in SimpleTransform but not here.  i have
included the xsl page (below)

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>CommNav Login</title>
<script>
document.write('<STYLE>');
document.write('.bodyText {font-family:
verdana,tahoma,arial,helvetica,san-serif;font-size: 12px;}');
document.write('.buttonElement { background: #DDDDDD; font: 12px
Verdana,Tahoma,Arial,Helvetica; }');
if (document.all) {
    document.write('.formElement { border: 1px solid black; height:20px;
background: #FFFFFF; font: 12px Verdana,Tahoma,Arial,Helvetica; }');
} else {
    document.write('.formElement { font: 12px
Verdana,Tahoma,Arial,Helvetica; }');
}
document.write('</STYLE>');
document.close;
</script>
</head>
<body onLoad="javascript:document.loginform.username.focus();setBrowser();"
bgcolor="#000000">
<SCRIPT LANGUAGE="JavaScript">
function setBrowser() {
    browsertype = document.loginform.browsertype;
    browserversion = document.loginform.browserversion;
    platform = document.loginform.platform;
    browsertype.value  = "unknown";
    browserversion.value = "unknown";
    platform.value = "unknown";
    if (navigator.userAgent.indexOf("MSIE") &gt; 0) browsertype.value =
"IE";
    if (navigator.appName == "Netscape") browsertype.value = "NS";
    //if (navigator.appName == "Konqueror") browsertype.value = "K";
    if (navigator.appVersion.substring(0,1) &lt; 5) browserversion.value =
"4";
    if (navigator.appVersion.substring(0,1) &gt;= 5) browserversion.value =
"5";
    if (navigator.platform.indexOf("Mac") &gt;=0) platform.value = "Mac";
    if (navigator.platform.indexOf("Win") &gt;=0) platform.value = "Win";
}
</SCRIPT>
<TABLE BORDER="0" HEIGHT="95%" ALIGN="center">
<TR>
<TD>
    <TABLE BORDER="0" BGCOLOR="#2D966B" CELLPADDING="4" CELLSPACING="0">
    <TR>
    <TD>
        <table border="0" align="center" BGCOLOR="#EEEEEE" CELLSPACING="0"
CELLPADDING="6">
        <form name="loginform" method="post"
action="{/sbh/servletbaseurl}/servlet/Login">
        <!--<INPUT TYPE="hidden" NAME="xsl"
VALUE="{/sbh/xslsheetbaseurl}/start.xsl"/>-->
<INPUT TYPE="hidden" NAME="xsl" VALUE="{/sbh/xslsheetbaseurl}/foo.xsl"/>
<INPUT TYPE="hidden" NAME="strategy"
VALUE="com.commnav.sbh.applications.desktop.DesktopGeneratingStrategy"/>
        <tr><td class="bodyText" colspan="2" BGCOLOR="#DDDDDD">Please log
in:</td></tr>
        <tr><td class="bodyText">Username:</td><td class="bodyText"><input
type="text" name="username" class="formElement" style="width:
150px"/></td></tr>
        <tr><td class="bodyText">Password:</td><td class="bodyText"><input
type="password" name="password" class="formElement" style="width: 150px"/>
            <input type="hidden" name="browsertype" value=""/>
            <input type="hidden" name="browserversion" value=""/>
            <input type="hidden" name="platform" value=""/></td></tr>
        <tr><td colspan="2" class="bodyText" align="right"><input
type="submit" value="  Enter  " class="buttonElement" /></td></tr>
        </form>
        </table>
    </TD>
    </TR>
    </TABLE>
</TD>
</TR>
</TABLE>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

i greatly appreciate your help.

chris



-----Original Message-----
From: chris markiewicz [mailto:cmarkiew@commnav.com]
Sent: Tuesday, January 30, 2001 11:08 AM
To: xalan-dev@xml.apache.org
Subject: RE: Namespace not supported by SAXParser ???


which version of xalan: just downloaded it - xalan-j_2_0_D07

which version of xerces: xerces-j_1_2_2 i believe...

thanks
chris

-----Original Message-----
From: Scott_Boag@lotus.com [mailto:Scott_Boag@lotus.com]
Sent: Tuesday, January 30, 2001 10:22 AM
To: xalan-dev@xml.apache.org
Cc: xalan-dev@xml.apache.org
Subject: Re: Namespace not supported by SAXParser ???



Which version of Xalan2?  Which version of Xerces?

-scott





                    "chris
                    markiewicz"          To:     <xa...@xml.apache.org>
                    <cmarkiew@com        cc:     (bcc: Scott Boag/CAM/Lotus)
                    mnav.com>            Subject:     Namespace not
supported by SAXParser ???

                    01/30/01
                    10:34 AM
                    Please
                    respond to
                    xalan-dev






hello.

i am in the process of converting my xalan 1 code to TRAX...i have a very
simple snippet of code that is throwing an error:

TransformerFactory tFactory = TransformerFactory.newInstance();
String xslSheet = (String)validatedXSLSheets.get(0);
Transformer transformer = tFactory.newTransformer(new
StreamSource(xslSheet));

it breaks when newTransformer(Source) is called...error below...

javax.xml.transform.TransformerConfigurationException: Namespace not
supported by SAXParser
           at
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFa

ctoryImpl.java:749)
           at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(Transformer

FactoryImpl.java:601)
           at ...

any thoughts?

chris