Return-Path: Delivered-To: apmail-cocoon-users-archive@www.apache.org Received: (qmail 46351 invoked from network); 25 May 2010 20:55:44 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 25 May 2010 20:55:44 -0000 Received: (qmail 26508 invoked by uid 500); 25 May 2010 20:55:44 -0000 Delivered-To: apmail-cocoon-users-archive@cocoon.apache.org Received: (qmail 26453 invoked by uid 500); 25 May 2010 20:55:44 -0000 Mailing-List: contact users-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: users@cocoon.apache.org List-Id: Delivered-To: mailing list users@cocoon.apache.org Received: (qmail 26440 invoked by uid 99); 25 May 2010 20:55:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 20:55:44 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lars_huttar@sil.org designates 208.145.81.52 as permitted sender) Received: from [208.145.81.52] (HELO smtp2.wsfo.org) (208.145.81.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 May 2010 20:55:37 +0000 Received: from mail.link77.net (cgp1.mail.link77.net [172.22.65.13]) by smtp2.wsfo.org (8.13.8/8.13.8) with ESMTP id o4PKtGhT028207; Tue, 25 May 2010 16:55:16 -0400 X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.10.1 (ClamAV engine v0.96) X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.10.1 (ClamAV engine v0.96) Received: from [172.20.4.197] (account lars_huttar@sil.org [172.20.4.197] verified) by cgp1.mail.link77.net (CommuniGate Pro SMTP 5.3.5) with ESMTPSA id 239523154; Tue, 25 May 2010 16:55:16 -0400 Message-ID: <4BFC3933.7070701@sil.org> Date: Tue, 25 May 2010 15:55:15 -0500 From: Lars Huttar User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: users@cocoon.apache.org Subject: Re: trouble with ValidationReportTransformer References: <4BFC200C.2070503@sil.org> In-Reply-To: <4BFC200C.2070503@sil.org> X-Enigmail-Version: 1.0.1 Content-Type: multipart/alternative; boundary="------------080402040205070206030900" X-Scanned-By: MIMEDefang 2.62 on 172.22.65.24 X-Virus-Checked: Checked by ClamAV on apache.org --------------080402040205070206030900 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 5/25/2010 2:07 PM, Lars Huttar wrote: > ... > Maybe I can work around the problem by specifying the grammar > explicitly, instead of relying on the component to guess the grammar > (RNG). However, none of the samples in the Cocoon sample block show > how to do this. The Cocoon top-level sitemap shows an example of > grammar config but without telling what values to use for grammar > identifiers. What value do I use to say "rng"? > > For documentation, the Cocoon sample block says to go to > http://cocoon.zones.apache.org/daisy/documentation/691.html > but that gives an error! > I found some javadoc at > http://www.java2s.com/Open-Source/Java-Document/Web-Framework/cocoon/org/apache/cocoon/transformation/ValidationReportTransformer.java.java-doc.htm > which helps. But I don't see where to find the allowed values for the > grammar parameter. > > Thanks for any help with how to get validation instead of the > exception, or what to use for the grammar parameter. > > Lars > Success! Following some hints from the documentation (after browsing several classes), I tried using the URL from the "grammar detected" exception as the grammar id, "http://relaxng.org/ns/structure/1.0": It worked! Oh, then I googled on that and found all the valid values for the grammar parameter, at http://cocoon.apache.org/2.1/apidocs/constant-values.html#org.apache.cocoon.components.validation.Validator.GRAMMAR_RELAX_NG Nice that Schematron is in the list. I wonder if it's possible to use RNC format? (the compact form of RNG) Lars --------------080402040205070206030900 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 5/25/2010 2:07 PM, Lars Huttar wrote:
...
Maybe I can work around the problem by specifying the grammar explicitly, instead of relying on the component to guess the grammar (RNG). However, none of the samples in the Cocoon sample block show how to do this. The Cocoon top-level sitemap shows an example of grammar config but without telling what values to use for grammar identifiers. What value do I use to say "rng"?

For documentation, the Cocoon sample block says to go to http://cocoon.zones.apache.org/daisy/documentation/691.html
but that gives an error!
I found some javadoc at http://www.java2s.com/Open-Source/Java-Document/Web-Framework/cocoon/org/apache/cocoon/transformation/ValidationReportTransformer.java.java-doc.htm
which helps. But I don't see where to find the allowed values for the grammar parameter.

Thanks for any help with how to get validation instead of the exception, or what to use for the grammar parameter.

Lars


Success!
Following some hints from the documentation (after browsing several classes), I tried using the URL from the "grammar detected" exception as the grammar id, "http://relaxng.org/ns/structure/1.0":
                <map:transform type="validation-report" src="cocoon://mount/gemination/{1}.rng" label="raw-report">
                    <map:parameter name="grammar" value="http://relaxng.org/ns/structure/1.0" />
                </map:transform>

It worked!

Oh, then I googled on that and found all the valid values for the grammar parameter, at
http://cocoon.apache.org/2.1/apidocs/constant-values.html#org.apache.cocoon.components.validation.Validator.GRAMMAR_RELAX_NG

Nice that Schematron is in the list. I wonder if it's possible to use RNC format? (the compact form of RNG)

Lars

--------------080402040205070206030900--