RE: [ANN] sunBow 1.0

2003-03-28 Thread Lyall, Keith
Title: RE: [ANN] sunBow 1.0





Hi,


I downloaded the sunBow zip file and extracted it to my Eclipse plugin directory but it doesn't seem to have been picked up.

I am using Eclipse v2.01. 


Any suggestions?


Keith.


-Original Message-
From: Martin Dulisch [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2003 09:02
To: [EMAIL PROTECTED]
Subject: [ANN] sunBow 1.0



The SN sunBow team are proud to announce version 1.0. This free
version is available immediately for download at:
http://radio.weblogs.com/0108489/. In addition to numerous bug-fixes,
the new version now also supports sub-sitemaps and no longer requires
a licence key.


sunBow is a collection of Eclipse (2.1) plugins that make it easier to
develop Cocoon based applications and XML solutions in general.


 * XML editor
 - completition proposals from associated schema
 - well formed check on save
 - automatic insertion of closing tags
 - formatting of the XML content


 * XSLT development
 - XSLT transformation
 - transformation trace


 * Cocoon
 - dialog orientated sitemap editor with drag and drop support
 and validation against a sitemap schema
 - management of sitemap fragments
 - configuration of the log level in logkit.xconf


 * Web application
 - deployment: automatic tracking of changes
 - testing: Apache Latka tests can be executed



Regards
Martin Dulisch
-
sn AG, Open Source Competence Center
 Tel.: 05251/1581-75
Klingenderstr. 5 mailto:[EMAIL PROTECTED]
D-33100 Paderborn http://www.s-und-n.de
-




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  This electronic mail system is used for information purposes and is
  not intended to form any legal contract or binding agreement.
  The content is confidential and may be legally privileged. Access
  by anyone other than the addressee(s) is unauthorised and any
  disclosure, copying, distribution or any other action taken in
  reliance on it is prohibited and maybe unlawful

  All incoming and outgoing e-mail communications and attachments
  are scanned automatically by software designed to detect and remove
  any material containing viruses or other unauthorised content.  While
  we undertake best endeavours to ensure that this content checking
  software is up to date, recipients should take steps to assure themselves
  that e-mails received are secure.






RE: [ANN] sunBow 1.0

2003-03-28 Thread Lyall, Keith
Title: RE: [ANN] sunBow 1.0





Hi Martin,


The version of Eclipse I am using is labelled v2.0.1. 


I have not seen a v2.1 anywhere.


The message in my .log file is:


!SESSION Mar 28, 2003 12:42:45.93 --
java.version=1.4.1_01
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Command-line arguments: -os win32 -ws win32 -arch x86 -install file:C:/installs/eclipse/
!ENTRY org.eclipse.core.runtime 2 1 Mar 28, 2003 12:42:45.93
!MESSAGE Problems encountered loading the plug-in registry.
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Mar 28, 2003 12:42:45.93
!MESSAGE Plug-in de.sundn.prod.sunbow.core was disabled due to missing or disabled prerequisite plug-in org.eclipse.jface.

!SUBENTRY 1 org.eclipse.core.runtime 2 1 Mar 28, 2003 12:42:45.93
!MESSAGE Plug-in de.sundn.prod.sunbow.webapp was disabled due to missing or disabled prerequisite plug-in de.sundn.prod.sunbow.core.

!SUBENTRY 1 org.eclipse.core.runtime 2 1 Mar 28, 2003 12:42:45.93
!MESSAGE Unable to satisfy prerequisite constraint from de.sundn.prod.sunbow.xml to de.sundn.prod.sunbow.core.
!SUBENTRY 1 org.eclipse.core.runtime 2 1 Mar 28, 2003 12:42:45.93
!MESSAGE Unable to satisfy prerequisite constraint from de.sundn.prod.sunbow.cocoon to de.sundn.prod.sunbow.core.


Thanks for any help you can provide.


Keith.



-Original Message-
From: Martin Dulisch [mailto:[EMAIL PROTECTED]]
Sent: 28 March 2003 13:03
To: [EMAIL PROTECTED]
Subject: Re: [ANN] sunBow 1.0



Hi Keith,


are you using eclipse 2.1 or 2.0.1. It should be 2.1.


Have a look in the eclipse .log file. Are there any errors about
sunBow.


Martin


Lyall, Keith wrote:
 Hi,

 I downloaded the sunBow zip file and extracted it to my Eclipse
plugin
 directory but it doesn't seem to have been picked up.

 I am using Eclipse v2.01.

 Any suggestions?

 Keith.

 -Original Message-
 From: Martin Dulisch [mailto:[EMAIL PROTECTED]]
 Sent: 28 March 2003 09:02
 To: [EMAIL PROTECTED]
 Subject: [ANN] sunBow 1.0


 The SN sunBow team are proud to announce version 1.0. This free
 version is available immediately for download at:
 http://radio.weblogs.com/0108489/. In addition to numerous
bug-fixes,
 the new version now also supports sub-sitemaps and no longer
requires
 a licence key.

 sunBow is a collection of Eclipse (2.1) plugins that make it easier
to
 develop Cocoon based applications and XML solutions in general.

 * XML editor
 - completition proposals from associated schema
 - well formed check on save
 - automatic insertion of closing tags
 - formatting of the XML content

 * XSLT development
 - XSLT transformation
 - transformation trace

 * Cocoon
 - dialog orientated sitemap editor with drag and drop support
 and validation against a sitemap schema
 - management of sitemap fragments
 - configuration of the log level in logkit.xconf

 * Web application
 - deployment: automatic tracking of changes
 - testing: Apache Latka tests can be executed


 Regards
 Martin Dulisch
 -
 sn AG, Open Source Competence Center
 Tel.: 05251/1581-75
 Klingenderstr. 5 mailto:[EMAIL PROTECTED]
 D-33100 Paderborn http://www.s-und-n.de
 -



 
-
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


**
**
 This electronic mail system is used for information purposes and
is
 not intended to form any legal contract or binding agreement.
 The content is confidential and may be legally privileged. Access
 by anyone other than the addressee(s) is unauthorised and any
 disclosure, copying, distribution or any other action taken in
 reliance on it is prohibited and maybe unlawful

 All incoming and outgoing e-mail communications and attachments
 are scanned automatically by software designed to detect and
remove
 any material containing viruses or other unauthorised content.
 While we undertake best endeavours to ensure that this content
 checking software is up to date, recipients should take steps to
 assure themselves that e-mails received are secure.

**
**




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  This electronic mail system is used for information purposes and is
  not intended to form any legal contract or binding agreement.
  The content is confidential and may be legally privileged. Access
  by anyone other than the addressee(s) is unauthorised and any
  disclosure, copying, distribution or any other action taken in
  reliance on it is prohibited and maybe

RE: Castor and Cocoon

2003-03-21 Thread Lyall, Keith
Title: RE: Castor and Cocoon





Hi Gary,


If you look in the scratchpad area of the source (src\scratchpad\webapp\samples\castor) there is an example of how to do a Castor transformation. 

Keith.


-Original Message-
From: Howard, Gary [mailto:[EMAIL PROTECTED]]
Sent: 21 March 2003 14:09
To: '[EMAIL PROTECTED]'
Subject: Castor and Cocoon



I have a Java object that I am trying to turn into XML in my custom
generator class. I am trying to use Castor to do this. I am not sure how
to integrate Castor into the generator class. My concern is how I set the
ContentHandler. Does anyone have any input. There was not much on the web
about this.


Thanks,
Gary


Custom generator:


public void generate() throws SAXException, IOException
 {
 try
 {
 ClaimActivity claim = new ClaimActivity();
 claim.setInsuredName(Joe Shmoe);


 // the org.xml.sax.ContentHandler is inherited
 // through org.apache.cocoon.xml.AbstractXMLProducer
 Marshaller.marshal(new ClaimActivity(), contentHandler);
 }
 catch (ValidationException valex)
 {
 valex.printStackTrace();
 }
 catch (MarshalException marex)
 {
 marex.printStackTrace();
 }
 }



Her is the error that I am getting:


Mar 21, 2003 9:03:03 AM EST Error HTTP 101017
[ServletContext(id=546240
3,name=cocoon,context-path=/cocoon)] Root cause of ServletException
java.lang.NoClassDefFoundError: org/apache/xml/serialize/XMLSerializer
 at org.exolab.castor.xml.Marshaller.initialize(Marshaller.java:383)
 at org.exolab.castor.xml.Marshaller.init(Marshaller.java:329)
 at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:665)
 at COPRGenerator.generate(COPRGenerator.java:43)
 at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(Ca
chingEventPipeline.java:258)
 at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(C
achingStreamPipeline.java:412)
 at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invo
