You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Z.Z." <za...@vili.pmmf.hu> on 2004/03/18 00:29:52 UTC
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
Re: Why source-writing doesn´t append?
Posted by Zamek <za...@vili.pmmf.hu>.
Hello,
Thanks it works well, but it seems to be I tried it.
On Thursday 18 March 2004 08.42, Jan Hoskens wrote:
> <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>
--
udv,
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
Re: Why source-writing doesn´t append?
Posted by Jan Hoskens <jh...@schaubroeck.be>.
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." <za...@vili.pmmf.hu>
To: <us...@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