You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "c.h.Ip" <ch...@alumni.cuhk.edu.hk> on 2000/05/20 08:45:55 UTC
Newbie! Embedded XML help...
hi all,
Can I do to embed another XML with Cocoon's XSP?
There is a XML file:
question.xml
------------
<?xml version='1.0'>
<!-- cocoon,xsl-stylesheet tags are ommitted here.. -->
<assignment>
<question id=1>
<text>What is Cocoon?</text>
</question>
</assignment>
This XML is gone through a XSL stylesheet, becomes a HTML form
let user to enter some content (aka, the answer of the question)
When the user submit the form, I wish I can write a XML file (based
on the above XML file, with addition of user's answer) into filesystem
and NOT being transformed by any XSL, like the following:
submit.xml
----------
<?xml version='1.0'>
<!-- cocoon,xsl-stylesheet tags are ommitted here.. -->
<submittedpaper studentid='001'>
<assignment>
<question id=1>
<text>What is Cocoon?</text>
</question>
</assignment>
<studentanswers>
<question id=1>
<text>This is something I don't familiar with</text>
</question>
</studentanswers>
</submittedpaper>
Where line 4-8 is the exact content of question.xml.
Can it be done using XSP, or should I write the raw servlet code for
this?
Very much thanks for help, I need to finish up this work quick...
Regards,
c.h.Ip (from Hong Kong)
Re: Newbie! Embedded XML help...
Posted by Ulrich Mayring <ul...@denic.de>.
"c.h.Ip" wrote:
>
> hi all,
>
> Can I do to embed another XML with Cocoon's XSP?
You might want to look at XMLForm!
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung
Re: Newbie! Embedded XML help...
Posted by Donald Ball <ba...@webslingerZ.com>.
On Sat, 20 May 2000, c.h.Ip wrote:
> hi all,
>
> Can I do to embed another XML with Cocoon's XSP?
Try the XInclude processor or use the <util:include-uri> element. That
doesn't sound like what you're asking below though.
> There is a XML file:
>
> question.xml
> ------------
>
> <?xml version='1.0'>
> <!-- cocoon,xsl-stylesheet tags are ommitted here.. -->
> <assignment>
> <question id=1>
> <text>What is Cocoon?</text>
> </question>
> </assignment>
>
> This XML is gone through a XSL stylesheet, becomes a HTML form
> let user to enter some content (aka, the answer of the question)
>
> When the user submit the form, I wish I can write a XML file (based
> on the above XML file, with addition of user's answer) into filesystem
> and NOT being transformed by any XSL, like the following:
>
> submit.xml
> ----------
> <?xml version='1.0'>
> <!-- cocoon,xsl-stylesheet tags are ommitted here.. -->
> <submittedpaper studentid='001'>
> <assignment>
> <question id=1>
> <text>What is Cocoon?</text>
> </question>
> </assignment>
> <studentanswers>
> <question id=1>
> <text>This is something I don't familiar with</text>
> </question>
> </studentanswers>
> </submittedpaper>
>
> Where line 4-8 is the exact content of question.xml.
>
> Can it be done using XSP, or should I write the raw servlet code for
> this?
>
> Very much thanks for help, I need to finish up this work quick...
I've got a little something that might help you:
http://www.webslingerZ.com/balld/xmlform/
Jeremy Quinn and others on the mailing list are working on a more
comprehensive solution, but I don't think it's out of the planning stages
yet.
- donald