ke(SerializeNode.java:148)
 at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNo
de.invokeNodes(AbstractParentProcessingNode.java:84)
 at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNod
e.invoke(PreparableMatchNode.java:164)
 at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNo
de.invokeNodes(AbstractParentProcessingNode.java:108)
 at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode..invok


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  This electronic mail system is used for information purposes and is
  not intended to form any legal contract or binding agreement.
  The content is confidential and may be legally privileged. Access
  by anyone other than the addressee(s) is unauthorised and any
  disclosure, copying, distribution or any other action taken in
  reliance on it is prohibited and maybe unlawful

  All incoming and outgoing e-mail communications and attachments
  are scanned automatically by software designed to detect and remove
  any material containing viruses or other unauthorised content.  While
  we undertake best endeavours to ensure that this content checking
  software is up to date, recipients should take steps to assure themselves
  that e-mails received are secure.






Problem writing a BetwixtTransformer

2003-03-12 Thread Lyall, Keith
Title: Problem writing a BetwixtTransformer





Hi,


I am trying to write a BetwixtTransformer based on CastorTransformer but have run into a problem.


Everything appears to be working Ok according to my logging messages until the XML is serialized when I get this error:


java.lang.RuntimeException: java.lang.NullPointerException
 at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3231)
 at java.lang.Thread.run(Thread.java:536)


