cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: DTD validation: "Unsupported grammar language"
Date Thu, 21 Dec 2006 00:09:49 GMT
Hello Lars,

just from having a look at the code:
1. It's (see Validator interface and its 
declared constants).
2. This exception is thrown in AbstractValidator.getValidationHandler() 
in line 327 in the current code. It is thrown when no SchemaParser can 
be found.
3. Grammars and their parsers seem to be configured via 
Configurable.configure(). So maybe the javadoc for this method [1] is 
helpful. Otherwise you might need to have a look into the code of this 
method or do some debugging.



On 19.12.2006 18:32, Lars Huttar wrote:
> Hello,
> I seconded this question on the Cocoon user list but have not received a 
> response, so would like to ask the developers.
> In Cocoon 2.1.9, we are trying to use ValidationReportTransformer to 
> validate our XML against a DTD. I'm looking at the documentation at 
> and 
> The validation sample block has examples for validating against RNG and 
> XML Schema, but not against a DTD.
> Like José quoted below, I'm trying to figure out how to make it work.
> Here's my attempt, a copy-and-modify of a match pattern in 
> samples\blocks\validation\sitemap.xmap:
>      <map:match pattern="report-dtd-valid">
>        <map:generate src="source-ok.xml"/>
>        <map:transform type="validation-report" src="schema-ok.dtd">
>          <map:parameter name="grammar" 
> value="" />
>        </map:transform>
>        <map:transform src="context:/stylesheets/system/xml2html.xslt"/>
>        <map:serialize/>
>      </map:match>
> I added the "grammar" parameter, as instructed by the documentation 
> referenced above, to the validation-report transformer.
> For grammar identifier, the documentation seemed to indicate I should 
> use "". (I also tried "dtd" just for kicks.)
> But the result is that I get the error
>    org.apache.cocoon.components.validation.ValidatorException: 
> Unsupported grammar language
> Does this mean there is no support for validating against DTDs? Or am I 
> doing something wrong?
> Thanks,
> Lars

View raw message