Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] XOM 1.1: Internal DTD Subsets

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <jcowan AT reutershealth.com>
  • To: Wolfgang Hoschek <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] XOM 1.1: Internal DTD Subsets
  • Date: Thu, 6 Jan 2005 17:21:47 -0500

Wolfgang Hoschek scripsit:

> What I needed was an alternative (high-performance) serialization
> mechanism. It serializes a document to some binary format and later
> deserializes from the binary format, yielding the *very same* document.
> So on deserialization I need a way to say setInternalDTDSubset(String
> subset) on an empty document, and pass in the same value I previously
> got on serialization from getInternalDTDSubset(). Just that; no fancy
> behaviour. The nodes of a document should not be altered in any way by
> setInternalDTDSubset, the only thing that should be altered is the
> subset string stored in the DocType. Until a better solution can be
> found, my workaround simply declares setInternalDTDSubset public.

A better tactic, I think, is to add a method getSealedInternalDTDSubset()
which returns a SealedInternalDTDSubset. This is a trivial class with
no public constructor and only toString, hashCode, and equals methods.
Then setSealedInternalDTDSubset(SealedInternalDTDSubset s) can be
made public.

--
Real FORTRAN programmers can program FORTRAN John Cowan
in any language. --Allen Brown jcowan AT reutershealth.com




Archive powered by MHonArc 2.6.24.

Top of Page