To get the BetwixtTransformer up and running do the following:


1. Create an XML file to be read in via a generator:


?xml version=1.0?
document xmlns:betwixt=http://jakarta.apache.org/commons/betwixt/betwixttransfomer
 betwixt:InsertBean name=form scope=request/
/document


2. Add the following to your sitemap.xmap:


map:components


 map:transformers default=xslt
 map:transformer logger=sitemap.transformer.betwixt name=betwixt src="">

 /map:transformers


 map:actions
 map:action
 name =DisplayFormAction
 src =test.DisplayFormAction
 logger =sitemap.action/
 /map:actions


/map:components


map:pipelines


 map:pipeline


 map:match pattern=form*.xml
 map:act type=DisplayFormAction
 map:parameter name=form-pk value={1}/
 /map:act


 map:generate src="">
 map:transform type=betwixt/


 map:transform type=log
 map:parameter name=logfile value=c:/temp/logfile.log/
 map:parameter name=append value=no/
 /map:transform


 map:serialize type=xml/
 /map:match



 /map:pipeline


/map:pipelines


3. Add the following two classes to your cocoon.war


/ -- /
/ BetwixtTransformer /
/ -- /



package org.apache.cocoon.transformation;


import org.apache.avalon.framework.parameters.Parameters;


import org.apache.cocoon.environment.Context;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.Session;
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.commons.betwixt.io.SAXBeanWriter;
import org.apache.commons.logging.impl.SimpleLog;


import org.xml.sax.Attributes;


import java.util.Map;


public class BetwixtTransformer extends AbstractTransformer
{
 private static final String BETWIXT_URI =
 http://jakarta.apache.org/commons/betwixt/betwixttransfomer;
 private static final String CMD_INSERT_BEAN = InsertBean;


 private static final String ATTRIB_NAME = name;
 private static final String ATTRIB_SCOPE = scope;
 private static final String VALUE_SITEMAP = sitemap;
 private static final String VALUE_SESSION = session;
 private static final String VALUE_REQUEST = request;
 private static final String VALUE_CONTEXT = context;


 private boolean in_betwixt_element = false;


 private Map objectModel;
 private SourceResolver resolver;


 /**
 * Default constructor
 */
 public BetwixtTransformer()
 {
 }


 /**
 * @see org.apache.cocoon.sitemap.SitemapModelComponent#setup(SourceResolver, Map, String, Parameters)
 */
 public void setup(
 SourceResolver resolver,
 Map objectModel,
 String source,
 Parameters params)
 throws
 org.apache.cocoon.ProcessingException,
 org.xml.sax.SAXException,
 java.io.IOException
 {
 this.objectModel = objectModel;
 this.resolver = resolver;
 }


