cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Huttar <lars_hut...@sil.org>
Subject DTD validation: "Unsupported grammar language"
Date Tue, 19 Dec 2006 17:32:11 GMT
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 
http://cocoon.zones.apache.org/daisy/documentation/864/validation.html 
and 
http://cocoon.zones.apache.org/daisy/documentation/components/1058/g2/691.html.
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="http://www.w3.org/TR/REC-xml" />
        </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 "http://www.w3.org/TR/REC-xml". (I also tried "dtd" just for kicks.)
But the result is that I get the error
    org.apache.cocoon.components.validation.ValidatorException: 
Unsupported grammar languagehttp://www.w3.org/TR/REC-xml

Does this mean there is no support for validating against DTDs? Or am I 
doing something wrong?

Thanks,
Lars


On 10/20/2006 9:34 AM, José Miguel Vieira wrote:
 > Hello,
 >
 > I'm trying to use the validation report features, using a dtd for the
 > validation.
 >
 > What is the correct grammar value for dtd validation? I'm
 > using http://www.w3.org/TR/REC-xml but it returns an "Unsupported
 > grammar language".
 >
 > Thanks,
 > Miguel Vieira
I have the same need and am running into the same dead end. Does anyone
have an answer?
Do we need to add something to cocoon.xconf?

Thanks,
Lars


Mime
View raw message