cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geert Josten" <geert.jos...@daidalos.nl>
Subject RE: RE: HTMLGenerator generate Tree Files
Date Mon, 25 Sep 2006 14:02:41 GMT
Hi Rachid,

I have the impression that you have coded more in Java than necessary. Can you summarize briefly
what you try to achieve in functional terms and why you have chosen to write this generator?

Kind regards,
Geert

> -----Oorspronkelijk bericht-----
> Van: rachid harradi [mailto:rachid.harradi@gmx.net] 
> Verzonden: maandag 25 september 2006 15:46
> Aan: users@cocoon.apache.org
> Onderwerp: Re: RE: HTMLGenerator generate Tree Files
> 
> Hello Josten,
> 
> 
> my Generator "generator":
> 
>  public void generate()
>     throws IOException, SAXException, ProcessingException {
>     	
>         SAXParser parser = null;
>         
>         try {
>         	boolean debug = false;
>     		boolean info = false;
>     		boolean ascii = false;
>     		boolean toc = false;
> 
>     		ascii = true;
>     		String target 
> ="E:/workspace3/cocoon/build/webapp/wh2fo/objectionhtml.html"; 
>     		File source = new File(target);
>     		if (source.exists()) 
>     		{
>     			translator.doXslAttsFileName(target);
>     			translator.doXmlFileName(target);
>     			translator.doXslFileName(target);
>     			String xslFileName= translator.getXslFileName();
>     			String xslAttsFileName = 
> translator.getXslAttsFileName();
>     			String xmlFileName = 
> translator.getXmlFileName();
>     			String producer = Version.producer;
>     			
>     			documentParser = new DocumentParser( 
> target,xslAttsFileName,xmlFileName,debug,ascii,toc);
>     			ElementTreeWriter XSLTempWriter = new 
> ElementTreeWriter(xslFileName, producer);
>     	// 1er file bestored.  
> //in "E:/workspace3/cocoon/build/webapp/wh2fo/"
> //to another pipeline
>     			
> XSLTempWriter.write(documentParser.getXSLTemplatesRoot());
> //    			// 1er file be stored in 
> "E:/workspace3/cocoon/build/webapp/wh2fo/"
>     			ElementTreeWriter XSLAttsWriter = new 
> ElementTreeWriter(xslAttsFileName, producer);
>     			
> XSLAttsWriter.write(documentParser.getXSLAttributesRoot());
>     			ElementTreeWriter XMLwriter = new 
> ElementTreeWriter(xmlFileName, producer);
>     			
> XMLwriter.write(documentParser.getXMLPreProc());documentParser
> =translator.getParser();
>     			
>     			
>     			
>     			StringReader xmlReader = new 
> StringReader(XMLwriter.getBuffer().toString());
>     			inputSource = new InputSource(xmlReader);
>     		
>     			parser = 
> (SAXParser)this.manager.lookup(SAXParser.ROLE);
>     			parser.parse(this.inputSource, 
> super.xmlConsumer);
>     			
>     		}
>     		else System.err.println("SEVERE ERROR: file 
> "+target+" not found.");
>         } catch (IOException e) {
>             getLogger().error("StreamGenerator.generate()", e);
>             throw new 
> ResourceNotFoundException("StreamGenerator could not find 
> resource", e);
>             }
>         catch (Exception e) {
>             getLogger().error("Could not get parser", e);
>             throw new ProcessingException("Exception in 
> StreamGenerator.generate()", e);
>         } finally {
>             this.manager.release( parser);
>         }
>     }
> -------- Original-Nachricht --------
> Datum: Mon, 25 Sep 2006 14:11:00 +0200
> Von: "Geert Josten" <geert.josten@daidalos.nl>
> An: users@cocoon.apache.org
> Betreff: RE: HTMLGenerator generate Tree Files
> 
> > Can you give more details on how the generator produces the three 
> > files exactly?
> > 
> > Kind regards,
> > Geert
> > 
> > > 
> >    
> >  
> > Drs. G.P.H. Josten
> > Consultant
> >  
> >  
> > 
> > Daidalos BV
> > Source of Innovation
> > Hoekeindsehof 1-4
> > 2665  JZ  Bleiswijk
> > Tel.: +31 (0) 10 850 1200
> > Fax: +31 (0) 10 850 1199
> > www.daidalos.nl
> > KvK 27164984
> > 
> > 
> > De informatie - verzonden in of met dit emailbericht - is afkomstig 
> > van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. 
> > Indien u dit bericht onbedoeld hebt ontvangen, verzoeken 
> wij u het te 
> > verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.
> >  
> > 
> > > Van: rachid harradi [mailto:rachid.harradi@gmx.net]
> > > Verzonden: maandag 25 september 2006 13:45
> > > Aan: users@cocoon.apache.org
> > > Onderwerp: HTMLGenerator generate Tree Files
> > > 
> > > Hello Together,
> > > 
> > > 
> > > I have generator, which procudes three files(.xml, .xsl, .xsl). I 
> > > would like to send this tree files on differently pipeline. how i 
> > > can do it?
> > > --
> > > Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten 
> zu sparen! 
> > > Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
> > > 
> > > 
> --------------------------------------------------------------------
> > > - To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > > 
> > >
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > For additional commands, e-mail: users-help@cocoon.apache.org
> 
> --
> NEU: GMX DSL Sofort-Start-Set - blitzschnell ins Internet!
> Echte DSL-Flatrate ab 0,- Euro* http://www.gmx.net/de/go/dsl
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message