You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ferdinand Soethe <fe...@apache.org> on 2008/03/03 11:19:24 UTC
Changes to xi:include handling
I have some trouble using xi:include with head.
When I last used it it 0.7 something like
<xi:include href="indextest.xml"
xmlns:xi="http://www.w3.org/2001/XInclude"/>
would include a document from the same directory that the
including file is in.
Now when I use this in head I get an error
Resource not found: file:/C:/forrest/head/main/webapp/indextest.xml
meaning the file is looked for in the forrest programm
directory.
Does anybody know why this was changed or how I can get my
convenient relative addressing back?
Or at least how to include the current directory w/o
hardcoding it?
Thanx,
Ferdinand
Re: Changes to xi:include handling
Posted by Ferdinand Soethe <fe...@apache.org>.
David Crossley wrote:
> There was recent discussion about XInclude in our archives
> (IIRC forrest user list). There was a suggestion to enable it
> by default in our xdocs dtd. No-one followed through.
Yeah. Is read that and some others. But none of it worked.
> Also did you try using the "cocoon://" protocol.
Now I did. And it works like a charm. Thank you kindly.
Best regards,
Ferdinand Soethe
Re: Changes to xi:include handling
Posted by David Crossley <cr...@apache.org>.
Ferdinand Soethe wrote:
> I have some trouble using xi:include with head.
> When I last used it it 0.7 something like
>
> <xi:include href="indextest.xml"
> xmlns:xi="http://www.w3.org/2001/XInclude"/>
>
> would include a document from the same directory that the
> including file is in.
>
> Now when I use this in head I get an error
>
> Resource not found: file:/C:/forrest/head/main/webapp/indextest.xml
>
>
> meaning the file is looked for in the forrest programm
> directory.
Perhaps the introduction of the locationmap.
That is the osbcure error message when the locationmap
cannot find something. It looks in the webapp context.
> Does anybody know why this was changed or how I can get my
> convenient relative addressing back?
> Or at least how to include the current directory w/o
> hardcoding it?
There was recent discussion about XInclude in our archives
(IIRC forrest user list). There was a suggestion to enable it
by default in our xdocs dtd. No-one followed through.
Also did you try using the "cocoon://" protocol.
There is past discussion about that too.
http://forrest.markmail.org/search/?q=xinclude+cocoon+protocol
http://forrest.markmail.org/search/?q=xinclude+dtd
https://issues.apache.org/jira/browse/FOR-1032
That FOR-1032 came close, though there are some unresolved issues.
I agree with Ross' comments in earlier threads that we could
enable xinclude in the current 2.0 DTD.
I am going away soon for a week's holiday. If you
haven't got it sorted, i will try to help after that.
-David