!C99Shell v. 1.0 pre-release build #16!

Software: Apache/2.0.54 (Fedora). PHP/5.0.4 

uname -a: Linux mina-info.me 2.6.17-1.2142_FC4smp #1 SMP Tue Jul 11 22:57:02 EDT 2006 i686 

uid=48(apache) gid=48(apache) groups=48(apache)
context=system_u:system_r:httpd_sys_script_t
 

Safe-mode: OFF (not secure)

/usr/lib/4Suite/tests/Xml/Xslt/Borrowed/   drwxr-xr-x
Free 6.77 GB of 27.03 GB (25.05%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     mo_20001217.py (2.87 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
# Mike Olson's attempt to count all of the text characters in a document
# not counting ' ' -- from a request on the list by Evyatar Kafkafi.

from Xml.Xslt import test_harness

source_1 = """<?xml version="1.0" standalone="yes"?>
<A>
          <B>
                    <C>111 112212</C>
          </B>
          <B>
                    <C>111</C>
                    <C>212</C>
          </B>
</A>"""

expected = """15"""

sheet_1="""<?xml version='1.0'?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method='text'/>

  <xsl:template match='/'>
    <xsl:call-template name='charcount'>
      <xsl:with-param name='node' select='.'/>
    </xsl:call-template>
  </xsl:template>

  <xsl:template name='charcount'>
    <xsl:param name='node'/>
    <xsl:call-template name='chars-in-text'>
      <xsl:with-param name='texts' select='$node//text()'/>
    </xsl:call-template>
  </xsl:template>

  <xsl:template name='chars-in-text'>
    <xsl:param name='texts'/>
    <xsl:param name='num-chars' select='0'/>
    <xsl:choose>
      <xsl:when test='count($texts) > 0'>
        <xsl:variable name='cur-count'>
          <xsl:call-template name='count-chars'>
            <xsl:with-param name='string' select='$texts[1]'/>
          </xsl:call-template>
        </xsl:variable>
        <xsl:call-template name='chars-in-text'>
          <xsl:with-param name='texts' select='$texts[position() > 1]'/>
          <xsl:with-param name='num-chars' select='$num-chars + $cur-count'/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select='$num-chars'/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template name='count-chars'>
    <xsl:param name='string'/>
    <xsl:param name='cur-pos' select='1'/>
    <xsl:param name='non-ns-chars' select='0'/>
    <xsl:choose>
      <xsl:when test='$cur-pos &lt;= string-length($string)'>
        <xsl:variable name='cur-char' select='substring($string,$cur-pos,1)'/>
        <xsl:variable name='new-count'>
          <xsl:choose>
            <xsl:when test="$cur-char = ' '">0</xsl:when>
            <xsl:when test="$cur-char = '&#10;'">0</xsl:when>
            <xsl:otherwise>1</xsl:otherwise>
          </xsl:choose>
        </xsl:variable>
        <xsl:call-template name='count-chars'>
          <xsl:with-param name='string' select='$string'/>
          <xsl:with-param name='cur-pos' select='$cur-pos + 1'/>
          <xsl:with-param name='non-ns-chars' select='$non-ns-chars + $new-count'/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select='$non-ns-chars'/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
            
</xsl:stylesheet>
"""

def Test(tester):
    source = test_harness.FileInfo(string=source_1)
    sheet = test_harness.FileInfo(string=sheet_1)
    test_harness.XsltTest(tester, source, [sheet], expected)
    return

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 1.0 pre-release build #16 powered by Captain Crunch Security Team | http://ccteam.ru | Generation time: 0.0035 ]--