Home  |  Linux  | Mysql  | PHP  | XML
From:Eduard Capell Brufau Date:Mon Aug 29 11:51:27 2005
Subject:cvs: phpdoc-ca /features xforms.xml
eduardcapell		Mon Aug 29 13:51:27 2005 EDT

  Added files:                 
    /phpdoc-ca/features	xforms.xml 
  Log:
  
  

http://cvs.php.net/co.php/phpdoc-ca/features/xforms.xml?r=1.1&p=1
Index: phpdoc-ca/features/xforms.xml
+++ phpdoc-ca/features/xforms.xml
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.1 $ -->
<!-- EN-Revision: 1.3 Maintainer: eduardcapell Status: ready -->
<chapter id="features.xforms">
 <title>Tractament dels XForms</title>
 <para>
  formularis web tradicionals, i permet d'utilitzar formularis en una varietat
  de plataformes i navegadors, i fins i tot en mitjans poc tradicionals, com ara
  en documents PDF.
 </para>
 <para>
  s'envia al client. 
 </para>
 <example>
  <title>Un formulari de cerca senzil amb XForm</title>
  <programlisting role="html">
<![CDATA[
<h:html xmlns:h="http://www.w3.org/1999/xhtml"
        xmlns="http://www.w3.org/2002/xforms">
<h:head>
 <h:title>Cerca</h:title>
 <model>
  <submission action="http://exemple.com/cerca"
              method="post" id="s"/>
 </model>
</h:head>
<h:body>
 <h:p>
  <input ref="q"><label>Trobar</label></input>
  <submit submission="s"><label>Anar-hi</label></submit>
 </h:p>
</h:body>
</h:html>
]]>
  </programlisting>
 </example>
 <para>
  El formulari superior mostra un quadre d'entrada de text (que es diu 
  l'<literal>action</literal>.
 </para>
 <para>
  En un formulari HTML normal, les dades s'enviarien com a  
 </para>
 <para>
  Si trieu de treballar amb XForms probablement voleu dades en format XML. En
  aquest cas, busqueu en <varname>$HTTP_RAW_POST_DATA</varname>, i hi trobareu
  el document XML generat pel navegador, que podeu passar-li al vostre motor
  XSLT favorit o a l'analitzador de documents que preferiu.
 </para>
 <para>
  Si no us interessa el format i voleu que les dades es carreguin en la variable
  les dades com a <literal>application/x-www-form-urlencoded</literal>, canviant
  l'atribut <parameter>method</parameter> a 
  <emphasis>urlencoded-post</emphasis>.
 </para>
 <example>
  <programlisting role="html">
<![CDATA[
<h:html xmlns:h="http://www.w3.org/1999/xhtml"
        xmlns="http://www.w3.org/2002/xforms">
<h:head>
 <h:title>Cerca</h:title>
 <model>
  <submission action="http://exemple.com/cerca"
              method="urlencoded-post" id="s"/>
 </model>
</h:head>
<h:body>
 <h:p>
  <input ref="q"><label>Trobar</label></input>
  <submit submission="s"><label>Anar-hi</label></submit>
 </h:p>
</h:body>
</h:html>
]]>
  </programlisting>
 </example>
 <note>
  <simpara>
   funcionen.
  </simpara>
 </note>
</chapter>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->
Navigate in group php.doc.ca at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants