richter     2002/06/30 23:57:13

  Modified:    .        Tag: Embperl2c Changes.pod ep.h epinit.c
                        epprovider.c eputil.c
               driver   Tag: Embperl2c eplibxslt.c
               eg/web   Tag: Embperl2c base.epl config.pl messages.pl
                        pod.xsl
               eg/web/db Tag: Embperl2c add.epl addsel.epl data.epd
               eg/web/db/news Tag: Embperl2c pod.xsl
  Added:       eg/web   Tag: Embperl2c podbase.xsl
               eg/web/db Tag: Embperl2c pod.xsl
  Log:
  libxml file search
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.129.4.82 +3 -0      embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.129.4.81
  retrieving revision 1.129.4.82
  diff -u -r1.129.4.81 -r1.129.4.82
  --- Changes.pod       29 Jun 2002 20:25:06 -0000      1.129.4.81
  +++ Changes.pod       1 Jul 2002 06:57:12 -0000       1.129.4.82
  @@ -4,6 +4,9 @@
   
   This version is currently under developement. You can get it from the 
L<CVS|CVS.pod>.
   
  +   - libxml now searchs through Embperl search path when includeing external 
entities,
  +     so for example <xsl:include> directives searchs files the same way as Execute
  +     does under Embperl::Object.
   
   =head1 2.0b8  (BETA)  25. Juni 2002
   
  
  
  
  1.27.4.48 +2 -1      embperl/ep.h
  
  Index: ep.h
  ===================================================================
  RCS file: /home/cvs/embperl/ep.h,v
  retrieving revision 1.27.4.47
  retrieving revision 1.27.4.48
  diff -u -r1.27.4.47 -r1.27.4.48
  --- ep.h      19 Jun 2002 04:22:43 -0000      1.27.4.47
  +++ ep.h      1 Jul 2002 06:57:12 -0000       1.27.4.48
  @@ -589,7 +589,8 @@
                           /*in*/  const char *         sFilename) ;
   char * embperl_PathSearch    (/*i/o*/ register req * r,
                               /*in*/  tMemPool *     pPool,
  -                            /*in*/  const char *         sFilename) ;
  +                            /*in*/  const char *         sFilename,
  +                            /*in*/  int            nPathNdx) ;
   char * embperl_PathStr      (/*i/o*/ register req * r,
                               /*in*/  const char *         sFilename) ;
   AV * embperl_String2AV (/*in*/ tApp * pApp, 
  
  
  
  1.1.2.58  +2 -2      embperl/Attic/epinit.c
  
  Index: epinit.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epinit.c,v
  retrieving revision 1.1.2.57
  retrieving revision 1.1.2.58
  diff -u -r1.1.2.57 -r1.1.2.58
  --- epinit.c  19 Jun 2002 04:22:43 -0000      1.1.2.57
  +++ epinit.c  1 Jul 2002 06:57:12 -0000       1.1.2.58
  @@ -1413,7 +1413,7 @@
       SV * pHV ;
       MAGIC * mg;
   
  -    if (c -> Param.sISA)
  +    if (c -> Param.sISA && c -> sCurrPackage)
           {
           STRLEN  l ;
           SV * pName = newSVpvf ("%s::ISA", c -> sImportPackage) ;
  
  
  
  1.1.2.37  +3 -3      embperl/Attic/epprovider.c
  
  Index: epprovider.c
  ===================================================================
  RCS file: /home/cvs/embperl/Attic/epprovider.c,v
  retrieving revision 1.1.2.36
  retrieving revision 1.1.2.37
  diff -u -r1.1.2.36 -r1.1.2.37
  --- epprovider.c      1 Jun 2002 23:44:25 -0000       1.1.2.36
  +++ epprovider.c      1 Jul 2002 06:57:12 -0000       1.1.2.37
  @@ -323,7 +323,7 @@
       pNew = (tProviderFile *)pItem -> pProvider ;
   
       sFilename = GetHashValueStr (aTHX_ pProviderParam, "filename",  r -> 
Component.Param.sInputfile) ;
  -    pNew -> sFilename = embperl_PathSearch(r, NULL, sFilename) ;
  +    pNew -> sFilename = embperl_PathSearch(r, NULL, sFilename, -1) ;
       if (!pNew -> sFilename)
           {
           strncpy (r -> errdat1, sFilename, sizeof (r -> errdat1) - 1) ;
  @@ -388,7 +388,7 @@
       const char * sAbsFilename  ;
   
       sFilename = GetHashValueStr (aTHX_ pProviderParam, "filename",  r -> 
Component.Param.sInputfile) ;
  -    sAbsFilename = embperl_PathSearch(r, NULL, (char *)sFilename) ;
  +    sAbsFilename = embperl_PathSearch(r, NULL, (char *)sFilename, -1) ;
       if (!sAbsFilename)
           {
           strncpy (r -> errdat1, sFilename, sizeof (r -> errdat1) - 1) ;
  
  
  
  1.15.4.55 +5 -4      embperl/eputil.c
  
  Index: eputil.c
  ===================================================================
  RCS file: /home/cvs/embperl/eputil.c,v
  retrieving revision 1.15.4.54
  retrieving revision 1.15.4.55
  diff -u -r1.15.4.54 -r1.15.4.55
  --- eputil.c  27 Jun 2002 06:30:03 -0000      1.15.4.54
  +++ eputil.c  1 Jul 2002 06:57:12 -0000       1.15.4.55
  @@ -1545,9 +1545,10 @@
   /*                                                                              */
   /* ---------------------------------------------------------------------------- */
   
  -char * embperl_PathSearch    (/*i/o*/ register req * r,
  +char * embperl_PathSearch  (/*i/o*/ register req * r,
                               /*in*/  tMemPool *     pPool,
  -                            /*in*/  const char *         sFilename)
  +                            /*in*/  const char *   sFilename,
  +                            /*in*/  int            nPathNdx)
   
       {
       epTHX_
  @@ -1568,7 +1569,7 @@
           sFilename += 3 ;
           }
       if (skip)
  -        skip += r -> Component.pPrev?r -> Component.pPrev -> nPathNdx:0 ;
  +        skip += nPathNdx >= 0?nPathNdx:r -> Component.pPrev?r -> Component.pPrev -> 
nPathNdx:0 ;
   
       if (skip == 0 && sFilename[0] == '.' && (sFilename[1] == '/' || sFilename[1] == 
'\\'))
           {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.22  +53 -2     embperl/driver/Attic/eplibxslt.c
  
  Index: eplibxslt.c
  ===================================================================
  RCS file: /home/cvs/embperl/driver/Attic/eplibxslt.c,v
  retrieving revision 1.1.2.21
  retrieving revision 1.1.2.22
  diff -u -r1.1.2.21 -r1.1.2.22
  --- eplibxslt.c       24 Jun 2002 09:22:47 -0000      1.1.2.21
  +++ eplibxslt.c       1 Jul 2002 06:57:13 -0000       1.1.2.22
  @@ -241,7 +241,7 @@
   *   \endif                                                                       
   */
   
  -void ProviderLibXSLT_ErrorFunc      (void *ctx, const char *msg, ...)
  +static void ProviderLibXSLT_ErrorFunc      (void *ctx, const char *msg, ...)
   
       {
       tReq * r ;
  @@ -274,6 +274,46 @@
       }
   
   
  +/* ------------------------------------------------------------------------ */
  +/*                                                                          */
  +/* ProviderLibXSLT_ExternalEnityLoader                                   */
  +/*                                                                          */
  +/*! 
  +*   \_en
  +*   Callback which is called when to load an external entity. It does
  +*   an EMbperl path search before calling libxmls function to do the work.
  +*   \endif                                                                       
  +*
  +*   \_de                                                                        
  +*   Callback das aufgerufen wird um externe Entities zu laden. Es wird eine
  +*   Suche im Embperl Pfad ausgef�hrt um danach libxml das eigentliche 
  +*   Laden zu �berlassen.
  +*   \endif                                                                       
  +*/
  +
  +
  +static xmlExternalEntityLoader pCurrentExternalEntityLoader ;
  +
  +static
  +xmlParserInputPtr
  +ProviderLibXSLT_ExternalEnityLoader(const char *URL, const char *ID,
  +                               xmlParserCtxtPtr ctxt) 
  +    {
  +    dTHX ;
  +    tReq * r = CurrReq ;
  +    char * sFile ;
  +
  +    sFile = embperl_PathSearch (r, r -> pPool, URL, r -> Component.nPathNdx) ;
  +    if (sFile && pCurrentExternalEntityLoader)
  +        return (*pCurrentExternalEntityLoader)(sFile, ID, ctxt) ;
  +    else
  +        {
  +        strncpy (r -> errdat1, URL, sizeof(r -> errdat1) - 1) ;
  +        LogError (r, rcNotFound) ;
  +        return NULL ;
  +        }
  +    }
  +
   
   /* ------------------------------------------------------------------------ */
   /*                                                                          */
  @@ -376,6 +416,8 @@
       SV *   pSource ;
       xsltStylesheetPtr cur ;
       xmlDocPtr            doc ;
  +    xmlExternalEntityLoader pLoader ;
  +
   
       tCacheItem * pFileCache = Cache_GetDependency(r, pProvider -> pCache, 0) ;
       if ((rc = Cache_GetContentSV (r, pFileCache, &pSource, bUseCache)) != ok)
  @@ -399,6 +441,10 @@
           xmlSubstituteEntitiesDefault(1);
           xmlLoadExtDtdDefaultValue = 1;
           xmlSetGenericErrorFunc (NULL, &ProviderLibXSLT_ErrorFunc) ;
  +        pLoader = xmlGetExternalEntityLoader () ;
  +        if (pLoader != &ProviderLibXSLT_ExternalEnityLoader)
  +            pCurrentExternalEntityLoader = pLoader ;
  +        xmlSetExternalEntityLoader (&ProviderLibXSLT_ExternalEnityLoader) ;
           
           if ((doc = xmlParseMemory(p, len)) == NULL)
                    {
  @@ -632,6 +678,7 @@
       STRLEN len ;
       SV *   pSource ;
       xmlDocPtr            doc ;
  +    xmlExternalEntityLoader pLoader ;
   
       tCacheItem * pFileCache = Cache_GetDependency(r, pProvider -> pCache, 0) ;
       if ((rc = Cache_GetContentSV (r, pFileCache, &pSource, bUseCache)) != ok)
  @@ -655,6 +702,10 @@
           xmlSubstituteEntitiesDefault(1);
           xmlLoadExtDtdDefaultValue = 1;
           xmlSetGenericErrorFunc (NULL, &ProviderLibXSLT_ErrorFunc) ;
  +        pLoader = xmlGetExternalEntityLoader () ;
  +        if (pLoader != &ProviderLibXSLT_ExternalEnityLoader)
  +            pCurrentExternalEntityLoader = pLoader ;
  +        xmlSetExternalEntityLoader (&ProviderLibXSLT_ExternalEnityLoader) ;
   
           if ((doc = xmlParseMemory(p, len)) == NULL)
                    {
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.9   +1 -0      embperl/eg/web/Attic/base.epl
  
  Index: base.epl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/Attic/base.epl,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- base.epl  25 Jun 2002 06:46:26 -0000      1.1.2.8
  +++ base.epl  1 Jul 2002 06:57:13 -0000       1.1.2.9
  @@ -31,6 +31,7 @@
              .cPodH2ContentLink   {[+ $base10 +]}
   
              .cPodH1              {[+ $base18 +] padding-left: 15px; padding-right: 
15px; background: #fefcad; color: #000000; font-weight: bold; }
  +           .cPodH1Link          {[+ $base12 +] padding-left: 15px; padding-right: 
15px; background: #fefcad; color: #000000; text-align: right ;}
              .cPodH2              {[+ $base14 +] padding-left: 15px; padding-right: 
15px; background: #D2E9F5; color: #000000; font-weight: bold; }
              .cTopLink            {[+ $base10 +] }
   
  
  
  
  1.1.2.19  +12 -9     embperl/eg/web/Attic/config.pl
  
  Index: config.pl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/Attic/config.pl,v
  retrieving revision 1.1.2.18
  retrieving revision 1.1.2.19
  diff -u -r1.1.2.18 -r1.1.2.19
  --- config.pl 30 Jun 2002 13:33:09 -0000      1.1.2.18
  +++ config.pl 1 Jul 2002 06:57:13 -0000       1.1.2.19
  @@ -61,14 +61,17 @@
       %messages = (
           'de' =>
               {
  -            'Introduction'  => 'Einf�hrung',
  -            'Documentation' => 'Dokumentation',
  -            'Examples'      => 'Beispiele',
  -            'Changes'       => '�nderungen',
  -            'Sites using Embperl' => 'Sites mit Embperl',
  -            'Add info about Embperl' => 'Hinzuf�gen Infos',
  -            '1.3.4 documentation' => '1.3.4 Dokumentation',
  -            'Configuration'  => 'Konfiguration',
  +            'Introduction'                    => 'Einf�hrung',
  +            'Documentation'                   => 'Dokumentation',
  +            'Examples'                        => 'Beispiele',
  +            'Changes'                         => '�nderungen',
  +            'Sites using Embperl'             => 'Sites mit Embperl',
  +            'Add info about Embperl'          => 'Hinzuf�gen Infos',
  +            'Enter info to add about Embperl' => 'Eingabe von Informationen zu 
Embperl',
  +            'Show info added about Embperl'   => 'Anzeige der gespeicherten 
Informationen zu Embperl',
  +            'Infos about Embperl'             => 'Informationen �ber Embperl',  
  +            '1.3.4 documentation'             => '1.3.4 Dokumentation',
  +            'Configuration'                   => 'Konfiguration',
               }
           ) ;
   
  @@ -192,7 +195,7 @@
               [
               { menu => 'Enter info to add about Embperl',    uri => 'db/add.epl' },
               { menu => 'Show info added about Embperl',      uri => 'db/show.epl'},
  -            { menu => 'Add info about Embperl',             uri => 'db/data.epd' },
  +            { menu => 'Infos about Embperl',                uri => 'db/data.epd' },
               ],
           },
           ) ;
  
  
  
  1.1.2.8   +4 -2      embperl/eg/web/Attic/messages.pl
  
  Index: messages.pl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/Attic/messages.pl,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- messages.pl       30 Jun 2002 13:33:09 -0000      1.1.2.7
  +++ messages.pl       1 Jul 2002 06:57:13 -0000       1.1.2.8
  @@ -10,7 +10,8 @@
           'addsel3' => 'Falls Sie die �bersetzung nicht wissen, lassen Sie das 
entsprechende Eingabefeld leer.',
           'addsel4' => 'Kategorie hinzuf�gen',
           'add1'    => 'Hinzuf�gen eines neuen Eintrages zu',
  -        'add2'    => 'Bitte geben Sie die Beschreibung in so vielen Sprachen wie 
Ihnen m�glich ein.\<br\>Falls Sie die �bersetzung nicht wissen, lassen Sie das 
entsprechende Eingabefeld leer.',
  +        'add2a'   => 'Bitte geben Sie die Beschreibung in so vielen Sprachen wie 
Ihnen m�glich ein.',
  +        'add2b'   => 'Falls Sie die �bersetzung nicht wissen, lassen Sie das 
entsprechende Eingabefeld leer.',
           'add3'    => 'Hinzuf�gen zu',
           'heading' => '�berschrift',
           'url'     => 'URL',
  @@ -28,7 +29,8 @@
           'addsel3' => 'If you don\'t know the translation leave the corresponding 
input field empty.',
           'addsel4' => 'Add category',
           'add1'    => 'Add a new item to',
  -        'add2'    => 'Please enter the description in as much languages as 
possible.<br>If you don\'t know the translation leave the corresponding input field 
empty.',
  +        'add2a'   => 'Please enter the description in as much languages as 
possible.',
  +        'add2b'   => 'If you don\'t know the translation leave the corresponding 
input field empty.',
           'add3'    => 'Add to',
           'heading' => 'Heading',
           'url'     => 'URL',
  
  
  
  1.1.2.13  +3 -218    embperl/eg/web/Attic/pod.xsl
  
  Index: pod.xsl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/Attic/pod.xsl,v
  retrieving revision 1.1.2.12
  retrieving revision 1.1.2.13
  diff -u -r1.1.2.12 -r1.1.2.13
  --- pod.xsl   30 Jun 2002 13:33:09 -0000      1.1.2.12
  +++ pod.xsl   1 Jul 2002 06:57:13 -0000       1.1.2.13
  @@ -14,17 +14,9 @@
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
                   xmlns="http://www.w3.org/TR/xhtml1/strict";>
   
  -
  -
       <xsl:output method="html" indent="yes" encoding="ISO-8859-1"/>
   
  -    <xsl:variable name="imageuri">/eg/images</xsl:variable>
  -    <xsl:variable name="newswidth">152</xsl:variable>
  -
  -    <xsl:param name="page" select="0"/>
  -    <xsl:param name="basename">default</xsl:param>
  -    <xsl:param name="extension">html???</xsl:param> <!-- select="'htm'"/> -->
  -    <xsl:param name="baseuri"></xsl:param>
  +    <xsl:include href="podbase.xsl"/> 
   
   
       <!-- - - - - Header 1 - - - - -->
  @@ -110,13 +102,6 @@
       <!-- - - - - Root - - - - -->
   
       <xsl:template match="/">                         
  -        <!--
  -        <html>
  -            <head>
  -                <title><xsl:value-of select="pod/head/title"/></title>
  -            </head>
  -            <body>
  -        -->
                   <xsl:choose>
                       <xsl:when test="count(/pod/sect1) = 1">
                           <xsl:apply-templates select="/pod/sect1"> 
  @@ -143,23 +128,19 @@
                           <xsl:apply-templates 
select="/pod/sect1[position()=$page]"/> 
                       </xsl:otherwise>
                   </xsl:choose>
  -        <!--
  -            </body>
  -        </html>
  -        -->
       </xsl:template>
   
       <!-- - - - - table of content - short - - - - -->
   
       <xsl:template match="sect1" mode="toc_short">                         
           <xsl:if test="para|verbatim|sect2|list">
  -              <li><b>
  +              <li>
                   <xsl:element name="a">
                     <xsl:attribute name="href"><xsl:value-of 
select="$basename"/>.-page-<xsl:number/>-.<xsl:value-of 
select="$extension"/></xsl:attribute>
                     <xsl:attribute name="class">cPodH1ContentLink</xsl:attribute>
                   <xsl:value-of select="title"/>
                 </xsl:element>
  -              </b></li>
  +              </li>
           </xsl:if>
       </xsl:template>
   
  @@ -193,7 +174,6 @@
             </li>
       </xsl:template>
   
  -
       <!-- ********** content - sect1 ********** -->
   
       <xsl:template match="sect1">                         
  @@ -241,200 +221,5 @@
       </xsl:template>
   
   
  -    <!-- - - - - list - - - - -->
  -
  -    <xsl:template match="list">                         
  -        <table border="0" cellspacing="3" cellpadding="0">
  -               <xsl:apply-templates mode="item"/> 
  -        </table>
  -    </xsl:template>
  -
  -
  -
  -    <xsl:template match="item" mode="item">                         
  -        <tr class="cItemText">
  -            <td valign="top">
  -                    <img src="{$imageuri}but.gif"/><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text>
  -            </td>
  -            <td>
  -                    <xsl:apply-templates select="itemtext"/>
  -            </td>
  -        </tr>
  -        <xsl:if test="*[name()!='itemtext']">
  -        <tr>
  -            <td>
  -                    <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>   
  
  -            </td>
  -            <td>
  -                    <xsl:apply-templates select="*[name()!='itemtext']"/>
  -            </td>
  -        </tr>
  -        <tr>
  -            <td colspan="2">
  -                    <img src="{$imageuri}transp.gif" height="4"/>
  -            </td>
  -        </tr>
  -        </xsl:if>
  -    </xsl:template>
  -
  -
  -    <xsl:template match="list" mode="item">                         
  -        <tr>
  -            <td>
  -                    <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>   
  
  -            </td>
  -            <td>
  -                <table border="0" cellspacing="3" cellpadding="0">
  -                       <xsl:apply-templates mode="item"/> 
  -                </table>
  -            </td>
  -        </tr>
  -    </xsl:template>
  -
  -    <xsl:template match="itemtext">                         
  -            <p><xsl:apply-templates/></p>
  -    </xsl:template>
  -
  -
  -    <!-- - - - - code - - - - -->
  -
  -    <!--
  -    <xsl:template match="verbatim">                         
  -        <xsl:if test="not(preceding-sibling::node()[position() = 
2][name()='verbatim'])">       
  -            <table width="100%" cellpadding="10">
  -            <tr>
  -            <td width="5%"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
  -            <td  class="cPodVerbatim" width="90%">
  -            <pre  class="cPodVerbatim"><xsl:value-of select="."/>
  -            
  -            <xsl:apply-templates select="following-sibling::node()[position() &lt; 
3][name()='verbatim']" mode="verbatim"/>
  -            </pre>
  -            </td>
  -            <td width="5%"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
  -            </tr>
  -            </table>
  -        </xsl:if>
  -    </xsl:template>
  -
  -    <xsl:template  match="verbatim" mode="verbatim">                         
  -            <xsl:value-of select="."/>
  -            <xsl:apply-templates select="following-sibling::node()[position() &lt; 
3][name()='verbatim']" mode="verbatim"/>
  -    </xsl:template>
  -    -->
  -
  -    <xsl:template match="verbatim">                         
  -            <table width="100%" cellspacing="0"><tr>
  -            <td width="5%"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
  -            <td  class="cPodVerbatim"  width="90%">
  -            <br/><pre>
  -            <xsl:apply-templates/>
  -            </pre>
  -            </td>
  -            <td width="5%"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
  -            </tr></table>
  -    </xsl:template>
  -
  -    <xsl:template  match="verbatim" mode="verbatim">                         
  -            <xsl:value-of select="."/>
  -            <xsl:apply-templates select="following-sibling::node()[position() &lt; 
3][name()='verbatim']" mode="verbatim"/>
  -    </xsl:template>
  -
  -    <!-- - - - - link - - - - -->
  -
  -    <xsl:template name="link">
  -        <xsl:param name="txt"/>
  -        <xsl:param name="uri"/>
  -        <xsl:choose>
  -            <xsl:when test="contains($uri, '.pod')">
  -                <xsl:element name="a">
  -                    <xsl:attribute name="href"><xsl:value-of 
select="$baseuri"/>pod/<xsl:value-of select="substring-before($uri, 
'.pod')"/>.htm</xsl:attribute>
  -                    <xsl:value-of select="$txt"/>
  -                </xsl:element>
  -            </xsl:when>
  -            <xsl:when test="contains($uri, '::')">
  -                <xsl:element name="a">
  -                    <xsl:attribute name="href"><xsl:value-of 
select="translate($uri, ':', '/')"/></xsl:attribute>
  -                    <xsl:value-of select="$txt"/>
  -                </xsl:element>
  -            </xsl:when>
  -            <xsl:when test="starts-with($uri, 'http:')">
  -                <a href="{$uri}"><xsl:value-of select="$txt"/></a>
  -            </xsl:when>
  -            <xsl:when test="starts-with($uri, 'ftp:')">
  -                <a href="{$uri}"><xsl:value-of select="$txt"/></a>
  -            </xsl:when>
  -            <xsl:otherwise>
  -                
  -                <xsl:variable name="page">
  -                    <xsl:apply-templates select="//sect1[title=$uri]" 
mode="number"/>     
  -                </xsl:variable>
  -
  -                <xsl:choose>
  -                    <xsl:when test="$page!=''">
  -                        <a 
href="{$basename}.-page-{$page}-.{$extension}"><xsl:value-of select="$txt"/></a>
  -                    </xsl:when>
  -                    <xsl:otherwise>
  -                        <xsl:variable name="page">
  -                            <xsl:apply-templates select="//sect1[sect2/title=$uri]" 
mode="number"/>     
  -                        </xsl:variable>
  -                        <xsl:variable name="sect">
  -                            <xsl:apply-templates select="//sect2[title=$uri]" 
mode="number"/>     
  -                        </xsl:variable>
  -
  -                        <xsl:choose>
  -                            <xsl:when test="$page!=''">
  -                                <a 
href="{$basename}.-page-{$page}-.{$extension}#sect_{$sect}"><xsl:value-of 
select="$txt"/></a>
  -                            </xsl:when>
  -                            <xsl:otherwise>
  -                                <xsl:value-of select="$txt"/>
  -                            </xsl:otherwise>
  -                        </xsl:choose>
  -                    </xsl:otherwise>
  -                </xsl:choose>
  -            </xsl:otherwise>
  -        </xsl:choose>
  -    </xsl:template>
  -
  -
  -
  -    <xsl:template match="xlink">                         
  -            <xsl:choose>
  -                <xsl:when test="@uri">
  -                    <xsl:call-template name="link">
  -                        <xsl:with-param name="uri" select="@uri"/>
  -                        <xsl:with-param name="txt" select="."/>
  -                    </xsl:call-template>
  -                </xsl:when>
  -                <xsl:otherwise>
  -                    <xsl:call-template name="link">
  -                        <xsl:with-param name="uri" select="."/>
  -                        <xsl:with-param name="txt" select="."/>
  -                    </xsl:call-template>
  -                </xsl:otherwise>
  -            </xsl:choose>
  -                 
  -    </xsl:template>
  -
  -    <xsl:template match="para">                         
  -            <p class="body"><xsl:apply-templates/></p>
  -    </xsl:template>
  -
  -    <!-- - - - - text - - - - -->
  -
  -    <xsl:template match="emphasis">                         
  -        <i><xsl:value-of select="."/></i>
  -    </xsl:template>
  -
  -    <xsl:template match="strong">                         
  -        <b><xsl:value-of select="."/></b>
  -    </xsl:template>
  -
  -    <xsl:template match="code">                         
  -        <code><xsl:value-of select="."/></code>
  -    </xsl:template>
  -
  -    <xsl:template match="underline">                         
  -        <u><xsl:value-of select="."/></u>
  -    </xsl:template>
   
   </xsl:stylesheet> 
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +223 -0    embperl/eg/web/Attic/podbase.xsl
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.6   +2 -1      embperl/eg/web/db/Attic/add.epl
  
  Index: add.epl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/db/Attic/add.epl,v
  retrieving revision 1.1.2.5
  retrieving revision 1.1.2.6
  diff -u -r1.1.2.5 -r1.1.2.6
  --- add.epl   30 Jun 2002 13:33:09 -0000      1.1.2.5
  +++ add.epl   1 Jul 2002 06:57:13 -0000       1.1.2.6
  @@ -14,7 +14,8 @@
   
   <form action="[+ $r -> {action_prefix}?($r->{action_prefix} . dirname($r-> param -> 
uri) .'/'):'' +]show.epl" method="POST">
   
  -[= add2 =]<br><br>
  +[= add2a =]<br>
  +[= add2b =]<br><br>
   
   [#
   <table>
  
  
  
  1.1.2.9   +2 -1      embperl/eg/web/db/Attic/addsel.epl
  
  Index: addsel.epl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/db/Attic/addsel.epl,v
  retrieving revision 1.1.2.8
  retrieving revision 1.1.2.9
  diff -u -r1.1.2.8 -r1.1.2.9
  --- addsel.epl        30 Jun 2002 13:33:09 -0000      1.1.2.8
  +++ addsel.epl        1 Jul 2002 06:57:13 -0000       1.1.2.9
  @@ -46,7 +46,7 @@
       </li>
   </ul>
   
  -
  +[#
   <form action="[+ $r -> {action_prefix}?($r->{action_prefix} . dirname($r-> param -> 
uri) .'/'):''+]addsel.epl"  OnSubmit="">
   
   [= addsel2 =]<br> 
  @@ -63,3 +63,4 @@
   &nbsp;&nbsp;&nbsp;&nbsp;<input type="submit" name="-add_category" 
