!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.04%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     dp_20000310.py (5.63 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
#Namespace tracer from Pawson, David <DPawson@rnib.org.uk> on 10 March 2000, with a version using the namespace axis from David Carlisle.

from Xml.Xslt import test_harness

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

<xsl:stylesheet
   version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:ns-test="http://ns1.com"
   xmlns:ns1="http://ns1.com"
   xmlns:ns2="http://ns2.com"
   xmlns:long-namespace="http://ns3.com"
   exclude-result-prefixes="ns1 ns2 long-namespace"
>

<xsl:output method="xml" indent="yes"/>

<xsl:template match="*">
  <!--<xsl:message><xsl:value-of select="name(.)"/></xsl:message>-->
  <tag>Namespace:<xsl:choose><xsl:when test="namespace-uri(.)"><xsl:value-of select="namespace-uri(.)"/>
      </xsl:when>
      <xsl:otherwise> Null namespace</xsl:otherwise>
    </xsl:choose>
  </tag>
  <tag>name: <xsl:value-of select="name(.)"/></tag>
  <tag>local-name: <xsl:value-of select="local-name(.)"/></tag>
  <tag>Content: <xsl:value-of select="text()"/></tag>
  <xsl:if test="./*"><xsl:apply-templates/></xsl:if>
</xsl:template>

</xsl:stylesheet>"""


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

<xsl:stylesheet
   version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:ns-test="http://ns1.com"
   xmlns:ns1="http://ns1.com"
   xmlns:ns2="http://ns2.com"
   xmlns:long-namespace="http://ns3.com"
   exclude-result-prefixes="ns1 ns2 long-namespace"
>

<xsl:output method="xml" indent="yes"/>

<xsl:template match="*">
  <tag>Namespace:<xsl:choose><xsl:when test="namespace-uri(.)"><xsl:value-of select="namespace-uri(.)"/>
    </xsl:when>
    <xsl:otherwise> Null namespace</xsl:otherwise>
  </xsl:choose>

  <!-- namespaces are unordered, sort is needed for comparision only -->
    <xsl:for-each select="namespace::*">
      <xsl:sort select="name()"/>
      NS name: <xsl:value-of select="name(.)"/>
      NS value : <xsl:value-of select="."/>
    </xsl:for-each>

  </tag>
  <xsl:if test="./*"><xsl:apply-templates/></xsl:if>
</xsl:template>

</xsl:stylesheet>
"""


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

<!DOCTYPE ns1:ns-test [
<!ELEMENT ns1:ns-test (block)+>
<!ATTLIST ns-test  xmlns:ns1 CDATA #FIXED "http://ns1.com"
          
>
<!ELEMENT ns2:block (para)+>
<!ATTLIST block  xmlns:ns2 CDATA #FIXED "http://ns2.com"
>
<!ELEMENT para (#PCDATA)>
<!ATTLIST para id ID #IMPLIED
               another CDATA #IMPLIED>]>

<ns1:ns-test xmlns:ns1= "http://ns1.com">

  <block>
    <para>Para in block 1, main document namespace </para>
  </block>

  <ns2:block xmlns:ns2="http://ns2.com">
    <para>Para in block 2</para>
  </ns2:block>

    <ns3:block xmlns:ns3="http://ns3.com">
      <long:para xmlns:long="A long namespace uri">Para in block
3</long:para>
    </ns3:block>


</ns1:ns-test>"""


expected_1 = """<?xml version="1.0" encoding="UTF-8"?>
<tag>Namespace:http://ns1.com</tag>
<tag>name: ns1:ns-test</tag>
<tag>local-name: ns-test</tag>
<tag>Content:

  </tag>

  <tag>Namespace: Null namespace</tag>
<tag>name: block</tag>
<tag>local-name: block</tag>
<tag>Content:
    </tag>
    <tag>Namespace: Null namespace</tag>
<tag>name: para</tag>
<tag>local-name: para</tag>
<tag>Content: Para in block 1, main document namespace </tag>
  

  <tag>Namespace:http://ns2.com</tag>
<tag>name: ns2:block</tag>
<tag>local-name: block</tag>
<tag>Content:
    </tag>
    <tag>Namespace: Null namespace</tag>
<tag>name: para</tag>
<tag>local-name: para</tag>
<tag>Content: Para in block 2</tag>
  

    <tag>Namespace:http://ns3.com</tag>
<tag>name: ns3:block</tag>
<tag>local-name: block</tag>
<tag>Content:
      </tag>
      <tag>Namespace:A long namespace uri</tag>
<tag>name: long:para</tag>
<tag>local-name: para</tag>
<tag>Content: Para in block
3</tag>
    


"""


expected_2 = """<?xml version="1.0" encoding="UTF-8"?>
<tag>Namespace:http://ns1.com
      NS name: ns1
      NS value : http://ns1.com
      NS name: xml
      NS value : http://www.w3.org/XML/1998/namespace</tag>

  <tag>Namespace: Null namespace
      NS name: ns1
      NS value : http://ns1.com
      NS name: ns2
      NS value : http://ns2.com
      NS name: xml
      NS value : http://www.w3.org/XML/1998/namespace</tag>
    <tag>Namespace: Null namespace
      NS name: ns1
      NS value : http://ns1.com
      NS name: ns2
      NS value : http://ns2.com
      NS name: xml
      NS value : http://www.w3.org/XML/1998/namespace</tag>
  

  <tag>Namespace:http://ns2.com
      NS name: ns1
      NS value : http://ns1.com
      NS name: ns2
      NS value : http://ns2.com
      NS name: xml
      NS value : http://www.w3.org/XML/1998/namespace</tag>
    <tag>Namespace: Null namespace
      NS name: ns1
      NS value : http://ns1.com
      NS name: ns2
      NS value : http://ns2.com
      NS name: xml
      NS value : http://www.w3.org/XML/1998/namespace</tag>
  

    <tag>Namespace:http://ns3.com
      NS name: ns1
      NS value : http://ns1.com
      NS name: ns3
      NS value : http://ns3.com
      NS name: xml
      NS value : http://www.w3.org/XML/1998/namespace</tag>
      <tag>Namespace:A long namespace uri
      NS name: long
      NS value : A long namespace uri
      NS name: ns1
      NS value : http://ns1.com
      NS name: ns3
      NS value : http://ns3.com
      NS name: xml
      NS value : http://www.w3.org/XML/1998/namespace</tag>
    


"""

def Test(tester):
    source = test_harness.FileInfo(string=source_1)
    sheet = test_harness.FileInfo(string=sheet_1)
    test_harness.XsltTest(tester, source, [sheet], expected_1,
                          title='test 1')

    source = test_harness.FileInfo(string=source_1)
    sheet = test_harness.FileInfo(string=sheet_2)
    test_harness.XsltTest(tester, source, [sheet], expected_2,
                          title='test 2')
    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.0037 ]--