 /**
 * @see org.xml.sax.ContentHandler#endElement(String, String, String)
 */
 public void endElement(String uri, String name, String raw)
 throws org.xml.sax.SAXException
 {
 getLogger().debug(endElement:  + name);


 // Check that we are currently in the Betwixt
 if (BETWIXT_URI.equals(uri))
 {
 in_betwixt_element = false;
 return;


 }


 super.endElement(uri, name, raw);
 }


 /**
 * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
 */
 public void startElement(
 String uri,
 String name,
 String raw,
 Attributes attr)
 throws org.xml.sax.SAXException
 {
 getLogger().debug(startElement:  + name);


 if (BETWIXT_URI.equals(uri))
 {
 in_betwixt_element = true;


 process(name, attr);
 return;
 }


 super.startElement(uri, name, raw, attr);
 }


 /**
 * @see org.xml.sax.ContentHandler#characters(char[], int, int)
 */
 public void characters(char[] ch, int start, int len)
 throws org.xml.sax.SAXException
 {
 if (in_betwixt_element)
 {
 return;
 }


 super.characters(ch, start, len);
 }


 /**
 * Method process.
 * @param command
 * @param attr
 */
 private void process(String command, Attributes attr)
 {
 if (command.equals(CMD_INSERT_BEAN))
 {
 String sourcemap = attr.getValue(ATTRIB_SCOPE);
 String name = attr.getValue(ATTRIB_NAME);


 Object toInsert;


 Request request = ObjectModelHelper.getRequest(objectModel);


 if (name == null)
 {
 getLogger().error(attribut to insert not set);
 }
 /*
 searcl all maps for the given bean
 */
 else
 {
 if (sourcemap == null || VALUE_SITEMAP.equals(sourcemap))
 {
 getLogger().debug(
 Searching bean ' + name + ' in  + VALUE_SITEMAP);


 toInsert = objectModel.get(name);


 if (toInsert != null)
 {
 insertBean(toInsert);


 return;
 }
 }


 if (sourcemap == null || 

RE: Problem writing a BetwixtTransformer

2003-03-12 Thread Lyall, Keith
Title: Problem writing a BetwixtTransformer



Hi 
Marco,

I 
tried putting try / catch blocks round all of the code in the methods I have 
overridden but no exceptions were caught.

Do you 
suggest any other ways to debug a transformer?

Keith.


  -Original Message-From: Marco Rolappe 
  [mailto:[EMAIL PROTECTED]Sent: 12 March 2003 14:43To: 
  [EMAIL PROTECTED]Subject: AW: Problem writing a 
  BetwixtTransformer
  hi 
  keith,
  
  I 
  didn't analyze the code and can't tell you directly where the bug is 
  but...
  
  I 
  also got a similar exception which seemed to be an XSLT/xalan exception but 
  actually was an exception thrown from within a custom transformer. somehow the 
  stack trace seems to have been lost.
  
  you 
  might want to debug your trasformer to find the actual 
bug.
  
-Ursprüngliche Nachricht-Von: 
[EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED]Im 
Auftrag von Lyall, KeithGesendet: Mittwoch, 12. März 2003 
14:16An: '[EMAIL PROTECTED]'Betreff: Problem 
writing a BetwixtTransformer
Hi, 
I am trying to write a BetwixtTransformer based on 
CastorTransformer but have run into a problem. 
Everything appears to be working Ok according to my logging 
messages until the XML is serialized when I get this error: 
java.lang.RuntimeException: 
java.lang.NullPointerException 
 at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3231) 
 at 
java.lang.Thread.run(Thread.java:536) 

  This electronic mail system is used for information purposes and is
  not intended to form any legal contract or binding agreement.
  The content is confidential and may be legally privileged. Access
  by anyone other than the addressee(s) is unauthorised and any
  disclosure, copying, distribution or any other action taken in
  reliance on it is prohibited and maybe unlawful

  All incoming and outgoing e-mail communications and attachments
  are scanned automatically by software designed to detect and remove
  any material containing viruses or other unauthorised content.  While
  we undertake best endeavours to ensure that this content checking
  software is up to date, recipients should take steps to assure themselves
  that e-mails received are secure.