Damn Myles,

you must be a psychic ... I just finished writing following requirement to a 
colleague of mine:

-------------------------
We need a validating transformer which can take a schema or dtd as @src 
attribute.   I've seen this working in Cocoon3 and maybe something like this is 
already available for version 2.2.  The basic idea is that this transformer 
does either:
- NOTHING with the input in case the xml is valid
- throws a ValidationException in case the xml is invalid
-------------------------

But I first wanted to check if something was already available for Cocoon2.2

So if anyone already is using this... let me know.

Kind regards,
Robby Pelssers


-----Oorspronkelijk bericht-----
Van: Myles Byrne [mailto:bohmb...@gmail.com]
Verzonden: do 17-2-2011 15:11
Aan: users@cocoon.apache.org
Onderwerp: ValidationReportTransformer in 2.2?
 
Hi all,

Has anyone got the old 2.1 (schema, not form) Validation block working in
2.2?  I see in the 2.1 samples that cocoon-validation-impl was included as a
module, but my attempts to incorporate this in a 2.2 project have so far
failed. I would think cocoon-validation-impl would be covered by
my cocoon-validation dependency, below, but this produces the error (also
below). Any clues?

Cheers,
- Myles Byrne
FIMM.fi, Helsinki


My POM:
<dependency>
    <groupId>cocoon</groupId>
    <artifactId>cocoon-validation</artifactId>
    <version>2.1.11</version>
</dependency>

My sitemap:

    <map:transformers>
    <map:transformer name="validation-report" src="
org.apache.cocoon.transformation.ValidationReportTransformer"/>
    </map:transformers>

...

  <map:match pattern="val_sch">
<map:match type="request-parameter" pattern="url">
     <map:generate src="{1}"/>
      <map:transform type="validation-report" src="lsdb.rng"
label="raw-report" />
    <map:serialize type="html"/>
</map:match>
   </map:match>
  </map:pipeline>

but then:

javax.servlet.ServletException: org.apache.cocoon.ProcessingException:
Failed to process pipeline
 at <map:serialize type="html"> -
file:///home/mbyrne/lsdb1/lsdb/./src/main/resources/COB-INF/sitemap.xmap:79:33
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name
'org.apache.cocoon.transformation.Transformer/validation-reportPooled':
Initialization of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Unable to
initialize Avalon component with role
org.apache.cocoon.transformation.Transformer/validation-reportPooled; nested
exception is org.apache.avalon.framework.service.ServiceException: Component
with 'org.apache.cocoon.components.validation.Validator' is not defined in
this service manager. (Key='AvalonServiceManager')

<<winmail.dat>>

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

Reply via email to