<?xml version="1.0" encoding="windows-1251"?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN"
  "http://colorer.sf.net/2003/hrc.dtd">

<hrc version="take5"
     xmlns="http://colorer.sf.net/2003/hrc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">

  <annotation>
   <documentation>
    Active Server Pages core syntax (vbScript)
   </documentation>
   <contributors><![CDATA[
      Cail Lomecb <cail@nm.ru> 
      Eugene Efremov <4mirror@mail.ru>
   ]]></contributors>
  </annotation>
  
  <type name="asp.vb" access="public">

    <import type="def"/>

    <region name="Insertion" parent="def:Insertion"/>
    <region name="OpenTag" parent="OpenTag"/>
    <region name="CloseTag" parent="CloseTag"/>

    <scheme name="targetLanguage"/>

    <annotation><documentation>
      This scheme defines basic ASP insertion.
      It is joined with html scheme and allows to use
      asp insertions anywere in html code.
    </documentation></annotation>
    <scheme name="Insertion">
      <block start="/(&lt;\%)/" end="/(\%&gt;)/"
             scheme="targetLanguage" priority="low" content-priority="low"
             region="Insertion" region00="OpenTag" region10="CloseTag"
             region01="PairStart" region11="PairEnd"/>
    </scheme>

    <annotation><documentation>
      This scheme defines inverted ASP insertion.
      It is used, then html output placed in internal level
      of target Language.
      So, this is some form of hack, allowing such complex constructions.
    </documentation></annotation>
    <scheme name="InverseInsertion">
      <block start="/((\%&gt;))/" end="/((&lt;\%))/"
       scheme="html" priority="low" region="Text" 
       region00="Insertion" region10="Insertion" 
       region01="PairStart" region11="PairEnd"      
       region02="OpenTag"   region12="OpenTag" 
      />
    </scheme>


    <annotation><documentation>
      Next schemes redefine behavior of standard HTML scheme
      to allow to use ASP insertions in internal HTML structures
    </documentation></annotation>

    <scheme name="cssProperty">
     <inherit scheme="Insertion"/>
     <inherit scheme="css:Property"/>
    </scheme>
    <scheme name="cssRuleContent"> 
     <inherit scheme="Insertion"/>
     <inherit scheme="css:RuleContent">
      <virtual scheme="css:RuleContent" subst-scheme="cssRuleContent"/>
      <virtual scheme="css:Property" subst-scheme="cssProperty"/>
     </inherit>
    </scheme>
    <scheme name="cssRulesList">
     <inherit scheme="Insertion"/>
     <inherit scheme="css:RulesList">
      <virtual scheme="css:RulesList" subst-scheme="cssRulesList"/>
      <virtual scheme="css:RuleContent" subst-scheme="cssRuleContent"/>
      <virtual scheme="css:Property" subst-scheme="cssProperty"/>
     </inherit>
    </scheme>
    
    <scheme name="htmlString">
      <inherit scheme="Insertion"/>
      <inherit scheme="html:htmlString"/>
    </scheme>

    <scheme name="htmlCore">
      <inherit scheme="Insertion"/>
      <inherit scheme="html:htmlCore">
         <virtual scheme="html:htmlString" subst-scheme="htmlString"/>
      </inherit>
    </scheme>

    <scheme name="htmlScripts">
      <inherit scheme="html:htmlScripts">
         <virtual scheme="vbScript:vbScript" subst-scheme="asp.vb:vbScript-client"/>
         <virtual scheme="jScript:jScript" subst-scheme="asp.js:jScript-client"/>
         <virtual scheme="perl:perl" subst-scheme="asp.ps:PerlScript-client"/>
      </inherit>
    </scheme>

    <scheme name="Comment">
      <inherit scheme="Insertion">
         <!-- doesn't works!! -->
         <virtual scheme="html" subst-scheme="Comment"/>
      </inherit>
      <inherit scheme="def:Comment"/>
    </scheme>

    <scheme name="html">
      <inherit scheme="Insertion"/>
      <inherit scheme="html:html"> <!-- global virtualization!!! -->
        <virtual scheme="html:htmlCore" subst-scheme="htmlCore"/>
        <virtual scheme="html:htmlScripts" subst-scheme="htmlScripts"/>
        <virtual scheme="html:html" subst-scheme="html"/>
        <virtual scheme="css:Property" subst-scheme="cssProperty"/>
        <virtual scheme="css:RuleContent" subst-scheme="cssRuleContent"/>
        <virtual scheme="css:RulesList" subst-scheme="cssRulesList"/>
<!--         <virtual scheme="def:Comment" subst-scheme="Comment"/> -->
      </inherit>
    </scheme>

    <scheme name="vbScript">
      <annotation><documentation>
        This basic scheme defines real target Language,
        used in ASP insertions. By default, this is vbScript.
      </documentation></annotation>
      <regexp match="/('|\brem\b).*? \M (\%&gt;|$) /ix" region="def:Comment"/>
      <inherit scheme="InverseInsertion">
        <virtual scheme="targetLanguage" subst-scheme="vbScript"/>
      </inherit>
      <inherit scheme="vbScript:vbScript">
        <virtual scheme="vbScript:vbScript" subst-scheme="vbScript"/>
      </inherit>
    </scheme>

    <scheme name="vbScript-client">
      <annotation><documentation>
        Allows to use ASP with HTML client-side scripts.
      </documentation></annotation>
      <inherit scheme="Insertion"/>
      <inherit scheme="vbScript:vbScript">
         <virtual scheme="vbScript:vbMETA" subst-scheme="Insertion"/>
         <virtual scheme="vbScript:vbScript" subst-scheme="vbScript-client"/>
      </inherit>
    </scheme>

    <scheme name="asp.vb">
      <annotation><documentation>
        Root scheme, defines target ASP Language.
      </documentation></annotation>
      <inherit scheme="html">
        <virtual scheme="targetLanguage" subst-scheme="vbScript"/>
      </inherit>
    </scheme>

  </type>

</hrc>
<!-- ***** BEGIN LICENSE BLOCK *****
   - Version: MPL 1.1/GPL 2.0/LGPL 2.1
   -
   - The contents of this file are subject to the Mozilla Public License Version
   - 1.1 (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.mozilla.org/MPL/
   -
   - Software distributed under the License is distributed on an "AS IS" basis,
   - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
   - for the specific language governing rights and limitations under the
   - License.
   -
   - The Original Code is the Colorer Library.
   -
   - The Initial Developer of the Original Code is
   - Cail Lomecb <cail@nm.ru>.
   - Portions created by the Initial Developer are Copyright (C) 1999-2003
   - the Initial Developer. All Rights Reserved.
   -
   - Contributor(s):
   -
   - Alternatively, the contents of this file may be used under the terms of
   - either the GNU General Public License Version 2 or later (the "GPL"), or
   - the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
   - in which case the provisions of the GPL or the LGPL are applicable instead
   - of those above. If you wish to allow use of your version of this file only
   - under the terms of either the GPL or the LGPL, and not to allow others to
   - use your version of this file under the terms of the MPL, indicate your
   - decision by deleting the provisions above and replace them with the notice
   - and other provisions required by the LGPL or the GPL. If you do not delete
   - the provisions above, a recipient may use your version of this file under
   - the terms of any one of the MPL, the GPL or the LGPL.
   -
   - ***** END LICENSE BLOCK ***** -->
