Hello Edwin

On 12/30/05, Edwin Kapauni <[EMAIL PROTECTED]> wrote:
> Markus Vaterlaus wrote:
> > Hi all,
> >
> > just figured out, that the xpath directory generator needs additional
> > parameters if it has to deal with namespaces:
> Does this mean we no longer need to use "*[local-name()='something'"
> expressions in the xpath parameter like given below?
>

Correct, if you define the namespaces in mapping.properties you can
avoid workarounds as mentioned below.

Your workaround provides - asfaik - valid results for the following elements:

 my:something
 mynamespace:something
 xs:something
 ...

Maybe the results are not the ones expected. Especially  if you are
interested in the results just from one specific namespace.

> <map:generate type="xpathdirectory" src="./">
>     <map:parameter name="xpath"
> value="/*[local-name()='html']/*[local-name()='head']/*[local-name()='title']"/>
>     <map:parameter name="xmlFiles" value="\.*"/>
>     <map:parameter name="depth" value="999"/>
>     <map:parameter name="exclude" value="img|logics|sitemap.xmap|.*~"/>
> </map:generate>
>
>
> Just found it described in the API docs
> <http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/generation/XPathDirectoryGenerator.html>
> (with a typo on "mapping.proeprties").
>
> [...]
>  > However, can't figure out, if there is any additional documentation
>  > about  mapping.properties or its syntax. Anybody any clues?
>
> Guess it's a plain text file with one namespace per line and the syntax
> like in your example. But the API-doc lists it without quotation marks.
> Which one is correct?
>
>      prefix="namespace-uri"
> or  prefix=namespace-uri
>

It works without quotation marks. At least with cocoon 2.1.8

> Did you find out the location where to place the text file
> "mapping.properties"? Should it be in the same directory like sitemap:xmap?
>

I placed it in the same directory as the application's sitemap.xmap

--mv

>
> ---------------------------------------------------------------------
> 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]