J.Pietschmann wrote: > Lars Huttar wrote: > > Now I changed that to "*/*/framework", i.e. removed the > trailing "/", > > and now it works (the document() function is finding the XML file > > ../resources/gem-data.xml). > > > > Weird! I'm still trying to figure out what that means. Any > pointers? > > Does it mean Xalan is a nonconformant XSL processor? > > No, it means the Cocoon source resolver didn't remove the last > component of the base URL and therefore resolved your URL wrong.
Thanks, I think I'm on the verge of learning something here. The base URL of what? Of the request URL? The only base URL that should be relevant is the base URL of the stylesheet. Yet the base URL of the stylesheet didn't change when I fixed the problem. So how could the Cocoon source resolver's processing of the stylesheet's base URL have caused the problem? Why should the changing request-URL affect the resolving (whether done by Cocoon source resolver or Xalan) of a relative URL with respect to the base URL of the stylesheet? > You shouldn't use document() in Cocoon style sheets anyway, for a > variety of reasons, one of them bein problems with caching. > Use <map:aggregate>, XInclude or CInclude instead. There shouldn't be a problem with caching in this case, because the referenced xml document is static. Any other compelling reason not to use document()? The referenced document in this case is a lookup-table that had been in my stylesheet; I decided to move it out into a separate XML file so I could share it between two stylesheets. That structural change doesn't affect the input or output of the stylesheet, so theoretically it shouldn't be necessary for the pipeline to know where this static data is stored (which it would have to if I used map:aggregate, XInclude, or CInclude). As someone else mentioned recently, there are times when document() does make things a lot simpler. It would be a shame for Cocoon, which uses XSL so heavily, to be hobbled by a general don't-use-document() rule. Lars --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
