cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Hoskens" ...@schaubroeck.be>
Subject Re: Why source-writing doesn´t append?
Date Thu, 18 Mar 2004 07:42:17 GMT
If you're trying to add something to your log use this:

<source:insert create="true">
   <source:path>log/entry</source:path>
   <source:source>mylog.log</source:source>
   <source:fragment>
        <logon>
                <some info....>
        </logon>
   </source:fragment>
</source:insert>

This adds <logon> elements to your file "mylog.log" within the path
"log/entry":
    <log>
        <entry>
            <logon/>
            <logon/>
        </entry>
    </log>

Kind Regards,
Jan


----- Original Message ----- 
From: "Z.Z." <zamek@vili.pmmf.hu>
To: <users@cocoon.apache.org>
Sent: Thursday, March 18, 2004 12:29 AM
Subject: Why source-writing doesn´t append?


> Hello All,
>
> I try to make an authentication´s log with sourceWriter, but it doesn´t
> insert it.
> I tried it without replace and reinsert but it doesn´t works?
> What do I do wrong?
>
> <xsl:template match="authentication">
>   <authentication>
>   <xsl:apply-templates/>
>   <source:write>
>     <source:source><xsl:value-of select="$logfile"/></source:source>
>     <source:path>log/entry</source:path>
>     <source:replace>logon</source:replace>
>     <source:reinsert>logon</source:reinsert>
>     <source:fragment>
>       <logon>
> <ID><xsl:value-of select="ID"/></ID>
> <role><xsl:value-of select="role"/></role>
> <firstname><xsl:value-of select="data/firstname"/></firstname>
> <lastname><xsl:value-of select="data/lastname"/></lastname>
> <email><xsl:value-of select="data/email"/></email>
> <date><xsl:value-of select="data/date"/></date>
> <time><xsl:value-of select="data/time"/></time>
> <remote-addr><xsl:value-of select="data/remote-addr"/></remote-addr>
> <remote-host><xsl:value-of select="data/remote-host"/></remote-host>
>      </logon>
>    </source:fragment>
>   </source:write>
> </authentication>
> </xsl:template>
>
> -- 
> thx,
> ----------------------------------------------------
> Zoltan Zidarics programmer
> PTE University Pecs, Hungary
> icq: 43288694
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>


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


Mime
View raw message