From: "Anna Afonchenko" <[EMAIL PROTECTED]>

> Oh, sorry, this is my typo.
> The error is of course
> The requested URI "/cocoon/test/xml.apache.org/faq-xslt.html" was not
found
>
> But the problem is still the same:
> ** doesn't match URI "xml.apache.org/faq-xslt.html".
> I can of course make two pipelines, one will match *, and the other will
> match **,
> but it is really strange that ** doesn't match the URI with single slash
for
> me.
> What do you mean by "something is differently resolved, if it's only 1
> slash"?
> Somebody can solve this mistery for me?

This is known behavior of "**" patterns. They match only paths, while "*"
pattern matches a file (no slashes in the name). I know this is not very
convinient to create two identical matchers, but as you could see from
sample sitemaps this is a usual situation and it's solved using two
matchers, one for "**" paths and one for "*". Another solution could be to
use the regexp matcher with an appropriate expression.

Try to raise this issue on dev list and probably this will be solved somehow
in future releases. (One of the possibilities could be to allow expressions
like "test/** | test/*" in patterns.)

Konstantin

>
> Thank you very much for your help.
> Anna
>
>
> ----- Original Message -----
> From: "Joerg Heinicke" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, December 25, 2002 11:10 AM
> Subject: Re: Value-substitution question
>
>
> Hello Anna,
>
> I think the matcher is ok. ** matches everything on every hierarchy
> level (so 0, 1 or more slashes). It seems that something is differently
> resolved, if it's only 1 slash.
>
>  > _The requested URI "/cocoon/ub/xml.apache.org/faq-xslt.html" was not
> found_
>
> Where does the "ub" come from?
>
> Regards,
>
> Joerg
>
> Anna Afonchenko wrote:
> > Hi All!
> > I want to get the http request that will provide me the URI of the file
> > to generate (and transform).
> > E.g., the request that I should get will be something like
> > cocoon/test/xml.apache.org/cocoon/faq/faq-xslt.html
> > My pipeline is as following:
> > <map:match pattern="test/**">
> >     <map:generate src="http://{1}"; type="html"/>
> >     <map:transform src="test.xsl" type="xslt-saxon"/>
> >     <map:serialize type="xml"/>
> > </map:match>
> >
> > Here is my problem:
> > The pipeline matches the given http request only if the URI has more
> > than one slash, e.g., the previous example will work file, but if the
> > http request is something like
> > cocoon/test/xml.apache.org/faq-xslt.html (only one slash in the given
> > URI that is matched by the wildcard) then I get the error from Cocoon:
> > _The requested URI "/cocoon/ub/xml.apache.org/faq-xslt.html" was not
> found_
> >
> > But I can't also use only one asterisk in the pattern match, because
> > then I will be able to match only URI's that don't contain slashes.
> >
> > So please, can you tell me what is the right pattern match for the URI
> > with any number of slashes (zero, one or more)?
> >
> > Thank you very much for help.
> >
> > Anna
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to