Ok. Thank you for your help.
Kai
>>> [EMAIL PROTECTED] 01.06.2004 08:38 >>>
Whoops. You've got the right approach, but the JiBX code for
writeDocType() had an error. I'm fixing it in CVS and will have an
updated beta 3c build out within the next few days that includes the
fix. I guess either nobody had tried this out before or they just
hadn't
bothered reporting the problem - thanks for letting us know.
- Dennis
Kai Peter Nacke wrote:
>Hi!
>
>I am new to jibx and have a simple question:
>What is the preferred way to write a DOCTYPE to a marshalled
document?
>
>After playing around I came up with the following source:
>
>IMarshallingContext mctx =
>getBindingFactory().createMarshallingContext();
>mctx.setIndent(4);
>FileOutputStream os = new FileOutputStream(file);
>mctx.startDocument("UTF-8", null, os);
>ctx.getXmlWriter().writeDocType("ejb-jar",
>"http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd", "-//Sun
>Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN", null);
>((IMarshallable) ejbjar).marshal(mctx);
>mctx.endDocument();
>os.close();
>
>The result is:
>
><?xml version="1.0" encoding="UTF-8"?>
><!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise
>JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd"
><ejb-jar id="ejb-jar_ID">
>
>(Please note the missing > at the end of the DOCTYPE declaration.)
>
>Is this a bug in my code or in the XMLWriterBase class?
>
>Thank you for help!
>
>Kai
>
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle
10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users