You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2005/04/17 03:59:41 UTC

svn commit: r161617 - in forrest/trunk: main/webapp/WEB-INF/ main/webapp/resources/stylesheets/ site-author/conf/ site-author/content/xdocs/docs/

Author: crossley
Date: Sat Apr 16 18:59:39 2005
New Revision: 161617

URL: http://svn.apache.org/viewcvs?view=rev&rev=161617
Log:
Reinstate error reporting for broken "site:" and "ext:" links
which are due to missing entries in site.xml or typos in site: links.
The text "error:" is also prepended.
This is a workaround for bug FOR-284 "link rewriting broken
when linking to xml source views which contain site: links".

Modified:
    forrest/trunk/main/webapp/WEB-INF/cli.xconf
    forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl
    forrest/trunk/site-author/conf/cli.xconf
    forrest/trunk/site-author/content/xdocs/docs/document-v13.xml
    forrest/trunk/site-author/content/xdocs/docs/document-v20.xml
    forrest/trunk/site-author/content/xdocs/docs/sitemap-ref.xml

Modified: forrest/trunk/main/webapp/WEB-INF/cli.xconf
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/WEB-INF/cli.xconf?view=diff&r1=161616&r2=161617
==============================================================================
--- forrest/trunk/main/webapp/WEB-INF/cli.xconf (original)
+++ forrest/trunk/main/webapp/WEB-INF/cli.xconf Sat Apr 16 18:59:39 2005
@@ -209,8 +209,15 @@
    <exclude pattern="**apidocs**"/>
    <exclude pattern="api/**"/>
 
+<!--
+  This is a workaround for FOR-284 "link rewriting broken when
+  linking to xml source views which contain site: links".
+  See the explanation there and in declare-broken-site-links.xsl
+-->
    <exclude pattern="site:**"/>
    <exclude pattern="ext:**"/>
+   <exclude pattern="**/site:**"/>
+   <exclude pattern="**/ext:**"/>
 
    <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
    <exclude pattern="[preferred]/**"/>

Modified: forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl?view=diff&r1=161616&r2=161617
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl (original)
+++ forrest/trunk/main/webapp/resources/stylesheets/declare-broken-site-links.xsl Sat Apr 16 18:59:39 2005
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!--
-  Copyright 2002-2004 The Apache Software Foundation or its licensors,
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
   as applicable.
 
   Licensed under the Apache License, Version 2.0 (the "License");
@@ -17,16 +17,15 @@
 -->
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-        <!-- Change the site: and ext: links in the output so that Forrest
-             understands that they are broken -->
-             
-<!-- nicolaken: commenting out because it breaks the linkmap stuff.
-                Just including even the same link at this point makes
-                Cocoon use that link as a relative link.
-                For example, if in xdocs/samples I have ext:dtd-docs, the below
-                template with concat('', .) will make Cocoon search for
-                samples/ext:dtd-docs, which of course does not exist.
-                
+
+<!-- This is a workaround for FOR-284 "link rewriting broken when
+  linking to xml source views which contain site: links"
+
+  Prepend "error:" to any legitimate broken "site:" or "ext:" links.
+  The remaining ones are the bogus ones caused by FOR-284 which are
+  then excluded by cli.xconf
+-->
+
   <xsl:template match="@*">
     <xsl:attribute name="{name(.)}">
       <xsl:choose>
@@ -39,21 +38,11 @@
       </xsl:choose>
     </xsl:attribute>
   </xsl:template>
-		
-	<xsl:template match="/ | * | comment() | processing-instruction() | text()"> 
-		<xsl:copy> 
-			<xsl:apply-templates select="@* | * | comment() | processing-instruction() | text()"/> 
-		</xsl:copy> 
-	</xsl:template> 
--->
 
-    
-    <!-- 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: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/site-author/conf/cli.xconf
URL: http://svn.apache.org/viewcvs/forrest/trunk/site-author/conf/cli.xconf?view=diff&r1=161616&r2=161617
==============================================================================
--- forrest/trunk/site-author/conf/cli.xconf (original)
+++ forrest/trunk/site-author/conf/cli.xconf Sat Apr 16 18:59:39 2005
@@ -209,20 +209,20 @@
    <exclude pattern="**apidocs**"/>
    <exclude pattern="api/**"/>
 
