Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 8604 invoked by uid 500); 22 Jan 2003 07:49:19 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 8588 invoked from network); 22 Jan 2003 07:49:18 -0000 Message-ID: <006b01c2c1ea$6c45d8a0$c243e39e@BIPA194> From: "Oskar Casquero" To: References: <000d01c2c18f$d24c3910$f44dfea9@HoCo.sphere.com> Subject: Re: Schematron transform in a Cocoon pipeline Date: Wed, 22 Jan 2003 08:46:17 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: 208.185.179.12.available.above.net 1.6.2 0/1000/N Hi Jack, I have done the same to validate an XML document with an schematron. I think that it would be also useful to get the XPATH path of the errors in the XML output. The template which does this is done in skeleton1-5 (); so you have to call it from the assert template: Markup Error: no test attribute in <assert> Oskar ----- Original Message ----- From: "John R. Callahan" To: Sent: Tuesday, January 21, 2003 9:58 PM Subject: Schematron transform in a Cocoon pipeline > This seems too simple, but I wanted to see if I could > use Schematron generated XSLT to validate some > XML in a Cocoon pipeline. This might be used for > validating uploaded XML files for example. > > I downloaded the latest Schematron skeleton (1.5), > then generated some XSLT from a set of assertions, > and then put it into a transform in a pipeline with some > data: > > > > > > > > > > > > > > > > > > > > (see below for the source code for store.xsl) > > Unfortunately, the Schematron skeleton puts out plain > text messages so the output from data1.xml isn't well-formed > XML. What I wanted was a series of applicable > Schematron messages as XML output. So, I altered > the skeleton somewhat and now I works! > > My alterations to the skeleton were pretty simple: > > (1) Add the following template: > > > > > > (2) Wrap a around the "/" template: > > > > > ... > > > > > Finally, you must wrap all messages in the .sch file with > ... as follows: > > > ... > > If the Title is "Mr" then the sex of the person must be "Male". > > ... > > > Enjoy! > > -- jack > > > (The XSLT file "store.xsl" is my own brew to wrap an > element around the input source for use by the subsequent > SourceWriterTransformer: > > > > > > > > > > > > / > > > > > > > > ) > > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. > > To unsubscribe, e-mail: > For additional commands, e-mail: > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: