You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by ni...@apache.org on 2004/06/14 23:42:41 UTC
svn commit: rev 21237 - in forrest/trunk/src/core/context: . WEB-INF resources/stylesheets
Author: nicolaken
Date: Mon Jun 14 14:42:40 2004
New Revision: 21237
Modified:
forrest/trunk/src/core/context/WEB-INF/cli.xconf
forrest/trunk/src/core/context/faq.xmap
forrest/trunk/src/core/context/resources/stylesheets/declare-broken-site-links.xsl
forrest/trunk/src/core/context/sitemap.xmap
Log:
Fix FOR-156, by making the CLI ignore site: and ext: links and in the meantime making the pipeline output these links with error: prepended when they are not resolved properly.
Modified: forrest/trunk/src/core/context/WEB-INF/cli.xconf
==============================================================================
--- forrest/trunk/src/core/context/WEB-INF/cli.xconf (original)
+++ forrest/trunk/src/core/context/WEB-INF/cli.xconf Mon Jun 14 14:42:40 2004
@@ -185,7 +185,10 @@
<exclude pattern="**/"/>
<exclude pattern="**apidocs**"/>
<exclude pattern="api/**"/>
-
+
+ <exclude pattern="site:**"/>
+ <exclude pattern="ext:**"/>
+
<!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
<exclude pattern="[preferred]/**"/>
<exclude pattern="[location]"/>
Modified: forrest/trunk/src/core/context/faq.xmap
==============================================================================
--- forrest/trunk/src/core/context/faq.xmap (original)
+++ forrest/trunk/src/core/context/faq.xmap Mon Jun 14 14:42:40 2004
@@ -153,7 +153,7 @@
<map:generate src="cocoon:/{1}{2}.xml"/>
<map:transform type="xinclude"/>
<map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.html"/>
- <map:transform src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
+ <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
<map:call resource="skinit">
<map:parameter name="type" value="document2html"/>
<map:parameter name="path" value="/{1}{2}.html"/>
Modified: forrest/trunk/src/core/context/resources/stylesheets/declare-broken-site-links.xsl
==============================================================================
--- forrest/trunk/src/core/context/resources/stylesheets/declare-broken-site-links.xsl (original)
+++ forrest/trunk/src/core/context/resources/stylesheets/declare-broken-site-links.xsl Mon Jun 14 14:42:40 2004
@@ -18,8 +18,7 @@
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="@*">
-
- <xsl:attribute name="name(.)">
+ <xsl:attribute name="{name(.)}">
<xsl:choose>
<!-- Change the site: and ext: links in the output so that Forrest
understands that they are broken -->
@@ -33,6 +32,12 @@
</xsl:attribute>
</xsl:template>
- <xsl:include href="copyover.xsl"/>
+ <!-- Identity transformation template -->
+ <xsl:template match="/ | * | comment() | processing-instruction() | text()">
+ <xsl:copy>
+ <xsl:apply-templates select="@* | * | comment() | processing-instruction() | text()"/>
+ </xsl:copy>
+ </xsl:template>
+
</xsl:stylesheet>
Modified: forrest/trunk/src/core/context/sitemap.xmap
==============================================================================
--- forrest/trunk/src/core/context/sitemap.xmap (original)
+++ forrest/trunk/src/core/context/sitemap.xmap Mon Jun 14 14:42:40 2004
@@ -331,7 +331,7 @@
<map:generate src="{project:content.xdocs}{1}{2}.ehtml" />
<map:transform src="{forrest:stylesheets}/html2htmlbody.xsl" />
<map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
- <map:transform src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
+ <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
<map:serialize type="xml" />
</map:when>
</map:select>
@@ -344,7 +344,7 @@
<map:transform type="idgen"/>
<map:transform type="xinclude"/>
<map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
- <map:transform src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
+ <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
<map:call resource="skinit">
<map:parameter name="type" value="document2html"/>
<map:parameter name="path" value="{1}{2}.html"/>
@@ -355,7 +355,7 @@
<map:match pattern="**menu-*.html">
<map:generate src="cocoon:/{1}book-{2}.html"/>
<map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>
- <map:transform src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
+ <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
<map:call resource="skinit">
<map:parameter name="type" value="book2menu"/>
<map:parameter name="path" value="{1}{2}.html"/>
@@ -428,7 +428,7 @@
<!-- <map:transform type="idgen"/> -->
<map:transform type="xinclude"/>
<map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.pdf"/>
- <map:transform src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
+ <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
<map:select type="exists">
<map:when test="{project:skins-dir}{forrest:skin}/xslt/fo/document2fo.xsl">
<map:transform src="{project:skins-dir}{forrest:skin}/xslt/fo/document2fo.xsl">
@@ -460,7 +460,7 @@
<!-- <map:transform type="idgen"/> -->
<map:transform type="xinclude"/>
<map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.svg"/>
- <map:transform src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
+ <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
<map:select type="exists">
<map:when test="{project:skins-dir}{forrest:skin}/xslt/svg/document2svg.xsl">
<map:transform src="{project:skins-dir}{forrest:skin}/xslt/svg/document2svg.xsl">
Re: configuring project entity resolver (Was: svn commit: rev 21237)
Posted by Nicola Ken Barozzi <ni...@apache.org>.
David Crossley wrote:
...
> Okay, i got this working by enabling the user project
> to put their CatalogManager.properties file into their
> project.classes-dir and define their additional catalogs.
Excellent! :-)
> Following your-project.html and validation.html to test.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: configuring project entity resolver (Was: svn commit: rev
21237)
Posted by David Crossley <cr...@apache.org>.
Nicola Ken Barozzi wrote:
> David Crossley wrote:
> > Nicola Ken Barozzi wrote:
> >
> >>IIRC the catalogue is the only point that still would need this
> >>replacement, but I'd rather do without it.
> >>
> >>Any ideas about how it should alternatively be configured, *without*
> >>needing to touch cocoon.xconf?
> >
> > The user project can supply a CatalogManager.properties file.
> > It needs to be available on the classpath when Cocoon starts.
> > Where would that be?
>
> In the core copyless branch it was in forrest/trunk/lib/optional dir.
> Hmmm, I guess we *could* simply add the project stuff to the classpath
> and remove this problem.
>
> The point is that I don't know anymore OTOMH where we are expecting from
> our users to put the extra libs, nor if extra libs are picked up at all
> anymore.
Okay, i got this working by enabling the user project
to put their CatalogManager.properties file into their
project.classes-dir and define their additional catalogs.
Following your-project.html and validation.html to test.
--
David Crossley
Re: configuring project entity resolver (Was: svn commit: rev 21237)
Posted by Nicola Ken Barozzi <ni...@apache.org>.
David Crossley wrote:
> Nicola Ken Barozzi wrote:
>
>>IIRC the catalogue is the only point that still would need this
>>replacement, but I'd rather do without it.
>>
>>Any ideas about how it should alternatively be configured, *without*
>>needing to touch cocoon.xconf?
>
> The user project can supply a CatalogManager.properties file.
> It needs to be available on the classpath when Cocoon starts.
> Where would that be?
In the core copyless branch it was in forrest/trunk/lib/optional dir.
Hmmm, I guess we *could* simply add the project stuff to the classpath
and remove this problem.
The point is that I don't know anymore OTOMH where we are expecting from
our users to put the extra libs, nor if extra libs are picked up at all
anymore.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
configuring project entity resolver (Was: svn commit: rev 21237)
Posted by David Crossley <cr...@apache.org>.
Nicola Ken Barozzi wrote:
>
> IIRC the catalogue is the only point that still would need this
> replacement, but I'd rather do without it.
>
> Any ideas about how it should alternatively be configured, *without*
> needing to touch cocoon.xconf?
The user project can supply a CatalogManager.properties file.
It needs to be available on the classpath when Cocoon starts.
Where would that be?
Re: svn commit: rev 21237
Posted by Nicola Ken Barozzi <ni...@apache.org>.
David Crossley wrote:
> Nicola Ken Barozzi wrote:
...
>>IIRC we are now not able to use user-defined catalogues anymore
>>(copyless issue).
>
> That is an "additional" catalog to supplement the main one.
>
> This inability to define a project catalog is the result
> of not doing the replacement of certain symbols anymore.
> We used to replace "@...@" strings in cocoon.xconf.
> So it is a bigger issue.
It's the result of the copyless behaviour, that shows deficiencies in
certain components, as they need to touch the cocoon.xconf values.
IIRC the catalogue is the only point that still would need this
replacement, but I'd rather do without it.
Any ideas about how it should alternatively be configured, *without*
needing to touch cocoon.xconf?
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: svn commit: rev 21237
Posted by David Crossley <cr...@apache.org>.
Nicola Ken Barozzi wrote:
> David Crossley wrote:
>
> > Nicola Ken Barozzi wrote:
> >
> >>On the other hand, it solves the catalogue issue, and since we are
> >>already copying a webapp, I'm ok for this to go in, but *only* to fix
> >>the catalogue issue. If we use it for more, we will have much more
> >>problems in finishing off copyless in 0.7.
> >
> > What "catalog issue" are you talking about?
> > I must have missed some important email - can you
> > point to it or tell us again.
>
> IIRC we are now not able to use user-defined catalogues anymore
> (copyless issue).
That is an "additional" catalog to supplement the main one.
This inability to define a project catalog is the result
of not doing the replacement of certain symbols anymore.
We used to replace "@...@" strings in cocoon.xconf.
So it is a bigger issue.
Re: svn commit: rev 21237
Posted by Nicola Ken Barozzi <ni...@apache.org>.
David Crossley wrote:
> Nicola Ken Barozzi wrote:
>
>>On the other hand, it solves the catalogue issue, and since we are
>>already copying a webapp, I'm ok for this to go in, but *only* to fix
>>the catalogue issue. If we use it for more, we will have much more
>>problems in finishing off copyless in 0.7.
>
> What "catalog issue" are you talking about?
> I must have missed some important email - can you
> point to it or tell us again.
IIRC we are now not able to use user-defined catalogues anymore
(copyless issue).
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: svn commit: rev 21237
Posted by David Crossley <cr...@apache.org>.
Nicola Ken Barozzi wrote:
>
> On the other hand, it solves the catalogue issue, and since we are
> already copying a webapp, I'm ok for this to go in, but *only* to fix
> the catalogue issue. If we use it for more, we will have much more
> problems in finishing off copyless in 0.7.
What "catalog issue" are you talking about?
I must have missed some important email - can you
point to it or tell us again.
Re: svn commit: rev 21237 - in forrest/trunk/src/core/context: .
WEB-INF resources/stylesheets
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:
> Nicola Ken Barozzi escribió:
>
>> Juan Jose Pablos wrote:
>>
>>> nicolaken@apache.org escribió:
>>>
>>>> - <map:transform
>>>> src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
>>>> + <map:transform
>>>
>>>
>>> Why do we need a hard-code value tin this line?
>>
>> Good question. I had forrest:stylesheets before but it seemed that the
>> stylesheet was not picked up. Don't ask me why, I really dunno. :-/
>
> Maybe I has to do with the ForrestConfModule.
I don't think so, as other substitutions work correctly.
> I would like to show you a
> way to mofidy values using xslt under ant.
>
> You can see it in a patch. But the summary is this one:
> We can pass the build time parameters using <param/> on the xstl task.
>
> Then use the value on the style sheet with <xsl:param/>
>
> so we would be able to create code like:
>
> <xsl:template match="whateve" mode="$target">
>
> Where target could be "site" "run" or "webapp
>
> WDTY?
...
+ <target name="transform-cocoon" >
+ <xslt in="${forrest.home}/context/WEB-INF/cocoon.xconf"
out="cocoon.xconf"
+
style="${forrest.home}/context/resources/stylesheets/cocoon-transform.xsl">
+ <param name="catalog"
expression="${forrest.home}/context/resources/schema/catalog.xcat"/>
+ <xmlcatalog refid="fcatalog"/>
+ </xslt>
+ </target>
In cocoon-transform.xsl":
<xsl:template match="entity-resolver">
<entity-resolver logger="core.resolver">
<xsl:attribute name="name">catalog</xsl:attribute>
<xsl:attribute name="value">
<xsl:value-of select="$catalog"/>
</xsl:attribute>
</entity-resolver>
</xsl:template>
I think this is a step backwards from 'copyless', and despite it solving
the catalogue issue, I would really prefer not to do it.
On the other hand, it solves the catalogue issue, and since we are
already copying a webapp, I'm ok for this to go in, but *only* to fix
the catalogue issue. If we use it for more, we will have much more
problems in finishing off copyless in 0.7.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: svn commit: rev 21237 - in forrest/trunk/src/core/context: .
WEB-INF resources/stylesheets
Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi escribió:
> Juan Jose Pablos wrote:
>
>> nicolaken@apache.org escribió:
>>
>>> - <map:transform
>>> src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
>>> + <map:transform
>>
>>
>>
>> Why do we need a hard-code value tin this line?
>
>
> Good question. I had forrest:stylesheets before but it seemed that the
> stylesheet was not picked up. Don't ask me why, I really dunno. :-/
>
Maybe I has to do with the ForrestConfModule. I would like to show you a
way to mofidy values using xslt under ant.
You can see it in a patch. But the summary is this one:
We can pass the build time parameters using <param/> on the xstl task.
Then use the value on the style sheet with <xsl:param/>
so we would be able to create code like:
<xsl:template match="whateve" mode="$target">
Where target could be "site" "run" or "webapp
WDTY?
Cheers,
Cheche
Re: svn commit: rev 21237 - in forrest/trunk/src/core/context: .
WEB-INF resources/stylesheets
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:
> nicolaken@apache.org escribió:
>
>> - <map:transform
>> src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
>> + <map:transform
>
>
> Why do we need a hard-code value tin this line?
Good question. I had forrest:stylesheets before but it seemed that the
stylesheet was not picked up. Don't ask me why, I really dunno. :-/
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------
Re: svn commit: rev 21237 - in forrest/trunk/src/core/context: .
WEB-INF resources/stylesheets
Posted by Juan Jose Pablos <ch...@che-che.com>.
nicolaken@apache.org escribió:
> - <map:transform src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
> + <map:transform src="resources/stylesheets/declare-broken-site-links.xsl" />
Why do we need a hard-code value tin this line?
Cheers,
Cheche