Do you get the
errors from the transformation and your program raises exception or do you see
the errors only in the webserver log but the java code processes
correctly?
I remember having
similar problem earlier this year but it was an issue with Tomcat. I have
servlet applications and run them with Tomcat and the Xalan packaged with
j2ee 1.3.1. I think the problem showed up when I installed Tomcat 4.1.12 or
4.1.18. I did see the errors in the Tomcat log, but there was no error in my
application and the web pages were generated correctly. I didn't see the errors
when I transformed the pages from command line. Just for a test - save the XML
as a file, open the DOS box, make sure your Xalan libraries are in the
CLASSPATH and try the command like:
java
org.apache.xalan.xslt.Process -IN myxmlfile.xml -XSL mystylesheet.xsl -OUT
result.html
You may have to type
the full path to java.exe or set the PATH.
Currently I run
Tomcat 4.1.27, with the patch, and don't see the errors any
more.
I also run java
1.4.2_01
HTH
Witold
-----Original Message-----
From: Dima Gutzeit [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 9:53 AM
To: [EMAIL PROTECTED]
Subject: Re: "Element must be declared" issue
From: Dima Gutzeit [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 9:53 AM
To: [EMAIL PROTECTED]
Subject: Re: "Element must be declared" issue
It seems now that the problem is being cause by the following "doctype" declaration :<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp " ">]><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">the output is :[Error] :4:125: Element type "xsl:stylesheet" must be declared.
[Error] :5:79: Element type "xsl:output" must be declared.
[Error] :7:45: Element type "xsl:include" must be declared.
[Error] header.xsl:3:125: Element type "xsl:stylesheet" must be declared.
[Error] header.xsl:4:79: Element type "xsl:output" must be declared.
[Error] header.xsl:6:29: Element type "xsl:template" must be declared.
[Error] header.xsl:7:29: Element type "xsl:param" must be declared.
[Error] header.xsl:9:31: Element type "SCRIPT" must be declared.
[Error] header.xsl:23:116: Element type "OBJECT" must be declared.
[Error] header.xsl:24:69: Element type "PARAM" must be declared.
[Error] header.xsl:25:40: Element type "PARAM" must be declared.
[Error] header.xsl:26:43: Element type "PARAM" must be declared.
[Error] header.xsl:28:97: Element type "EMBED" must be declared.
[Error] header.xsl:31:55: Element type "script" must be declared.
[Error] header.xsl:50:108: Element type "table" must be declared.
[Error] header.xsl:51:7: Element type "tr" must be declared.
[Error] header.xsl:52:20: Element type "th" must be declared.
[Error] header.xsl:52:90: Element type "img" must be declared.
[Error] header.xsl:54:7: Element type "tr" must be declared.
[Error] header.xsl:55:36: Element type "td" must be declared....Anyone ?How can I turn off validation in Xalan ? Is there any other way of declaring entities? What is wrong with what I did ?Thanks in advance,Dima Gutzeit.----- Original Message -----From: "Henry Zongaro" <[EMAIL PROTECTED]>To: <[EMAIL PROTECTED]>Sent: Tuesday, December 23, 2003 2:25 PMSubject: Re: "Element must be declared" issue> I don't seem to be able to reproduce your problem. I know at one point
> within the past year, there was a problem where Xalan was turning on
> Xerces "dynamic-validation" feature. Xerces' behaviour with that feature
> enabled changed, and Xerces started producing validation errors for
> examples like yours - but we fixed that bug quite a while ago.
>
> Are you certain you are using the latest Xalan and Xerces? What is the
> result of executing the following two commands?
>
> java org.apache.xalan.Version
> java org.apache.xerces.impl.Version
>
> Thanks,
>
> Henry
> ------------------------------------------------------------------
> Henry Zongaro Xalan development
> IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044
> mailto:[EMAIL PROTECTED]
>
>
>
>
> "Dima Gutzeit" <[EMAIL PROTECTED]>
> 2003-12-23 05:25 AM
>
>
> To: <[EMAIL PROTECTED]>
> cc:
> Subject: Re: "Element must be declared" issue
>
>
>
> Sure , here it goes :
>
> xml:
>
> <?xml version="1.0" encoding="windows-1255"?>
> <!DOCTYPE PageContent [
> <!ENTITY nbsp " ">
> ]>
> <PageContent>
> <links>
> <link name="something">bla-bla-bla</link >
> <link name="something1">bla-bla-bla</link >
> <link name="something2">bla-bla-bla</link >
> </links>
> </PageContent>
>
> xsl:
>
> <?xml version="1.0" encoding="windows-1255"?>
> <!DOCTYPE PageContent [
> <!ENTITY nbsp " ">
> ]>
> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
> <xsl:output method="html" version="1.0" encoding="windows-1255"
> indent="yes"/>
> <xsl:include href=""/>
> <xsl:include href=""/>
> <xsl:include href=""/>
> <xsl:template match="PageContent">
> .
> Some HTML page structure goes here
> .
> .
> .
> .
> </xsl:template>
> </xsl:stylesheet>
>
>
> Thanks again for your help.
>
>
>
>