Yet another person wrote:
Ken,
Why do you use double *s and not just a single one?


On Sun, May 3, 2009 at 7:09 PM, Ken Starks <[email protected] <mailto:[email protected]>> wrote:

    Yet another person wrote:

        I've been trying to use a css stylesheet in my xsl
        transformation but It doesn't come through.

        It seems cocoon doesn't understand relative paths

    For local paths, you can use something like the following.
    (I usually put all my Graphics in a 'Graphics' sub-folder,
    and put xslt and css files together in a 'Style' sub-folder )

    ********************  quote from a sitemap **********************

    <!-- for many file-types that are not caught already we
    just serve them up.

    They are graphics types, pdf, and cascading stylesheets -->
     <map:match pattern="**.png">
    <map:read src="Graphics/{1}.png" />
    </map:match>

    <map:match pattern="**.gif">
    <map:read src="Graphics/{1}.gif" />
    </map:match>

    <map:match pattern="**.jpg">
    <map:read src="Graphics/{1}.jpg" />
    </map:match>

    <map:match pattern="**.jpeg">
    <map:read src="Graphics/{1}.jpeg" />
    </map:match>


    <map:match pattern="**.pdf">
    <map:read src="PDF/{1}.pdf" />
    </map:match>

    <map:match pattern="**.css">
    <map:read src="Style/{1}.css" />
    </map:match>

    ********************  end quote *********************************



        nor does it understand resource/internal/stylesheets/file.css
        or any other link i've tried.

        I even made a pipeline to match the css from my sitemap but
        that didn't work either.

        It's probably something silly but I can't seem to find it -
        any help would be greatly appreciated



        Thanks in advance!



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: [email protected]
    <mailto:[email protected]>
    For additional commands, e-mail: [email protected]
    <mailto:[email protected]>


double ** s are a wildcard that goes arbitrarily deep down the folder hierarchy

e.g.   **.html

will match all urls such as Foo.html and Bar.html (as you would expect for a wildcard)
and also ...
One/two/three/Foo.html
put/whatever/you/want/in/between/Bar.html

You can 'get at' the individual parts of the path with such wildcard expressions
as **/*.html



I hope this helps. It is all documented on the cocoon website somewhere, but I admit I
never stumbled upon it there, I learned it from a book.



P.S. I normally put in at least one very general matcher indeed and redirect the user back to the login page or home page from it. (Not sensible until you have tested all the links you want to go to proper destinations - you want the error page or some version of it at
that, the development, stage )

(For even more flexibility you can use regular expressions in your matchers)


Ken.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to