cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: Parsing a Request Stream
Date Thu, 21 Mar 2002 10:20:25 GMT
At 2:22 pm +0100 19/3/02, Michael Raffenberg wrote:
>Hi,
>
>i like to receive a post input stream with the following sitemap
>definitions:
>     <map:match pattern="request">
>       <map:generate type="stream">
>         <map:parameter name="form-name" value="msg"/>
>       </map:generate>
>       <map:serialize type="xml"/>
>     </map:match>
>This works ok.
>The input will contain some xml-data with a dtd.
>Is it possible to get this input parsed again the dtd?

Not sure, you can validate it against a Schematron though.

Look in <slash-edit/> in CVS:

	xml-cocoon2/src/scratchpad/webapps/mount/editor/editor.xmap

>How can i track down any errors if the input is not valid?

Valid, or well formed?

There is little you can do to catch mal-formed XML in a form field using
the StreamGenerator, it was designed for inter-application usage, the
assumption was that all XML transferred, would already be well-formed..

>After parsing the input, i like to transform it with some
>xslt-stylesheets, how do i have to configure the sitemap for this?

     <map:match pattern="request">
       <map:generate type="stream">
         <map:parameter name="form-name" value="msg"/>
       </map:generate>
-->		 <map:transform src="your.xsl"/>
       <map:serialize type="xml"/>
     </map:match>

Hope this helps

regards Jeremy
-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:sharkbait@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pager:jermq@vizzavi.net>

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message