You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Brian Minchau <mi...@ca.ibm.com> on 2003/08/14 06:15:49 UTC
ToSAXHandler.startDTD() does nothing, but should do something
Naeim,
I think I see the bug.
ToSAXHandler is an abstract class so you don't have one of these. You must
have one of :
ToXMLSAXHandler
ToHTMLSAXHandler
ToTextSAXHandler
For the moment let me presume that you have a ToXMLSAXHandler.
The ToSAXHandler.startDTD(String,String,String) method does nothing but
should probably remember the public and system Strings for later, just as
ToStream.startDTD(String,String,String) does.
If you look in ToXMLSAXHandler.start(String,String,String,Attributes) you
will see that for the very first element encountered it should try to call
the underlying lexical handler with the 3 Strings:
element name
doctypePublic
doctypeSystem
So the call to the underlying lexical handler will be made only if all of
these are true:
1) there is at least one element in the document
2) the lexical handler is set
3) the doctypePublic is set
4) the doctypeSystem is set
Looks like the Strings for 3) and 4) above are null because we are doing
absolutely nothing in ToSAXHandler.startDTD(String,String,String) but we
should remember the public and system Strings.
Sound reasonable?
Do you want to open a bugzilla bug against XalanJ2 at
http://nagoya.apache.org/bugzilla/ ?
Brian Minchau
XSLT Development, IBM Toronto
e-mail: minchau@ca.ibm.com
"Naeim
Semsarilar" To: <xa...@xml.apache.org>
<naeim@engr.mun.c cc:
a> Subject: ToSAXHandler
08/10/2003 05:18
PM
Please respond to
xalan-dev
Hi,
Below is the code for
org.apache.xml.serialzier.ToSAXHandler.startDTD(String, String, String):
/**
* Do nothing.
* @see org.xml.sax.ext.LexicalHandler#startDTD(String, String, String)
*/
public void startDTD(String arg0, String arg1, String arg2)
throws SAXException
{
// do nothing for now
}
I'm curious why "do nothing". Doesn't it make sense to make a callback to
the member LexicalHandler (m_lexHandler) ?
I'm trying to use a SAXResult as my transform target, but my LexicalHandler
is only partially functional now because a callback to startDTD is never
made.
Thank you for any clarification in advance. And I apologize if this belongs
to the users list.
-Naeim