value="[=addsel4=]">
   
   </form>
  +#]
  \ No newline at end of file
  
  
  
  1.1.2.7   +1 -0      embperl/eg/web/db/Attic/data.epd
  
  Index: data.epd
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/db/Attic/data.epd,v
  retrieving revision 1.1.2.6
  retrieving revision 1.1.2.7
  diff -u -r1.1.2.6 -r1.1.2.7
  --- data.epd  30 Jun 2002 13:33:09 -0000      1.1.2.6
  +++ data.epd  1 Jul 2002 06:57:13 -0000       1.1.2.7
  @@ -22,5 +22,6 @@
   
   [+ $rec -> {description} +] [[[+ $date +]]
   
  +[+ $rec -> {url} +]
   
   [$endwhile$]
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +78 -0     embperl/eg/web/db/Attic/pod.xsl
  
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +5 -213    embperl/eg/web/db/news/Attic/pod.xsl
  
  Index: pod.xsl
  ===================================================================
  RCS file: /home/cvs/embperl/eg/web/db/news/Attic/pod.xsl,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- pod.xsl   13 Mar 2002 06:29:37 -0000      1.1.2.2
  +++ pod.xsl   1 Jul 2002 06:57:13 -0000       1.1.2.3
  @@ -1,231 +1,23 @@
  -<?xml version='1.0'?>
  -
  -
  -<!DOCTYPE stylesheet [
  -<!-- <!ENTITY nbsp "<xsl:text 
disable-output-escaping=&quot;yes&quot;>&amp;nbsp;</xsl:text>"> -->
  -<!ENTITY space "<xsl:text> </xsl:text>">
  -<!ENTITY cr "<xsl:text>
  -</xsl:text>">
  -]>
  +<?xml version='1.0' encoding="ISO-8859-1" ?>
   
   
   <xsl:stylesheet version="1.0"
                   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  -                xmlns:pod="http://axkit.org/ns/2000/pod2xml";
                   xmlns="http://www.w3.org/TR/xhtml1/strict";>
   
  -
  -    <xsl:output method="html" indent="yes" encoding="iso-8859-1"/>
  -
  -    <xsl:variable name="imagepath">/eg/images</xsl:variable>
  -    <xsl:variable name="newswidth">152</xsl:variable>
  -
  -    <xsl:param name="page" select="0"/>
  -    <xsl:param name="basename">default</xsl:param>
  -    <xsl:param name="extension">html???</xsl:param> <!-- select="'htm'"/> -->
  -    <xsl:param name="pageinname">0</xsl:param>
  -
  -
  -    <!-- - - - - Title - - - - -->
  -
  -    <xsl:template name="titleline">                         
  -     <xsl:param name="txt"></xsl:param>
  -      <table width="100%" border="0" cellspacing="0" cellpadding="6">
  -        <tr> 
  -          <td bgcolor="#fefcad"><b>
  -            <font size="4" face="Verdana, Arial, Helvetica, sans-serif">
  -            <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
  -                <xsl:value-of select="$txt"/>    
  -            </font></b></td>
  -        </tr>
  -        </table>
  -    </xsl:template>
  -
  -    <!-- - - - - Header 1 - - - - -->
  -
  -    <xsl:template name="header1line">                         
  -     <xsl:param name="txt"></xsl:param>
  -      <table width="100%" border="0" cellspacing="0" cellpadding="6">
  -        <tr> 
  -          <td bgcolor="#D2E9F5"><b>
  -            <font color="0" xx="#FFFFFF"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text>
  -                <xsl:value-of select="$txt"/>    
  -            </font></b></td>
  -        </tr>
  -        </table>
  -    </xsl:template>
  +    <xsl:variable name="category_id" select="1"/>
  +    <xsl:include href="../pod.xsl"/>
   
   
   
       <!-- - - - - Root - - - - -->
   
       <xsl:template match="/">                         
  -        <html>
  -            <head>
  -                <title><xsl:value-of select="pod/head/title"/></title>
  -            </head>
  -            <body>
  -                <xsl:call-template name="titleline">
  -                    <xsl:with-param name="txt" select="pod/head/title"/>
  -                </xsl:call-template>
  -                <xsl:apply-templates select="/pod/sect1"/> 
  -            </body>
  -        </html>
  -    </xsl:template>
  -
  -
  -    <!-- - - - - content - - - - -->
  -
  -
  -    <xsl:template match="sect1">                         
  -          
           <xsl:call-template name="header1line">
  -            <xsl:with-param name="txt" select="title"/>
  +            <xsl:with-param name="txt" select="/pod/head/title"/>
           </xsl:call-template>
  +        <xsl:apply-templates select="/pod/sect1"/> 
   
  -        <xsl:if test="para|verbatim|sect2">
  -            <xsl:apply-templates select="*[name()!='title']"/> 
  -        </xsl:if>
  -    </xsl:template>
  -
  -
  -    <xsl:template match="sect2">                         
  -        <xsl:if test="para|verbatim|sect3">
  -            <br/>
  -            <xsl:element name="a">
  -                <xsl:attribute name="name">sect_<xsl:number 
level="any"/></xsl:attribute>
  -              <table width="100%" border="0" cellspacing="0" cellpadding="6">
  -                <tr bgcolor="#D2E9F5"> 
  -                  <td><font size="2" face="Verdana, Arial, Helvetica, 
sans-serif"><b>
  -                    <font color="0"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text>
  -                        <xsl:value-of select="title"/>    
  -                    </font></b></font></td>
  -                   <td align="right"><a href="#top"><font 
size="1">top</font></a></td> 
  -                </tr>
  -                </table>
  -            </xsl:element>
  -        <xsl:apply-templates select="*[name()!='title']"/> 
  -        </xsl:if>
  -    </xsl:template>
  -
  -
  -    <!-- - - - - list - - - - -->
  -
  -    <xsl:template match="list">                         
  -        <table border="0" cellspacing="3" cellpadding="0">
  -               <xsl:apply-templates mode="item"/> 
  -        </table>
  -    </xsl:template>
  -
  -
  -
  -    <xsl:template match="item" mode="item">                         
  -        <tr>
  -            <td>
  -                    <img src="{$imagepath}/but.gif"/>
  -            </td>
  -            <td>
  -                    <xsl:apply-templates select="itemtext"/>
  -            </td>
  -        </tr>
  -        <tr>
  -            <td>
  -                    <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>   
  
  -            </td>
  -            <td>
  -                    <xsl:apply-templates select="*[name()!='itemtext']"/>
  -            </td>
  -        </tr>
  -        <tr>
  -            <td colspan="2">
  -                    <img src="{$imagepath}/transp.gif" height="4"/>
  -            </td>
  -        </tr>
  -    </xsl:template>
  -
  -
  -    <xsl:template match="list" mode="item">                         
  -        <tr>
  -            <td>
  -                    <xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>   
  
  -            </td>
  -            <td>
  -                <table border="0" cellspacing="3" cellpadding="0">
  -                       <xsl:apply-templates mode="item"/> 
  -                </table>
  -            </td>
  -        </tr>
  -    </xsl:template>
  -
  -    <xsl:template match="itemtext">                         
  -            <p><font size="2" face="Verdana, Arial, Helvetica, 
sans-serif"><b><xsl:apply-templates/></b></font></p>
  -    </xsl:template>
  -
  -
  -    <!-- - - - - code - - - - -->
  -
  -    <!--
  -    <xsl:template match="verbatim">                         
  -        <xsl:if test="not(preceding-sibling::node()[position() = 
2][name()='verbatim'])">       
  -            <table width="100%" cellpadding="10"><tr>
  -            <td width="10%"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
  -            <td bgcolor="#eeeeee">
  -            <pre><xsl:value-of select="."/>
  -            
  -            <xsl:apply-templates select="following-sibling::node()[position() &lt; 