-<!-- FIXME: FOR-284
-     The sitemap-ref.html doc has links to faq.xml etc as demos.
-     This cause links like docs/site:howto/buildPlugin, so exclude them.
-     However, this workaround ruins our error reporting.
-     So commented-out the links from sitemap-ref.xml etc. instead.
-
-   <exclude pattern="**site:**"/>
-   <exclude pattern="**ext:**"/>
+<!--
+  This is a workaround for FOR-284 "link rewriting broken when
+  linking to xml source views which contain site: links".
+  See the explanation there and in declare-broken-site-links.xsl
 -->
+   <exclude pattern="site:**"/>
+   <exclude pattern="ext:**"/>
+   <exclude pattern="**/site:**"/>
+   <exclude pattern="**/ext:**"/>
 
    <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
    <exclude pattern="[preferred]/**"/>
    <exclude pattern="[location]"/>
-   
+
    <!--   <include-links extension=".html"/>-->
    
    <!--+

Modified: forrest/trunk/site-author/content/xdocs/docs/document-v13.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/site-author/content/xdocs/docs/document-v13.xml?view=diff&r1=161616&r2=161617
==============================================================================
--- forrest/trunk/site-author/content/xdocs/docs/document-v13.xml (original)
+++ forrest/trunk/site-author/content/xdocs/docs/document-v13.xml Sat Apr 16 18:59:39 2005
@@ -34,10 +34,7 @@
       <title>Sample Content</title>
       <p><strong>Hint:</strong> See the xml source to see how the various
       elements are used and see the
-<!-- FIXME: FOR-284 temporary workaround
       <link href="site:dtd-docs">DTD reference documentation</link>.
--->
-      <link href="dtd-docs.html">DTD reference documentation</link>.
       </p>
       <section id="block-inline">
         <title>Block and inline elements</title>
@@ -329,10 +326,7 @@
     <section id="changes">
       <title>DTD changes</title>
       <p>See the generated
-<!-- FIXME: FOR-284 temporary workaround
         <link href="site:dtd-docs">DTD reference documentation</link>.
--->
-      <link href="dtd-docs.html">DTD reference documentation</link>.
       </p>
       <section id="changes-13">
         <title>Changes since document-v12</title>

Modified: forrest/trunk/site-author/content/xdocs/docs/document-v20.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/site-author/content/xdocs/docs/document-v20.xml?view=diff&r1=161616&r2=161617
==============================================================================
--- forrest/trunk/site-author/content/xdocs/docs/document-v20.xml (original)
+++ forrest/trunk/site-author/content/xdocs/docs/document-v20.xml Sat Apr 16 18:59:39 2005
@@ -34,10 +34,7 @@
       <title>Sample Content</title>
       <p><strong>Hint:</strong> See the xml source to see how the various
       elements are used and see the
-<!-- FIXME: FOR-284 temporary workaround
       <a href="site:dtd-docs">DTD reference documentation</a>.
--->
-      <a href="dtd-docs.html">DTD reference documentation</a>.
       </p>
       <section id="block-inline">
         <title>Block and inline elements</title>
@@ -342,10 +339,7 @@
     <section id="changes">
       <title>DTD changes</title>
       <p>See the generated
-<!-- FIXME: FOR-284 temporary workaround
         <a href="site:dtd-docs">DTD reference documentation</a>.
--->
-        <a href="dtd-docs.html">DTD reference documentation</a>.
       </p>
       <section id="changes-20">
         <title>Changes between document-v13 and document-v20</title>

Modified: forrest/trunk/site-author/content/xdocs/docs/sitemap-ref.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/site-author/content/xdocs/docs/sitemap-ref.xml?view=diff&r1=161616&r2=161617
==============================================================================
--- forrest/trunk/site-author/content/xdocs/docs/sitemap-ref.xml (original)
+++ forrest/trunk/site-author/content/xdocs/docs/sitemap-ref.xml Sat Apr 16 18:59:39 2005
@@ -185,13 +185,11 @@
       </p>
       <p>
         Source pipelines always have a "<code>.xml</code>" extension.
-<!-- FIXME: FOR-284 temporary workaround
         Thus, 
         <link href="index.xml">index.xml</link> gives you the XML source for the
         index page.  Likewise, <link href="faq.xml">faq.xml</link> gives you XML
         for the FAQ (transformed from FAQ syntax), and 
         <link href="changes.xml">changes.xml</link> returns XML from the status.xml file.
--->
         Take any page, and replace its extension (<code>.html</code> or
         <code>.pdf</code>) with <code>.xml</code> and you'll have the Source
         XML.