You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl-cvs@perl.apache.org by ri...@apache.org on 2002/06/18 08:27:35 UTC
cvs commit: embperl/podsrc Config.spod s2pod.pl
richter 2002/06/17 23:27:35
Modified: . Tag: Embperl2c embperl.h epmain.c epparse.c test.pl
Embperl/Syntax Tag: Embperl2c POD.pm
eg/web Tag: Embperl2c epwebapp.pl pod.xsl
Added: podsrc Tag: Embperl2c Config.spod s2pod.pl
Log:
web & docs
Revision Changes Path
No revision
No revision
1.19.4.30 +2 -1 embperl/embperl.h
Index: embperl.h
===================================================================
RCS file: /home/cvs/embperl/embperl.h,v
retrieving revision 1.19.4.29
retrieving revision 1.19.4.30
diff -u -r1.19.4.29 -r1.19.4.30
--- embperl.h 5 Jun 2002 18:07:56 -0000 1.19.4.29
+++ embperl.h 18 Jun 2002 06:27:34 -0000 1.19.4.30
@@ -91,6 +91,7 @@
rcSetupSessionErr,
rcRefcntNotOne,
rcApacheErr,
+ rcTooDeepNested,
rcForbidden = 403,
rcNotFound = 404,
rcDecline = -1
1.75.4.123 +2 -1 embperl/epmain.c
Index: epmain.c
===================================================================
RCS file: /home/cvs/embperl/epmain.c,v
retrieving revision 1.75.4.122
retrieving revision 1.75.4.123
diff -u -r1.75.4.122 -r1.75.4.123
--- epmain.c 17 Jun 2002 19:25:50 -0000 1.75.4.122
+++ epmain.c 18 Jun 2002 06:27:34 -0000 1.75.4.123
@@ -176,6 +176,7 @@
case rcSetupSessionErr: msg ="[%d]ERR: %d: %s Embperl Session handling DISABLED because of the following error: %s\nSet EMBPERL_SESSION_HANDLER_CLASS to 'no' to avoid this message. %s" ; break ;
case rcRefcntNotOne: msg ="[%d]ERR: %d: %s There is still %s reference(s) to the %s object, while there shouldn't be any." ; break ;
case rcApacheErr: msg ="[%d]ERR: %d: %s Apache returns Error: %s %s" ; break ;
+ case rcTooDeepNested: msg ="[%d]ERR: %d: %s Source data is too deep nested %s %s" ; break ;
default: msg ="[%d]ERR: %d: %s Error (no description) %s %s" ; break ;
}
1.4.2.56 +12 -3 embperl/Attic/epparse.c
Index: epparse.c
===================================================================
RCS file: /home/cvs/embperl/Attic/epparse.c,v
retrieving revision 1.4.2.55
retrieving revision 1.4.2.56
diff -u -r1.4.2.55 -r1.4.2.56
--- epparse.c 17 Jun 2002 19:25:50 -0000 1.4.2.55
+++ epparse.c 18 Jun 2002 06:27:34 -0000 1.4.2.56
@@ -861,7 +861,9 @@
return 1 ;
}
else if (rc != rcNotFound)
- return rc ;
+ {
+ return rc ;
+ }
if (pToken -> nNodeType == ntypStartEndTag)
{
xParentNode = Node_parentNode (r -> pApp, pDomTree, xNewNode, 0) ;
@@ -949,7 +951,10 @@
Node_self (pDomTree, xNewAttrNode) -> bFlags |= pToken -> bAddFlags ;
if (pToken -> sParseTimePerlCode)
if ((rc = ExecParseTimeCode (r, pToken, pCurr, pEnd - pCurr, nLine)) != ok)
+ {
+ r -> Component.pCurrPos = pCurrTokenStart ;
return rc ;
+ }
}
if (pToken -> nNodeType == ntypStartEndTag)
@@ -967,7 +972,11 @@
pToken -> nNodeType == ntypEndStartTag ||
pToken -> nNodeType == ntypStartEndTag))
{
- level++ ;
+ if (level++ > 1000)
+ {
+ r -> Component.pCurrPos = pCurrTokenStart ;
+ return rcTooDeepNested ;
+ }
xParentNode = xNewNode ;
nCDataType = pTokenTable -> nDefNodeType ;
}
1.70.4.138 +2 -2 embperl/test.pl
Index: test.pl
===================================================================
RCS file: /home/cvs/embperl/test.pl,v
retrieving revision 1.70.4.137
retrieving revision 1.70.4.138
diff -u -r1.70.4.137 -r1.70.4.138
--- test.pl 15 Jun 2002 23:06:01 -0000 1.70.4.137
+++ test.pl 18 Jun 2002 06:27:34 -0000 1.70.4.138
@@ -2776,7 +2776,7 @@
-----------------------------------------------------------------------
- Test server will be stoped now.
+ Test server will be stopped now.
-----------------------------------------------------------------------
} ;
No revision
No revision
1.1.2.19 +7 -1 embperl/Embperl/Syntax/Attic/POD.pm
Index: POD.pm
===================================================================
RCS file: /home/cvs/embperl/Embperl/Syntax/Attic/POD.pm,v
retrieving revision 1.1.2.18
retrieving revision 1.1.2.19
diff -u -r1.1.2.18 -r1.1.2.19
--- POD.pm 17 Jun 2002 19:25:54 -0000 1.1.2.18
+++ POD.pm 18 Jun 2002 06:27:35 -0000 1.1.2.19
@@ -192,6 +192,12 @@
'nodename' => 'code',
'nodetype' => ntypStartEndTag,
},
+ 'POD Format F' => {
+ 'text' => 'F<',
+ 'end' => '>',
+ 'nodename' => 'code',
+ 'nodetype' => ntypStartEndTag,
+ },
'POD Format I' => {
'text' => 'I<',
'end' => '>',
No revision
No revision
1.1.2.8 +16 -6 embperl/eg/web/Attic/epwebapp.pl
Index: epwebapp.pl
===================================================================
RCS file: /home/cvs/embperl/eg/web/Attic/epwebapp.pl,v
retrieving revision 1.1.2.7
retrieving revision 1.1.2.8
diff -u -r1.1.2.7 -r1.1.2.8
--- epwebapp.pl 15 Jun 2002 23:06:02 -0000 1.1.2.7
+++ epwebapp.pl 18 Jun 2002 06:27:35 -0000 1.1.2.8
@@ -96,15 +96,25 @@
my $uri = $r -> param -> uri ;
my $config = $r -> {config} ;
+ # we embed some parameters in the uri itself, to allow making a
+ # static copy, so see if there is anything here
+ while ($uri =~ s/\.-(.*?)-(.*?)-\././g)
+ {
+ $fdat{$1} = $2 ;
+ }
+ $r -> param -> uri ($uri) ;
+
+ # check if we have anything under this uri in our configuration
+ # if it's a directory, try to append index.*
my $m ;
$uri =~ /^(.*)\./ ;
- print STDERR "map_file uri=$uri 1=$1\n" ;
if (!($m = $config -> {map1}{$uri} || $config -> {map2}{$1}))
{
$m = $config -> {map1}{$1} if ($uri =~ m#^(.*?/)index\..*$#) ;
- print STDERR "map_file uri=$uri 1=$1\n" ;
}
+ # if we found something, setup $r -> {menuitem} to hold the menu
+ # tree we need to display for this page
if ($m)
{
my @menuitems = ($m) ;
@@ -114,13 +124,11 @@
unshift @menuitems, $item ;
}
$r -> {menuitems} = \@menuitems ;
- print STDERR "fdat hash $m->{fdat}\n" ;
if ($m -> {fdat})
{
while (my ($k, $v) = each %{$m -> {fdat}})
{
$fdat{$k} = $v ;
- print STDERR "fdat $k = $v \n" ;
}
}
@@ -133,6 +141,8 @@
return $path ;
}
+
+ # nothing found, so return a general error page
return "$r->{root}$r->{baseuri}notfound.htm" ;
}
@@ -219,7 +229,7 @@
$config -> xsltstylesheet('pod.xsl') ;
#$config -> xsltstylesheet($r -> {root} . $r -> {baseuri} . 'xml/pod.xsl') ;
- $r -> param -> uri =~ /^.*\/(.*)(\..*?)$/ ;
+ $r -> param -> uri =~ /^.*\/(.*)\.(.*?)$/ ;
$param -> xsltparam({page => $r -> thread -> form_hash -> {page} || 0, basename => "'$1'", extension => "'$2'"}) ;
return Embperl::Recipe::EmbperlXSLT -> get_recipe ($r, $recipe) ;
}
@@ -237,7 +247,7 @@
$config -> xsltstylesheet('pod.xsl') ;
- $r -> param -> uri =~ /^.*\/(.*)(\..*?)$/ ;
+ $r -> param -> uri =~ /^.*\/(.*)\.(.*?)$/ ;
my $fdat = $r -> thread -> form_hash ;
$fdat->{page} ||= 0 ;
$fdat->{basename} = "'$1'" ;
1.1.2.7 +47 -47 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.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- pod.xsl 17 Jun 2002 19:25:54 -0000 1.1.2.6
+++ pod.xsl 18 Jun 2002 06:27:35 -0000 1.1.2.7
@@ -59,49 +59,28 @@
<xsl:apply-templates select="preceding-sibling::sect1[para|verbatim|sect2][position()=1]" mode="number"/>
</xsl:variable>
- <table width="100%"><tr><td align="left" valign="top" width="35%">
- <xsl:if test="$prevpage > 0">
- <xsl:choose>
- <xsl:when test="$pageinname != 0">
- <a href="{$basename}.{$prevpage}{$extension}" class="cPodHeaderNavLink">
- << Prev: <xsl:value-of select="preceding-sibling::sect1[para|verbatim|sect2][position()=1]/title"/>
- </a>
- </xsl:when>
- <xsl:otherwise>
- <a href="{$basename}{$extension}?page={$prevpage}" class="cPodHeaderNavLink">
- << Prev: <xsl:value-of select="preceding-sibling::sect1[para|verbatim|sect2][position()=1]/title"/>
- </a>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </td>
- <td align="center" valign="top" width="30%">
- <xsl:element name="a">
- <xsl:if test="$pageinname != 0">
- <xsl:attribute name="href"><xsl:value-of select="$basename"/>.0<xsl:value-of select="$extension"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="$pageinname = 0">
- <xsl:attribute name="href"><xsl:value-of select="$basename"/><xsl:value-of select="$extension"/>?page=0</xsl:attribute>
+ <table width="100%">
+ <tr>
+ <td align="left" valign="top" width="35%">
+ <xsl:if test="$prevpage > 0">
+ <a href="{$basename}.-page-{$prevpage}-.{$extension}" class="cPodHeaderNavLink">
+ [<< Prev: <xsl:value-of select="preceding-sibling::sect1[para|verbatim|sect2][position()=1]/title"/>]
+ </a>
+ </xsl:if>
+ </td>
+ <td align="center" valign="top" width="30%">
+ <a href="{$basename}.{$extension}" class="cPodHeaderNavLink">[Content]</a>
+ </td>
+ <td align="right" valign="top" width="35%">
+ <xsl:if test="following-sibling::sect1">
+ <a href="{$basename}.-page-{$nextpage}-.{$extension}" class="cPodHeaderNavLink">
+ [Next: <xsl:value-of select="following-sibling::sect1[para|verbatim|sect2]/title"/> >>]
+ </a>
+
</xsl:if>
- <xsl:attribute name="class">cPodHeaderNavLink</xsl:attribute>
- [Content]
- </xsl:element>
- </td>
- <td align="right" valign="top" width="35%">
- <xsl:if test="following-sibling::sect1">
- <xsl:element name="a">
- <xsl:if test="$pageinname != 0">
- <xsl:attribute name="href"><xsl:value-of select="$basename"/>.<xsl:value-of select="$nextpage"/><xsl:value-of select="$extension"/></xsl:attribute>
- </xsl:if>
- <xsl:if test="$pageinname = 0">
- <xsl:attribute name="href"><xsl:value-of select="concat($basename,$extension)"/>?page=<xsl:value-of select="$nextpage"/></xsl:attribute>
- </xsl:if>
- <xsl:attribute name="class">cPodHeaderNavLink</xsl:attribute>
- Next: <xsl:value-of select="following-sibling::sect1[para|verbatim|sect2]/title"/> >>
- </xsl:element>
- </xsl:if>
- </td>
- </tr></table>
+ </td>
+ </tr>
+ </table>
</xsl:when>
<xsl:otherwise>
<xsl:variable name="nextpage">
@@ -128,14 +107,18 @@
<!-- - - - - 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"/>
+ <xsl:apply-templates select="/pod/sect1">
+ <xsl:with-param name="shownav">0</xsl:with-param>
+ </xsl:apply-templates>
</xsl:when>
<xsl:when test="$page = 0">
<xsl:call-template name="header1line">
@@ -157,8 +140,10 @@
<xsl:apply-templates select="/pod/sect1[position()=$page]"/>
</xsl:otherwise>
</xsl:choose>
+ <!--
</body>
</html>
+ -->
</xsl:template>
<!-- - - - - table of content - short - - - - -->
@@ -217,16 +202,18 @@
</xsl:template>
- <!-- - - - - content - - - - -->
-
+ <!-- ********** content - sect1 ********** -->
<xsl:template match="sect1">
+ <xsl:param name="shownav">1</xsl:param>
<xsl:call-template name="header1line">
<xsl:with-param name="txt" select="title"/>
</xsl:call-template>
- <xsl:call-template name="headernav"/>
+ <xsl:if test="$shownav = 1">
+ <xsl:call-template name="headernav"/>
+ </xsl:if>
<xsl:if test="para|verbatim|sect2|list">
<xsl:if test="sect2">
@@ -236,11 +223,17 @@
</xsl:if>
<xsl:apply-templates select="*[name()!='title']"/>
</xsl:if>
+
<hr/>
- <xsl:call-template name="headernav"/>
+ <xsl:if test="$shownav = 1">
+ <xsl:call-template name="headernav"/>
+ </xsl:if>
+
</xsl:template>
+ <!-- ********** content - sect2 ********** -->
+
<xsl:template match="sect2">
<br/>
<xsl:element name="a">
@@ -440,5 +433,12 @@
<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 +858 -0 embperl/podsrc/Attic/Config.spod
1.1.2.1 +38 -0 embperl/podsrc/Attic/s2pod.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-cvs-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-cvs-help@perl.apache.org