You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Juan Jose Pablos <ch...@che-che.com> on 2004/11/12 22:29:23 UTC
About RAW content
Hi,
Looking at this :
<!-- ======================== FOP Additions ======================== -->
<map:match pattern="*/svg/*.svg">
<map:read src="{project:content.xdocs}{1}/svg/{2}.svg"
mime-type="image/svg"/>
</map:match>
It seems that people are having problems with the fact that the raw
content is in another directory.
I have a patch to resolve this and put xdocs and content in the same
directory:
<!-- ============================================================ -->
<!-- OUTPUT FORMATS -->
<!-- Serves content directly to the user -->
<!-- +==========================================================+ -->
<!-- http://forrest.apache.org/docs/sitemap-ref.html#output_pipelines -->
<map:match type="regexp" pattern="^.+$">
<map:select type="exists">
- <map:when test="{project:content}/{0}">
+ <map:when test="{project:content.xdocs}/{0}">
<map:mount uri-prefix="" src="raw.xmap" check-reload="yes" />
</map:when>
That should be enought (plus the new references on the raw.xamp)
Should I apply this one?
Cheers,
cheche
Re: About RAW content
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Ferdinand Soethe wrote:
>
> Nicola Barozzi wrote:
>
>>>What about when a file is linked to from another file, but not in site.xml?
>
> NKB> Ok, refer as file.source.html :-)
> NKB> Or name the source as file.source.html.
>
> I didn't understand what solution is to be. Can one of you pls
> explain. What do I have to do when I want to have a file, that is
> linked to from another file but not in site.xml shop up in my output?
This is point 2 of this discussion, and we don't know. Suggestions
welcome :-)
> So far it has to be in the parallel raw-directory to be copied. Will
> it in future be sufficient to place it in the xdocs-directory along
> with the file that do have en entry in site.xml?
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re[2]: About RAW content
Posted by Ferdinand Soethe <sa...@soethe.net>.
Nicola Barozzi wrote:
>> What about when a file is linked to from another file, but not in site.xml?
NKB> Ok, refer as file.source.html :-)
NKB> Or name the source as file.source.html.
I didn't understand what solution is to be. Can one of you pls
explain. What do I have to do when I want to have a file, that is
linked to from another file but not in site.xml shop up in my output?
So far it has to be in the parallel raw-directory to be copied. Will
it in future be sufficient to place it in the xdocs-directory along
with the file that do have en entry in site.xml?
--
Ferdinand Soethe
Re: About RAW content
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Ross Gardler wrote:
> Nicola Ken Barozzi wrote:
...
>> IIRC RAW files were introduced for two reasons:
>>
>> 1 - be able to reference a file without Forrest touching it
...
>>
>> For point one IMHO our best bet is to add a raw=true attribute to
>> site.xml, or simply refer to them as file.source.html.
>
> What about when a file is linked to from another file, but not in site.xml?
Ok, refer as file.source.html :-)
Or name the source as file.source.html.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: About RAW content
Posted by Ross Gardler <rg...@apache.org>.
Nicola Ken Barozzi wrote:
> Dave Brondsema wrote:
>
>> Juan Jose Pablos wrote:
>
> ...
>
>>> If you have a tree like this:
>>>
>>> content/
>>> xdocs/
>>> samples/
>>> /samples
>>>
>>> All the files under the second samples directory will break.
>>>
>> Ouch. That's going to be a big hurt I think. I think locationmaps
>> would be able to help here, but they're not scheduled until a few
>> releases from now (of course we can always change that) and I am not
>> real sure how they work.
>
>
> Locationmaps and raw files are a different issue.
>
> Locationmaps will make Forrest see the sources as a single directory,
> while giving the user to be able to conceptually mount other dirs and
> protocols in specific directories.
>
> For conceptual easiness, we can assume that we have a single source
> directory; the problem remaining: RAW files.
>
> IIRC RAW files were introduced for two reasons:
>
> 1 - be able to reference a file without Forrest touching it
> 2 - be able to reference a set of files without having them linked
>
> For point one IMHO our best bet is to add a raw=true attribute to
> site.xml, or simply refer to them as file.source.html.
What about when a file is linked to from another file, but not in site.xml?
Ross
Re: About RAW content
Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi wrote:
> I was thinking about something like this:
>
> <map:match type="regexp" pattern="^.+$">
> <map:select type="exists">
> <map:when test="{project:content}/{0}">
> <map:mount uri-prefix="" src="raw.xmap" check-reload="yes" />
> </map:when>
> + <map:when test="{project:content.xdocs}/{0}">
> + <map:mount uri-prefix="" src="raw.xmap" check-reload="yes" />
> + </map:when>
>
>
This is what I have got.
Re: About RAW content
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:
> Nicola Ken Barozzi wrote:
>
>> Juan Jose Pablos wrote:
>>
>>> Nicola Ken Barozzi wrote:
>>>>
>>>> In any case, this will remove the raw directory altogether.
>>>>
>>> So is anyone against my patch to merge xdocs and raw-dir content?
>>
>> I am ok if you still also keep the original match too for now.
>>
> It will not touch any match, just project.content and project.xdocs
> point to the same directory.
I was thinking about something like this:
<map:match type="regexp" pattern="^.+$">
<map:select type="exists">
<map:when test="{project:content}/{0}">
<map:mount uri-prefix="" src="raw.xmap" check-reload="yes" />
</map:when>
+ <map:when test="{project:content.xdocs}/{0}">
+ <map:mount uri-prefix="" src="raw.xmap" check-reload="yes" />
+ </map:when>
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: About RAW content
Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi wrote:
> Juan Jose Pablos wrote:
>
>> Nicola Ken Barozzi wrote:
>>
>>>
>>> In any case, this will remove the raw directory altogether.
>>>
>> So is anyone against my patch to merge xdocs and raw-dir content?
>
>
> I am ok if you still also keep the original match too for now.
>
It will not touch any match, just project.content and project.xdocs
point to the same directory.
Re: About RAW content
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:
> Nicola Ken Barozzi wrote:
>
>>
>> In any case, this will remove the raw directory altogether.
>>
> So is anyone against my patch to merge xdocs and raw-dir content?
I am ok if you still also keep the original match too for now.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re[2]: About RAW content
Posted by Ferdinand Soethe <sa...@soethe.net>.
Juan Pablos wrote:
JJP> The svn seems broken this morning.
Not me, it wasn't. Though not a bad idea to give us some time to
figure the whole thing out probably :-)
--
Ferdinand Soethe
Re: About RAW content
Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi wrote:
>
>> Or else: if it cannot be decided right now, why not postpone the
>> merger of the directories until it a decision is reached?
>
>
> Try and stop Cheche if you can ;-)
>
The svn seems broken this morning.
Re: About RAW content
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Ferdinand Soethe wrote:
> Hi Nicola,
>
> NKB> Please, let's not start this thread now, there are other ones to end!
> NKB> 8-)
>
> I understand your concerns. But if a merger of directories is to be
> done right now, would it not make sense to decide this before it
> happens to avoid double changes and a lot of confusion.
I tend to agree; that's why at least I want to also retain the current
system still.
> Or else: if it cannot be decided right now, why not postpone the
> merger of the directories until it a decision is reached?
Try and stop Cheche if you can ;-)
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re[2]: About RAW content
Posted by Ferdinand Soethe <sa...@soethe.net>.
Hi Nicola,
NKB> Please, let's not start this thread now, there are other ones to end!
NKB> 8-)
I understand your concerns. But if a merger of directories is to be
done right now, would it not make sense to decide this before it
happens to avoid double changes and a lot of confusion.
Or else: if it cannot be decided right now, why not postpone the
merger of the directories until it a decision is reached?
--
Ferdinand Soethe
Re: About RAW content
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Ferdinand Soethe wrote:
>
> Juan Pablos wrote:
>
>>>In any case, this will remove the raw directory altogether.
>>>
>
> JJP> So is anyone against my patch to merge xdocs and raw-dir content?
>
> One thought just crossed my mind. IF you merge both directories (which
> I welcome), it doesn't make sense to have a subdirectory xdocs where
> all the files reside in.
>
> Can we please move all files one level down starting from content and
> do away with xdocs altogether?
Please, let's not start this thread now, there are other ones to end!
8-)
In any case, the basic source dir structure will have to be discussed
soon, there is nothing decided yet.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: About RAW content
Posted by Juan Jose Pablos <ch...@che-che.com>.
Ferdinand Soethe wrote:
> Can we please move all files one level down starting from content and
> do away with xdocs altogether?
I have thought about this. You can change the default value for
${project.xdocs-dir} to src/document/content that will break sites with
that default value.
So to fix that it means to move that diectory, we could do that, but i
do not like to move somebody else directories.
The other solution is to put a warning a let people know how to fix it.
>
> Or was this already the plan?
>
My plan was to merge both directories and see how it goes, them move it
back if necesary.
Re[2]: About RAW content
Posted by Ferdinand Soethe <sa...@soethe.net>.
Juan Pablos wrote:
>>
>> In any case, this will remove the raw directory altogether.
>>
JJP> So is anyone against my patch to merge xdocs and raw-dir content?
One thought just crossed my mind. IF you merge both directories (which
I welcome), it doesn't make sense to have a subdirectory xdocs where
all the files reside in.
Can we please move all files one level down starting from content and
do away with xdocs altogether?
Or was this already the plan?
--
Ferdinand Soethe
Re: About RAW content
Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi wrote:
>
> In any case, this will remove the raw directory altogether.
>
So is anyone against my patch to merge xdocs and raw-dir content?
The sooner, the better.
Re: About RAW content
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Dave Brondsema wrote:
> Juan Jose Pablos wrote:
...
>> If you have a tree like this:
>>
>> content/
>> xdocs/
>> samples/
>> /samples
>>
>> All the files under the second samples directory will break.
>>
> Ouch. That's going to be a big hurt I think. I think locationmaps
> would be able to help here, but they're not scheduled until a few
> releases from now (of course we can always change that) and I am not
> real sure how they work.
Locationmaps and raw files are a different issue.
Locationmaps will make Forrest see the sources as a single directory,
while giving the user to be able to conceptually mount other dirs and
protocols in specific directories.
For conceptual easiness, we can assume that we have a single source
directory; the problem remaining: RAW files.
IIRC RAW files were introduced for two reasons:
1 - be able to reference a file without Forrest touching it
2 - be able to reference a set of files without having them linked
For point one IMHO our best bet is to add a raw=true attribute to
site.xml, or simply refer to them as file.source.html.
The second point is the most tricky one, as ATM we are using ANT to copy
the files, and with the locationmap, that can be referenced from
anywhere. Thus we have to find a solution within Forrest. I have not yet
thought about it, suggestions are welcome.
Here is a typical use case:
"
We have to insert in the Forrest site the javadocs that have been
generated before the forrest run. With the locationmap I can tell
Forrest to go fetch them in a particular directory (typically the build
dir), and mount them in /apidocs/.
We don't want forrest to traverse them, just to copy all of them.
Where do we say this? How can Forrest do it *without* Ant?
"
In any case, this will remove the raw directory altogether.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: About RAW content
Posted by Dave Brondsema <da...@brondsema.net>.
Juan Jose Pablos wrote:
> Dave Brondsema wrote:
>
>> Juan Jose Pablos wrote:
>>
>>> I have a patch to resolve this and put xdocs and content in the same
>>> directory:
>>
>>
>>
>> IIRC, this is the conclusion we have reached on previous discussions,
>> right?
>
>
> I was not sure about that. If that was the conclusion, then I will apply
> the patch today.
>
>>
>> Does it break backwards compatibility? How does it affect other parts
>> of forrest?
>>
>> I'm not sure of the entire implications of this. Could you give a few
>> examples?
>>
> implications for 90% of the users:
>
> If you have a tree like this:
>
> content/
> xdocs/
> samples/
> /samples
>
> All the files under the second samples directory will break.
>
Ouch. That's going to be a big hurt I think. I think locationmaps
would be able to help here, but they're not scheduled until a few
releases from now (of course we can always change that) and I am not
real sure how they work.
> It is easy to write the ant script that move * except xdocs to xdocs/.
>
> implications of 10% of users:
>
> If someone has personalize a sitemap.xmap with {project.content} that
> will point to the raw directory instead.
>
> I am not aware of any other issue
>
> Cheers,
> Cheche
--
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal
Re[2]: About RAW content
Posted by Ferdinand Soethe <sa...@soethe.net>.
Juan Pablos wrote:
JJP> Something like this?
JJP> samples/foo.html
JJP> xdocs/samples/foo.xml
No, something like
samples/foo.swx
xdocs/samples/foo.swx (pointing to foo.swx)
OK, I agree that it might not be great idea to create something like
this in the first place ...
On the other hand, in line with by my earlier posting on
compatibility, this would make Forrest a lot easier to handle, so at
this point breaking the few sites would be well worth it.
--
Ferdinand Soethe
Re: About RAW content
Posted by Juan Jose Pablos <ch...@che-che.com>.
Ferdinand Soethe wrote:
>
> What about those cases where people have an xml and a raw-file of the
> same name where the xml-file points to the raw file?
Something like this?
samples/foo.html
xdocs/samples/foo.xml
Re[2]: About RAW content
Posted by Ferdinand Soethe <sa...@soethe.net>.
Juan Pablos wrote:
>> Does it break backwards compatibility? How does it affect other parts
>> of forrest?
>>
>> I'm not sure of the entire implications of this. Could you give a few
>> examples?
JJP> implications for 90% of the users:
JJP> If you have a tree like this:
JJP> content/
JJP> xdocs/
JJP> samples/
JJP> /samples
JJP> All the files under the second samples directory will break.
JJP> It is easy to write the ant script that move * except xdocs to xdocs/.
What about those cases where people have an xml and a raw-file of the
same name where the xml-file points to the raw file?
--
Ferdinand Soethe
Re: About RAW content
Posted by Juan Jose Pablos <ch...@che-che.com>.
Dave Brondsema wrote:
> Juan Jose Pablos wrote:
>> I have a patch to resolve this and put xdocs and content in the same
>> directory:
>
>
> IIRC, this is the conclusion we have reached on previous discussions,
> right?
I was not sure about that. If that was the conclusion, then I will apply
the patch today.
>
> Does it break backwards compatibility? How does it affect other parts
> of forrest?
>
> I'm not sure of the entire implications of this. Could you give a few
> examples?
>
implications for 90% of the users:
If you have a tree like this:
content/
xdocs/
samples/
/samples
All the files under the second samples directory will break.
It is easy to write the ant script that move * except xdocs to xdocs/.
implications of 10% of users:
If someone has personalize a sitemap.xmap with {project.content} that
will point to the raw directory instead.
I am not aware of any other issue
Cheers,
Cheche
Re: About RAW content
Posted by Dave Brondsema <da...@brondsema.net>.
Juan Jose Pablos wrote:
> Hi,
> Looking at this :
>
> <!-- ======================== FOP Additions ======================== -->
> <map:match pattern="*/svg/*.svg">
> <map:read src="{project:content.xdocs}{1}/svg/{2}.svg"
> mime-type="image/svg"/>
> </map:match>
>
> It seems that people are having problems with the fact that the raw
> content is in another directory.
>
>
> I have a patch to resolve this and put xdocs and content in the same
> directory:
IIRC, this is the conclusion we have reached on previous discussions, right?
>
> <!-- ============================================================ -->
> <!-- OUTPUT FORMATS -->
> <!-- Serves content directly to the user -->
> <!-- +==========================================================+ -->
> <!-- http://forrest.apache.org/docs/sitemap-ref.html#output_pipelines -->
> <map:match type="regexp" pattern="^.+$">
> <map:select type="exists">
> - <map:when test="{project:content}/{0}">
> + <map:when test="{project:content.xdocs}/{0}">
> <map:mount uri-prefix="" src="raw.xmap" check-reload="yes" />
> </map:when>
>
>
> That should be enought (plus the new references on the raw.xamp)
>
>
> Should I apply this one?
>
Does it break backwards compatibility? How does it affect other parts
of forrest?
I'm not sure of the entire implications of this. Could you give a few
examples?
--
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal