Re: Path selector - Cocoon 2.2.

Mansour Al Akeel <[email protected]>
Newsgroups gmane.text.xml.cocoon.user
Message-ID <CAFvvX=Z39XNwA8VgZj0YYdwxnVKKOruzY8=M8SJ2LrkLzJPoig@mail.gmail.com>
Thank you Robby. Here is how I did it, since I need to two characters
language id:

<map:pipeline id="language-matcher">

			<map:match pattern="en/**.xml">
				<map:generate src="cocoon:/english/{1}.xml" />
				<map:serialize type="xml" />
			</map:match>

			<map:match pattern="fr/**.xml">
				<map:generate src="cocoon:/french/{1}" />
				<map:serialize type="xml" />
			</map:match>
		</map:pipeline>





On Thu, Dec 13, 2012 at 6:10 AM, Robby Pelssers <[email protected]> wrote:
> All you need is a correct matcher:
>
>
> <!--
>  {1}: language: e.g. English | french
>  {2}: folder: e.g. dir_1 | dir_2
> -->
> <map:match pattern="repo/*/*.xml">
>    <map:generate src="file:///c:/repo/{1}/{2}.xml"/>
>    <map:serialize type="xml"/>
> </map:match>
>
> -----Original Message-----
> From: Mansour Al Akeel [mailto:[email protected]]
> Sent: Wednesday, December 12, 2012 9:42 PM
> To: users
> Subject: Path selector - Cocoon 2.2.
>
> Hello all,
>
> I am looking to select a path for a directory depending on language prefix. For example, let's say I have
>
> C:\repo\english\dir_1
>
> C:\repo\english\dir_2
>
> C:\repo\english\dir_3
>
> C:\repo\english\dir_4
>
>
> C:\repo\french\dir_1
>
> C:\repo\french\dir_2
>
> C:\repo\french\dir_3
>
> C:\repo\french\dir_4
>
>
> I have multiple matchers, for different type of documents. For example:
>
> <matcher pattern="doc1/*.xml" >
> <generator src=C:\repo\english\dir_1" /> ..
> <matcher>
>
> I would like to turn this into a matcher for both languages with two characters representation of the language. For example:
>
> en/doc1/*.xml AND fr/doc1/*.xml
>
> How can I do selection the correct path with this ? In other words, use if else ? Is there a current selector that helps in this ??
>
> Thank you
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.