cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: [c2] simple sitemap question
Date Mon, 16 Apr 2001 19:16:20 GMT
Donald,

No, your java code does not need to generate java source code........Please take a look at
LangSelect.java. I think you need an Action not a Matcher.

Thanks,
dims

--- Donald Ball <balld@webslingerZ.com> wrote:
> On Mon, 16 Apr 2001, giacomo wrote:
> 
> > > i'd like to have a conditional stylesheet in my sitemap. here's my default
> > > pipeline:
> > >
> > >    <map:match pattern="*">
> > >     <map:generate src="content/{1}.xml" type="serverpages"/>
> > >     <map:transform src="style/{1}.xsl"/>
> > >     <map:transform src="style/wziml-html.xsl"/>
> > >     <map:serialize/>
> > >    </map:match>
> >
> > Use a custom matcher then.
> 
> perhaps you'd be so kind as to nudge me in the right direction then? i
> note the matcher api consists of this method:
> 
> public interface Matcher extends Component {
>     /**
>      * Matches the pattern against some <code>Request</code> values
>      * and returns a <code>Map</code> object with replacements
>      * for wildcards contained in the pattern.
>      * @param pattern     The pattern to match against. Depending on the
>      *                    implementation the pattern can contain wildcards
>      *                    or regular expressions.
>      * @param objectModel The <code>Map</code> with object of the
>      *                    calling environment which can be used
>      *                    to select values this matchers matches against.
>      * @return Map        The returned <code>Map</code> object with
>      *                    replacements for wildcards/regular-expressions
>      *                    contained in the pattern.
>      *                    If the return value is null there was no match.
>      */
>     Map match (String pattern, Map objectModel);
> }
> 
> but i'll be danged if i can find a class which actually implements this
> interface. is this old?
> 
> maybe i'm supposed to write my own MatcherFactory class? if so, then let
> me get this straight - i'm supposed to write my own java class which
> generates java source code in order to put a condition around a pipeline
> component?
> 
> - donald
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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


Mime
View raw message