cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/chaperon/samples/stylesheets pattern2link.xsl
Date Tue, 08 Jun 2004 10:06:39 GMT
nicolaken    2004/06/08 03:06:38

  Modified:    src/blocks/chaperon/samples/grammars link.xlex
               src/blocks/chaperon/samples/stylesheets pattern2link.xsl
  Log:
  Add the parsing of CSS url() links
  
  Revision  Changes    Path
  1.4       +82 -0     cocoon-2.1/src/blocks/chaperon/samples/grammars/link.xlex
  
  Index: link.xlex
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/grammars/link.xlex,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- link.xlex	6 Mar 2004 06:16:51 -0000	1.3
  +++ link.xlex	8 Jun 2004 10:06:38 -0000	1.4
  @@ -66,6 +66,88 @@
     </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>
  
  
  
  1.4       +4 -0      cocoon-2.1/src/blocks/chaperon/samples/stylesheets/pattern2link.xsl
  
  Index: pattern2link.xsl
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/pattern2link.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- pattern2link.xsl	6 Mar 2004 02:25:33 -0000	1.3
  +++ pattern2link.xsl	8 Jun 2004 10:06:38 -0000	1.4
  @@ -32,6 +32,10 @@
     </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()"/>
  
  
  

Mime
View raw message