portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/cps/test/rewriter default-rewriter-rules.xml test-001-output.html test-001.html test-remove-rules.xml test-rewriter-rules.xml
Date Fri, 03 Oct 2003 00:06:21 GMT
taylor      2003/10/02 17:06:21

  Modified:    cps/src/java/org/apache/jetspeed/cps/rewriter/html
                        SwingParserAdaptor.java
               cps/src/test/org/apache/jetspeed/cps/rewriter
                        TestRewriterRules.java
               cps/test/WEB-INF/conf cps.properties
               cps/test/rewriter default-rewriter-rules.xml
                        test-001-output.html test-001.html
                        test-remove-rules.xml test-rewriter-rules.xml
  Log:
  Updated default rules to skip relative links (#)
  
  Revision  Changes    Path
  1.2       +2 -2      jakarta-jetspeed-2/cps/src/java/org/apache/jetspeed/cps/rewriter/html/SwingParserAdaptor.java
  
  Index: SwingParserAdaptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/src/java/org/apache/jetspeed/cps/rewriter/html/SwingParserAdaptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SwingParserAdaptor.java	2 Oct 2003 05:30:28 -0000	1.1
  +++ SwingParserAdaptor.java	3 Oct 2003 00:06:21 -0000	1.2
  @@ -379,7 +379,7 @@
            */
           public void handleError(java.lang.String str,int param) 
           {
  -            System.out.println("Handling error: " + str);
  +            // System.out.println("Handling error: " + str);
           }
   
           /*
  
  
  
  1.3       +4 -1      jakarta-jetspeed-2/cps/src/test/org/apache/jetspeed/cps/rewriter/TestRewriterRules.java
  
  Index: TestRewriterRules.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/src/test/org/apache/jetspeed/cps/rewriter/TestRewriterRules.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestRewriterRules.java	2 Oct 2003 05:40:55 -0000	1.2
  +++ TestRewriterRules.java	3 Oct 2003 00:06:21 -0000	1.3
  @@ -258,6 +258,9 @@
                           testRewriter.getAnchorValue("4").equals("javascript:whatever()"));
           assertTrue("5th rewritten anchor: " + testRewriter.getAnchorValue("5"), 
                           testRewriter.getAnchorValue("5").equals("mailto:david@bluesunrise.com"));
  +        assertTrue("6th rewritten anchor: " + testRewriter.getAnchorValue("6"), 
  +                        testRewriter.getAnchorValue("6").equals("#INTERNAL"));
  +                        
           assertTrue("Paragraph text: " + testRewriter.getParagraph(), testRewriter.getParagraph().equals("This
is a test"));
       }
           
  
  
  
  1.3       +5 -0      jakarta-jetspeed-2/cps/test/WEB-INF/conf/cps.properties
  
  Index: cps.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/test/WEB-INF/conf/cps.properties,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- cps.properties	2 Oct 2003 05:30:28 -0000	1.2
  +++ cps.properties	3 Oct 2003 00:06:21 -0000	1.3
  @@ -14,6 +14,11 @@
   services.template.default.template.name = default.vm
   services.template.default.extension = vm
   
  +# -------------------------------------------------------------------
  +#
  +# R E W R I T E R  S E R V I C E
  +#
  +# -------------------------------------------------------------------
   services.rewriter.classname = org.apache.jetspeed.cps.rewriter.RewriterServiceImpl
   services.rewriter.mapping=/WEB-INF/conf/rewriter-rules-mapping.xml
   services.rewriter.basic.class = org.apache.jetspeed.cps.rewriter.BasicRewriter
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/cps/test/rewriter/default-rewriter-rules.xml
  
  Index: default-rewriter-rules.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/test/rewriter/default-rewriter-rules.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- default-rewriter-rules.xml	2 Oct 2003 05:30:28 -0000	1.1
  +++ default-rewriter-rules.xml	3 Oct 2003 00:06:21 -0000	1.2
  @@ -2,7 +2,7 @@
   <ruleset id='test-set-102' remove-comments='false'>
   
   <!-- standard rewriter link rules -->
  -<rule id='base' use-base='true' ignore-prefixes='javascript:,mailto:'/>
  +<rule id='base' use-base='true' ignore-prefixes='javascript:,mailto:,#'/>
   
   <!-- remove tags -->
   <tag id='html' remove='true'/>
  
  
  
  1.3       +4 -3      jakarta-jetspeed-2/cps/test/rewriter/test-001-output.html
  
  Index: test-001-output.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/test/rewriter/test-001-output.html,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- test-001-output.html	2 Oct 2003 05:40:55 -0000	1.2
  +++ test-001-output.html	3 Oct 2003 00:06:21 -0000	1.3
  @@ -1,9 +1,10 @@
   <p>
   This is a test</p>
  -<a name="1" href="http://www.bluesunrise.com/suffix" target="_BLANK">keep this</a>
  - <a name="2" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix" target="_BLANK">junk</a>
  - <a name="3" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix" target="_BLANK">junk2</a>
  +<a name="1" target="_BLANK" href="http://www.bluesunrise.com/suffix">keep this</a>
  + <a name="2" target="_BLANK" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix">junk</a>
  + <a name="3" target="_BLANK" href="http://www.rewriter.com/stuff/junk/stuffedjunk.html/suffix">junk2</a>
    <a name="4" href="javascript:whatever()">script</a>
    <a name="5" href="mailto:david@bluesunrise.com">script</a>
  + <a name="6" href="#INTERNAL">internal</a>
   
   
  
  
  
  1.2       +1 -0      jakarta-jetspeed-2/cps/test/rewriter/test-001.html
  
  Index: test-001.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/test/rewriter/test-001.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test-001.html	2 Oct 2003 05:30:28 -0000	1.1
  +++ test-001.html	3 Oct 2003 00:06:21 -0000	1.2
  @@ -28,5 +28,6 @@
   <a name='3' href="stuff/junk/stuffedjunk.html">junk2</a>
   <a name='4' href="javascript:whatever()">script</a>
   <a name='5' href="mailto:david@bluesunrise.com">script</a>
  +<a name='6' href="#INTERNAL">internal</a>
   </body>
   </HTML>
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/cps/test/rewriter/test-remove-rules.xml
  
  Index: test-remove-rules.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/test/rewriter/test-remove-rules.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test-remove-rules.xml	2 Oct 2003 05:30:28 -0000	1.1
  +++ test-remove-rules.xml	3 Oct 2003 00:06:21 -0000	1.2
  @@ -1,6 +1,6 @@
   <?xml version='1.0' ?>
   <ruleset id='test-set-102' remove-comments='true'>
  -<rule id='base' popup='true' use-base='true' suffix='/suffix' ignore-prefixes='javascript:,mailto:'/>
  +<rule id='base' popup='true' use-base='true' suffix='/suffix' ignore-prefixes='javascript:,mailto:,#'/>
   <tag id='HTML' remove='true'/>
   <tag id='body' remove='true'/>
   <tag id='head' strip='true'/>
  
  
  
  1.2       +1 -1      jakarta-jetspeed-2/cps/test/rewriter/test-rewriter-rules.xml
  
  Index: test-rewriter-rules.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cps/test/rewriter/test-rewriter-rules.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- test-rewriter-rules.xml	2 Oct 2003 05:30:28 -0000	1.1
  +++ test-rewriter-rules.xml	3 Oct 2003 00:06:21 -0000	1.2
  @@ -1,6 +1,6 @@
   <?xml version='1.0' ?>
   <ruleset id='test-set-101'>
  -<rule id='merge' use-base='true' suffix='/web' popup='0' ignore-prefixes='javascript:,mailto:'/>
  +<rule id='merge' use-base='true' suffix='/web' popup='0' ignore-prefixes='javascript:,mailto:,#'/>
   <tag id='form'>
       <attribute id='action' rule='merge'/>
   </tag>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message