forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: rev 76022 - in forrest/trunk/main/webapp/resources/chaperon: . grammars stylesheets
Date Tue, 16 Nov 2004 20:19:22 GMT
Author: rgardler
Date: Tue Nov 16 12:19:21 2004
New Revision: 76022

Added:
   forrest/trunk/main/webapp/resources/chaperon/
   forrest/trunk/main/webapp/resources/chaperon/grammars/
   forrest/trunk/main/webapp/resources/chaperon/grammars/link.xlex   (contents, props changed)
   forrest/trunk/main/webapp/resources/chaperon/stylesheets/
   forrest/trunk/main/webapp/resources/chaperon/stylesheets/pattern2link.xsl   (contents,
props changed)
Log:
put back files used in forrest core (after move of wiki stuff to wiki plugin)

Added: forrest/trunk/main/webapp/resources/chaperon/grammars/link.xlex
==============================================================================
--- (empty file)
+++ forrest/trunk/main/webapp/resources/chaperon/grammars/link.xlex	Tue Nov 16 12:19:21 2004
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
+ <!-- (([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? -->
+ <lexeme symbol="link">
+  <concat>
+   <concat>
+    <cclass maxOccurs="*">
+     <cinterval min="A" max="Z"/>
+     <cinterval min="a" max="z"/>
+    </cclass>
+    <cstring content=":"/>
+    <cstring content="/"/>
+   </concat>
+ 
+   <concat minOccurs="0">
+    <cstring content="/"/>
+    <cclass minOccurs="0" maxOccurs="*">
+     <cinterval min="A" max="Z"/>
+     <cinterval min="a" max="z"/>
+     <cinterval min="0" max="9"/>
+     <cset content="._-:"/>
+    </cclass>
+   </concat>
+ 
+   <cclass minOccurs="0" maxOccurs="*">
+    <cinterval min="A" max="Z"/>
+    <cinterval min="a" max="z"/>
+    <cinterval min="0" max="9"/>
+    <cset content="._-:/"/>
+   </cclass>
+
+   <concat minOccurs="0">
+    <cstring content="?"/>
+    <cclass minOccurs="0" maxOccurs="*">
+     <cinterval min="A" max="Z"/>
+     <cinterval min="a" max="z"/>
+     <cinterval min="0" max="9"/>
+     <cset content="._-:/?"/>
+    </cclass>
+   </concat>
+
+   <concat minOccurs="0">
+    <cstring content="#"/>
+    <cclass minOccurs="0" maxOccurs="*">
+     <cinterval min="A" max="Z"/>
+     <cinterval min="a" max="z"/>
+     <cinterval min="0" max="9"/>
+     <cset content="._-:/?#"/>
+    </cclass>
+   </concat>
+  </concat>
+ </lexeme>
+
+ <lexeme symbol="cssurl">
+  <concat>
+      <group>
+       <concat>
+        <cstring content="u"/>
+        <cstring content="r"/>
+        <cstring content="l"/>
+       </concat>
+     
+       <concat minOccurs="0" maxOccurs="*">
+        <cstring content=" "/>
+       </concat>
+    
+       <concat>
+        <cstring content="("/>
+       </concat>
+       
+       <concat minOccurs="0" maxOccurs="*">
+        <cstring content=" "/>
+       </concat>
+       
+       <concat minOccurs="0" maxOccurs="1">
+        <cstring content="'"/>
+       </concat>
+      </group>
+      
+      <group>
+       <concat minOccurs="0">
+        <cstring content="/"/>
+        <cclass minOccurs="0" maxOccurs="*">
+         <cinterval min="A" max="Z"/>
+         <cinterval min="a" max="z"/>
+         <cinterval min="0" max="9"/>
+         <cset content="._-:"/>
+        </cclass>
+       </concat>
+     
+       <cclass minOccurs="0" maxOccurs="*">
+        <cinterval min="A" max="Z"/>
+        <cinterval min="a" max="z"/>
+        <cinterval min="0" max="9"/>
+        <cset content="._-:/"/>
+       </cclass>
+    
+       <concat minOccurs="0">
+        <cstring content="?"/>
+        <cclass minOccurs="0" maxOccurs="*">
+         <cinterval min="A" max="Z"/>
+         <cinterval min="a" max="z"/>
+         <cinterval min="0" max="9"/>
+         <cset content="._-:/?"/>
+        </cclass>
+       </concat>
+    
+       <concat minOccurs="0">
+        <cstring content="#"/>
+        <cclass minOccurs="0" maxOccurs="*">
+         <cinterval min="A" max="Z"/>
+         <cinterval min="a" max="z"/>
+         <cinterval min="0" max="9"/>
+         <cset content="._-:/?#"/>
+        </cclass>
+       </concat>
+      </group>
+      
+      <group>
+       <concat minOccurs="0" maxOccurs="1">
+        <cstring content="'"/>
+       </concat>   
+    
+       <concat minOccurs="0" maxOccurs="*">
+        <cstring content=" "/>
+       </concat>
+    
+       <concat>
+        <cstring content=")"/>
+       </concat>   
+      </group>
+      
+  </concat>
+ </lexeme>
+ 
+ <lexeme symbol="email">
+  <concat>
+   <concat>
+    <group>
+     <cclass maxOccurs="*">
+      <cinterval min="A" max="Z"/>
+      <cinterval min="a" max="z"/>
+      <cinterval min="0" max="9"/>
+      <cset content="._-:"/>
+     </cclass>
+    </group>
+    <cstring content="@"/>
+    <group>
+     <cclass maxOccurs="*">
+      <cinterval min="A" max="Z"/>
+      <cinterval min="a" max="z"/>
+      <cinterval min="0" max="9"/>
+      <cset content="._-:"/>
+     </cclass>
+    </group>
+   </concat>
+  </concat>
+ </lexeme>
+</lexicon>

Added: forrest/trunk/main/webapp/resources/chaperon/stylesheets/pattern2link.xsl
==============================================================================
--- (empty file)
+++ forrest/trunk/main/webapp/resources/chaperon/stylesheets/pattern2link.xsl	Tue Nov 16 12:19:21
2004
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<xsl:stylesheet version="1.0" 
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:lex="http://chaperon.sourceforge.net/schema/lexemes/2.0">
+
+ <xsl:template match="lex:lexeme[@symbol='link']">
+  <a href="{@text}">
+   <xsl:value-of select="@text"/>
+  </a>
+ </xsl:template>
+
+ <xsl:template match="lex:lexeme[@symbol='email']">
+  <a href="mailto:{@text}">
+   <xsl:value-of select="lex:group[2]"/> at
+   <xsl:value-of select="lex:group[3]"/>
+  </a>
+ </xsl:template>
+
+ <xsl:template match="lex:lexeme[@symbol='cssurl']">
+  <a href="{lex:group[3]}"><xsl:value-of select="lex:group[1]"/></a>
+ </xsl:template>
+ 
+ <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
+  <xsl:copy>
+   <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
+  </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>

Mime
View raw message