[ http://issues.apache.org/jira/browse/XALANJ-2033?page=history ]

Brian Minchau updated XALANJ-2033:
----------------------------------

    Attachment: serializer.patch4.DTD.txt

Patch named serializer.patch4.DTD.txt supercedes any other patches attached to 
this issue.
The patch does the following:
1) Adds DTDHandler interface to the list of interfaces included by 
SerializationHandler
   (there are two methods on this interface, notationDecl() and 
unparsedEndityDecl()  )

2) Adds new method, setDTDEntityExpansion(boolean) to SerializationHandler 
interface

Some serializer classes need to imlement these 3 new methods on the 
SerializationHandler
interface.

SerializerBase class implements all three as empty bodies.
EmptySerializer class implements all three as empty bodies.



ToStream implements meaningful bodies for them.
ToStream has its DTD tag serialization cleaned up.
ToStream has meaningful code to expand, or not expand DTD entity declarations.



> SerializationHandler interface should inlude DTDHandler
> -------------------------------------------------------
>
>          Key: XALANJ-2033
>          URL: http://issues.apache.org/jira/browse/XALANJ-2033
>      Project: XalanJ2
>         Type: New Feature
>   Components: Serialization
>     Reporter: Brian Minchau
>     Assignee: Brian Minchau
>      Fix For: CurrentCVS
>  Attachments: serializer.patch4.DTD.txt
>
> (Note that SerializationHandler is public in the Java sense, but is not a 
> public API, so this issue is marking some internal development work that 
> should be done).
> The SerializationHandler interface, which is implemented by Xalan's 
> serializers is a kitchen-sink of other interfaces. It includes these public 
> APIs:
>     org.xml.sax.ContentHandler
>     org.xml.sax.ErrorHandler
>     org.xml.sax.ext.LexicalHandler
>     org.xml.sax.ext.DeclHandler
> It appears that this interface:
>     org.xml.sax.DTDHandler
> which has these two methods:
>     void notationDecl(String name, String publicId, String systemId);
>     void unparsedEntityDecl(String name, String publicId, 
>           String systemId, String notationName);
> should be added.
> DeclHandler, that is already included in SerializationHandler has this method:
>     void elementDecl(String name, String model);
> When an XML document like this one (from Xalan's expression02.xml testcase) 
> is parsed, and serialized:
> when parsing the XML input to the transformation:
> <?xml version="1.0"?>
> <!DOCTYPE doc [
>   <!NOTATION gif SYSTEM "../www.foo.com" >
>   <!ENTITY hatch-pic SYSTEM "../grafix/OpenHatch.gif" NDATA gif >
>   <!ELEMENT doc (#PCDATA)>
> ]>
> the serializer handles the !ELEMENT just fine, and creates the surrounding 
> !DOCTYPE, bucause the !ELEMENT is handled via the DeclHandler interface.  
> However, there is no way to similarly serialize the !NOTATION or !ENTITY 
> because these are handled via the DTDHandler interface.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to