Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 2813 invoked by uid 500); 6 May 2003 08:08:08 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 2790 invoked from network); 6 May 2003 08:08:07 -0000 Received: from kiku.7777.net (216.71.84.236) by daedalus.apache.org with SMTP; 6 May 2003 08:08:07 -0000 Received: from ias ([168.126.185.189]) by kiku.7777.net (8.11.6/8.11.6) with ESMTP id h4688Gv03315; Tue, 6 May 2003 17:08:18 +0900 From: "Ias" To: Cc: "'Michael Wechner'" Subject: RE: [FYI] Stefano's Linotype Date: Tue, 6 May 2003 17:08:55 +0900 Message-ID: <000201c313a6$c33c1760$9f01a8c0@ias> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 In-Reply-To: Importance: Normal X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N At last, I'm running my Linotype on Cocoon-2.1-M2-dev Tomcat 4.1.24-LE JDK 1.4.1_02 Windows XP Pro SP1 at http://168.126.185.211/linotype/ . You can download this very running version from Full version (i.e. including lib) http://www.iasandcb.pe.kr/resources/ias-linotype-1.0-full.zip Compact version (i.e. excluding lib) http://www.iasandcb.pe.kr/resources/ias-linotype-1.0-compact.zip Besides the previous modification on flow.js and news2edit.xslt, I made = some changes: In org.betaversion.linotype.generation.RequestGenerator private void parse(String data) throws Exception { SAXParser parser =3D null; data =3D data.replaceAll("&", "&"); // added for accepting "&" = character at link input. try { parser =3D (SAXParser) manager.lookup(SAXParser.ROLE); StringReader inputStream =3D new StringReader(data); InputSource is =3D new InputSource(inputStream); parser.parse(is, new = FilteringXMLConsumer(super.xmlConsumer)); } catch (Exception e) { throw e; } finally { if (parser !=3D null) manager.release((Component) parser); } } In news2edit.xslt, added several actions for more convenience of = editing,
3D"Bold" 3D"Italic" 3D"Underline" 3D"Ordered 3D"Unordered 3D"Outdent" 3D"Indent" 3D"justifyleft" 3D"justifycenter" 3D"justifyright" 3D"undo" 3D"redo" 3D"Insert true
(Sorry not to create patches due to the fact that Linotype is not based = on CVS.) I hope this wonderful application would be developed and discussed more broadly. Thank Stefano again. P.S. Can we have a module for Linotype on some CVS repository? It could = help Linotype to evolve. > -----Original Message----- > From: news [mailto:news@main.gmane.org] On Behalf Of Stefano Mazzocchi > Sent: Tuesday, April 29, 2003 12:15 PM > To: cocoon-dev@xml.apache.org > Subject: Re: [FYI] Stefano's Linotype >=20 >=20 > on 4/28/03 6:03 PM Bernhard Huber wrote: >=20 > > hi, > > as i'm using w2k it complains about sharing violation of > document.xml > > after editing it. > > found in flow.js: > > .... > > var output =3D new=20 > > java.io.FileOutputStream(document + "/document.xml"); > > process( "linotype/" > +"action/save-" + > > type,{},output); > > .... > > and i was missing some output.close(); statement, and changed it to: > > var output =3D new=20 > > java.io.FileOutputStream(document + "/document.xml"); > > process( "linotype/" > +"action/save-" + > > type,{},output); > > output.close(); >=20 > uh, that's right. fixed. >=20 > > Moreover in Repository.java the method save(Part part, File > file) does > > not close its stream, too; but asfasik > > it is never used, thus the missing close() is not > harmfule,yet anyway > > the correct method: > > public static void save(Part part, File file) throws Exception { > > log("[save] " + part.getFileName() + " -> " + file); > > InputStream in =3D null; > > FileOutputStream out =3D null; > > try { > > in =3D part.getInputStream(); > > out =3D new FileOutputStream(file); > >=20 > > copy(in, out); > > } finally { > > if (out !=3D null) { > > out.close(); > > } > > if (in !=3D null) { > > in.close(); > > } > > } > > } >=20 > This is used in the image upload code that is not yet ported to=20 > linotype. I'm working on it. >=20 > -- > Stefano. >=20 >=20 >=20