cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ferran Urgell" <ferran_urg...@hotmail.com>
Subject Re: writing xml to file
Date Wed, 20 Feb 2002 16:02:29 GMT
Ok, I don't know what is ... but here you have a piece of my xsl file, with the xsl, I'm writing
into file on hard disk...
Please send me the xml...and more details.... 

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                              xmlns:sql="http://apache.org/cocoon/SQL/2.0"
         xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
         extension-element-prefixes="redirect">
<xsl:output method="html" encoding="UTF-8"/>
<xsl:template match="content">
<redirect:write file="../webapps/ROOT/lab/arbre/labescriurexml.txt">
<MENU1>
<TREE_SCRIPT> 1.01
<HEAD>
</HEAD>
<BODY>
<MENU>text=LABORATORIS
<xsl:apply-templates/>
</MENU>
</BODY>
</TREE_SCRIPT>
</MENU1>

</redirect:write>
</xsl:template>

Regards...
Ferran Urgell 
  ----- Original Message ----- 
  From: Je vous site 
  To: cocoon-users@xml.apache.org 
  Sent: Wednesday, February 20, 2002 4:37 PM
  Subject: Re: writing xml to file


  Hello,

  I'm new to cocoon

  I want to write an xml file on hard disk. So I've tried what you said. It didn't run.
  I have modify your piece of  XSL to fit my configuration because, i've found a Redirect
class in Xalan.jar with a different path. It still don't run.

  Could you say me what i have forgot, please.

  Thank you : Xavier


  <?xml version="1.0" encoding="ISO-8859-1"?>
  <xsl:stylesheet     xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
              xmlns:redirect="org.apache.xalan.lib.redirect" extension-element-prefixes="redirect">

  <xsl:template match="/">
  <redirect:write file="file.txt">

   Here put the xsl sentences........like apply templates.....

  </redirect:write>



  Ferran Urgell wrote:

In the xsl you can try something like:<?xml version="1.0"?><xsl:stylesheet version="1.0"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                             xmlns:sql="http://apache.org/cocoon/SQL/2.0"         xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
        extension-element-prefixes="redirect">  <xsl:template match="/"><redirect:write
file="../webapps/ROOT/file.txt">< Here put the xsl sentences........like apply templates.....></redirect:write></xsl:template></xsl:stylesheet>-----
Original Message -----From: "Bert Van Kets" <bert@visitronics.be>To: <cocoon-users@xml.apache.org>Sent:
Thursday, February 14, 2002 10:54 AMSubject: writing xml to file
I have built a system where I can edit the content of an xml file in abrowser by using html
forms.  Comparing the request object with theoriginal XML (by use of ID's and aggregation)
lets me contruct the updatedxml file with the original structure.I would like to write this
file to disk, well actually overwrite theoriginal xml file.How do I go about this in Cocoon?Thanks,Bert---------------------------------------------------------------------Please
check that your question has not already been answered in theFAQ 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>
---------------------------------------------------------------------Please check that your
question has not already been answered in theFAQ 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>

  --------------------------------------------------------------------- Please check that
your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail:
For additional commands, e-mail: 

Mime
View raw message