Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] NFC serialization

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Bradley S. Huffman" <hip AT cs.okstate.edu>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] NFC serialization
  • Date: Wed, 22 Oct 2003 12:30:03 -0500

Elliotte Rusty Harold writes:

> The other possibility is to actually support all four normalization
> forms, and do something like this:
>
> public void setUnicodeNormalization(Type form)
> public String getUnicodeNormalization()
>
> However, I'm not sure that's actually a good idea. It goes against
> the W3C character model which suggests NFC or nothing However, there
> *might* be some use cases for NFKC in particular.

What about writing four subclasses of FilterOutputStream
(NFCFilterOutputStream,
NFKCFilterOutputStream, NFDFilterOutputStream, NFDKFilterOutputStream)? Then
setUnicodeNormalization(true) can automagically wrap a NFCFilterOutputStream
around the output stream provided to the serializer. Anyone wanting something
other than NFC can wrap the output stream by hand.

Brad




Archive powered by MHonArc 2.6.24.

Top of Page