Yes, this helped me as well 8), I appreciate this.
On Mon Jun 01,2009 04:30 pm, V?ctor Pergolesi wrote:
> I proved some cases that could help you. I hope you undestand me.
> 1 - All the content of the pattern is read as an unique regular
> expresion. So the only part to reference I know is {0}.
> 2 - BUT there are different situacion if you use:
> case A: pattern="\.*(\d*$)" - Here {0} are all the numbers of the
> final
> case B: pattern="month(\d*$)" - Here {0} is month + the numbers of the
> final.
> I do not know exactly what you want to capture, but I undestand that
> could help you.
> 3 - You could capture the case B and then for example via an xsl
> retrieve the part you need.
> Below are the examples:
> <map:match type="regexp" pattern="month(\d*$)">
> <map:generate src="documento.xml"/>
> <map:transform src="documento.xsl">
> <map:parameter name="valor" value="{0}"/>
> </map:transform>
> <map:serialize />
> </map:match>
>
>
> <map:match type="regexp" pattern="\.*(\d*$)">
> <map:generate src="documento.xml"/>
> <map:transform src="documento.xsl">
> <map:parameter name="valor" value="{0}"/>
> </map:transform>
> <map:serialize />
> </map:match>
> File documento.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <elemento></elemento>
> File documento.xsl
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="[1]http://www.w3.org/1999/XSL/Transform">
> <xsl:param name="valor"/>
>
> <xsl:template match="/">
> <html>
> <head>
> <title>Expresión regular</title>
> </head>
> <body>
> Captura de expresión regular:<br></br>
> - aplication of a function to the value: <xsl:value-of
> select="substring-after($valor,'month')"/><br></br>
> - the value {0}:  <xsl:value-of select="$valor"/>
> </body>
> </html>
> </xsl:template>
>
> </xsl:stylesheet>
> I hope this help
> I will prove if {1} have a value in some case.
> Victor Pergolesi
> Codimat S.A.
> Área Sistemas
> Web: [2]www.codimat.com.ar
> Tel.: (0291) 459-2480 | 459-2424
> Fax: (0291) 459-2400 | 0-800-666-42266
> Don Bosco 1495 - B8003CAA Bahía Blanca - Argentina
> _______________________________________________________________
>
> From: Mansour Al Akeel [mailto:[3]mansour.alakeel@gmail.com]
> To: [4]users@cocoon.apache.org
> Sent: Mon, 01 Jun 2009 15:45:26 -0300
> Subject: Re: Regexp matcher with digits
> Can someone kindly answer this question and give an example about
> how to
> use regex and retrieve the matches. I am stuck with a project that's
> writen in Cocoon and I need this to continue.
> On Sun May 31,2009 01:54 am, Mansour Al Akeel wrote:
> > Ok, let's clarify this and put it in different words. I am able to
> match
> > on the digits part but not able to obtain this digits
> >
> > <map:match type="regexp" pattern="\.*/\d$">
> > ......
> > .....
> > <map:parameter name="href" value="{1}"/>
> > <map:parameter name="depth" value="{2}"/>
> >
> > The variable {1} is matching and I can obtain as expected, but {2}
> is
> > not.
> >
> >
> > Can someone please share the knowledge and direct me to resolve
> this ?
> >
> >
> >
> --------------------------------------------------------------------
> -
> To unsubscribe, e-mail: [5]users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: [6]users-help@cocoon.apache.org
> __________________________________________________________________
>
> Este mensaje y sus adjuntos contienen información confidencial y son pa
> ra uso exclusivo del destinatario. Si hubiese recibido este mensaje por
> error, o contuviera información que Ud. no desea recibir, por favor le
> agradecemos nos lo haga saber y lo elimine de su sistema. Cualquier in
> conveniente, enviarlo a librodequejas@codimat.com.ar.
> Este correo ha sido chequeado por el servidor de Codimat S.A. www.codim
> at.com.ar
>
> References
>
> 1. http://www.w3.org/1999/XSL/Transform%22
> 2. http://www.codimat.com.ar/
> 3. mailto:mansour.alakeel@gmail.com
> 4. mailto:users@cocoon.apache.org
> 5. mailto:users-unsubscribe@cocoon.apache.org
> 6. mailto:users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
|