3][name()='verbatim']" mode="verbatim"/>
  -            </pre>
  -            </td>
  -            <td width="10%"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
  -            </tr></table>
  -        </xsl:if>
  -    </xsl:template>
  -
  -    <xsl:template  match="verbatim" mode="verbatim">                         
  -            <xsl:value-of select="."/>
  -            <xsl:apply-templates select="following-sibling::node()[position() &lt; 
3][name()='verbatim']" mode="verbatim"/>
  -    </xsl:template>
  -    -->
  -
  -    <xsl:template match="verbatim">                         
  -            <table width="100%" cellpadding="3" cellspacing="0"><tr>
  -            <td width="10%"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
  -            <td bgcolor="#eeeeee">
  -            <pre>
  -            <xsl:apply-templates/>
  -            </pre>
  -            </td>
  -            <td width="10%"><xsl:text 
disable-output-escaping="yes">&amp;nbsp;</xsl:text></td>
  -            </tr></table>
  -    </xsl:template>
  -
  -    <xsl:template  match="verbatim" mode="verbatim">                         
  -            <xsl:value-of select="."/>
  -            <xsl:apply-templates select="following-sibling::node()[position() &lt; 
3][name()='verbatim']" mode="verbatim"/>
  -    </xsl:template>
  -
  -    <!-- - - - - link - - - - -->
  -
  -    <xsl:template match="xlink">                         
  -            <xsl:element name="a">
  -                <xsl:attribute name="href">
  -                    <xsl:value-of select="@uri"/>
  -                </xsl:attribute>
  -                <xsl:value-of select="."/>
  -            </xsl:element>
  -    </xsl:template>
  -
  -    <xsl:template match="para">                         
  -            <p><font size="2" face="Verdana, Arial, Helvetica, 
sans-serif"><xsl:apply-templates/></font></p>
  -    </xsl:template>
  -
  -    <!-- - - - - text - - - - -->
  -
  -    <xsl:template match="emphasis">                         
  -        <i><xsl:value-of select="."/></i>
  -    </xsl:template>
  -
  -    <xsl:template match="strong">                         
  -        <b><xsl:value-of select="."/></b>
       </xsl:template>
   
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to