!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/share/4Suite/Demos/GuestBook/   drwxr-xr-x
Free 5.25 GB of 27.03 GB (19.42%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Feedback    Self remove    Logout    


Viewing file:     tech.doc (6.91 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?xml version="1.0" encoding="UTF-8"?>
<article class="whitepaper">
  <title>Guest Book Technical Description</title>
  <articleinfo>
    <title>Guest Book Technical Description</title>
    <authorgroup>
      <author>
        <firstname>Mike</firstname>
        <surname>Olson</surname>
        <affiliation>
          <orgname><ulink url="http://fourthought.com/">Fourthought, Inc.</ulink></orgname>
          <address><email>mike.olson@fourthought.com</email></address>
        </affiliation>
      </author>
      <othercredit>
        <firstname>Mike</firstname>
        <surname>Brown</surname>
        <affiliation>
          <orgname>Fourthought, Inc.</orgname>
        </affiliation>
      </othercredit>
    </authorgroup>
    <legalnotice>
      <para>This document can be freely translated and distributed. It is released under the <ulink url="http://www.linuxdoc.org/manifesto.html" type="off-site">LDP License</ulink>.</para>
    </legalnotice>
    <abstract>
      <para>An explanation of the stylesheets that drive the Guest Book demo of the 4Suite repository server.</para>
    </abstract>
    <revhistory>
      <revision>
        <revnumber>1.0</revnumber>
        <date>2001-12-08</date>
        <authorinitials>MO</authorinitials>
        <revremark>Initial release</revremark>
      </revision>
      <revision>
        <revnumber>1.1</revnumber>
        <date>2004-03-07</date>
        <authorinitials>MB</authorinitials>
        <revremark>Converted to Simplified DocBook; misc cleanup</revremark>
      </revision>
    </revhistory>
    <keywordset>
      <keyword>4Suite</keyword>
      <keyword>Demos</keyword>
      <keyword>RDF</keyword>
      <keyword>DocDefs</keyword>
      <keyword>Extensions</keyword>
    </keywordset>
  </articleinfo>

  <section>
    <title>Guest Book</title>
    <para>The Guest Book demo is a very simple demo that shows how to use docdefs to generate RDF statements about content.  It then shows some of the basic XSLT extensions that can be used to query the RDF model and generate an HTML view based on the metadata present in the model.</para>
    <section>
      <title>Displaying Content</title>
      <para>The main view is generated by <ulink url="front.xslt?xslt=/ftss/data/decorated-xml.xslt">front.xslt</ulink>.  It does some basic setup of the result page: HTML head, body, tables and such.  Then it creates a new variable: <emphasis role="bold">$guest-list</emphasis>.</para>
      <para>The value we assign to the variable is the result of an RDF "complete". The complete is a simple query into the RDF model.  In this query, we are looking for all statements with any subject, a predicate of <emphasis role="bold">rdf:type</emphasis>, and an object of <emphasis role="bold">http://4Suite.org/guest</emphasis>.  In essence, we are looking for all guest resources.  The node-set returned by the extension function <emphasis role="bold">frdf:complete</emphasis> will be zero or more Statement elements which will each have the following structure:</para>
      <programlisting>
  &lt;Statement>
    &lt;Subject>Subject from Statement&lt;/Subject>
    &lt;Predicate>Predicate from Statement&lt;/Predicate>
    &lt;Object>Object from Statement&lt;/Object>
  &lt;/Statement>
</programlisting>
      <para>The list of resources is used as the select in the apply-templates.  At the bottom of the file, there is a template that matches <emphasis role="bold">Subject</emphasis> elements.  This template, using the <emphasis role="bold">frdf:complete</emphasis> extension function gathers the needed information about each guest, and fills in the rows of the table.</para>
    </section>

    <section>
      <title>Adding the content</title>
      <para>When you press the submit button, a new document is created in the repository (more on how that is done in a bit).  When the new document is created, it is added to the <ulink url="/GuestBook/data/?xslt=/ftss/data/container.xslt">data</ulink> directory.  If you have guests in the system, then you will see documents in that directory.  Viewing one of those documents shows a very simple XML format that represents a guest.</para>
      <para>When a guest document is added, the <ulink url="GuestBook.docdef?xslt=/ftss/data/decorated-xml.xslt">GuestBook Document Definition</ulink>.  The document definition defines a mapping between content, in the XML document, and the meta data associated with this document in the model.  this document definition adds four statements for each guest document added.  The statements will be updated if the guest document is modified, and will be deleted when the guest document is deleted.</para>
      <para>In this XPath Document Definition (XSLT based document definitions are also supported), we define a set of <emphasis role="bold">RdfMapping</emphasis>s.  Each mapping defines a Subject, Predicate, and Object XPath expression.  Each of these (in each of the mappings) is evaluated against the source to result in a set of statements.  The first mapping defined in the GuestBook Document Definition is simple: the subject is evaluated to the value of the <emphasis role="bold">uri</emphasis> variable.  This is set by the system and resolves to the path of the source document in the repository.  The predicate is a string constant for <emphasis role="bold">rdf:type</emphasis>, and the object is a string constant for <emphasis role="bold">http://4suite.org/guest</emphasis>.</para>
      <para>So, using the document definitions, every time a new guest is added, four statements about it are added to the model.</para>
    </section>

    <section>
      <title>newGuest.xslt</title>
      <para>When register is pressed to register the new guest the action is <emphasis role="bold">/GuestBook/</emphasis>.  I know what you are thinking, "how can I submit to a container?".  Easy, the object that you are submitting to in this case is irrelevant.  What does all of the work is the stylesheet <ulink url="newGuest.xslt?xslt=/ftss/data/decorated-xml.xslt">newGuest.xslt</ulink>, which has been referenced via a hidden form field.</para>
      <para>Looking at the stylesheet we see that it is very simple.  We use the extension element <emphasis role="bold">fcore:create-document</emphasis>.  This element has a few optional attributes, like base-path and docdef, that we set to define where and how the document is created.  It the uses all of its children to get the content of the new document.  In this case, a simple XML format that represents a guest.</para>
      <para>Just before the create-document extension element, we use <emphasis role="bold">fhttp:response-uri</emphasis>.  This extension element tells the server that the response to the HTTP request that resulted in this stylesheet being processed should not be an HTTP 200. Instead, the server should send a 302 and use the value of the <emphasis role="bold">uri</emphasis> attribute as the redirect location.  In this case, we will redirect back to the front page after we have added the document.</para>
    </section>

  </section>

</article>

:: 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.0033 ]--