dev@fi.java.net

Re: JAXB and of base64 data and FI

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Tue, 02 Aug 2005 17:59:00 -0700

Paul Sandoz wrote:
>>> The serializing side of things should be quite stable as most code is
>>> rused. The parsing side may be less so because it is new code. I am
>>> not sure how best we can test both the parser and serializer. Can
>>> existing JAXB tests be used with FI?
>>
>> If we have instance documents, I think we can. Is there any "FI encoder"
>> tool?
>>
>
> Yes. There are two options:
>
> 1) Use the UNIX script, fi/FastInfoset/bin/xmltosaxtofi
>
> xmltosaxtofi <input> <output>
> -----------------------------
> Parses an XML document and transforms it into an equivalent fast infoset
> document using the FI SAX serializer.
> The 'input' shall be a XML document file.
> If the input is ommited then the standard input is used.
> The 'output' is the resulting fast infoset document file.
> If the output is ommited then the standard output is used.
>
> 2) Use the Java class, com.sun.xml.fastinfoset.tools.XML_SAX_FI:
>
> https://fi.dev.java.net/source/browse/fi/FastInfoset/src/com/sun/xml/fastinfoset/tools/XML_SAX_FI.java?rev=1.2&view=auto&content-type=text/vnd.viewcvs-markup

I can use this to have all our roundtrip tests exercise the FI route.

But I assume that this tool can't produce the base64 encoded text in FI.
  Or can it look for text that look like base64 and automatically create
base64 record in the produced document?

Can you think of any other way to test it?

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com