cvs: phpdoc-fr /reference/dom/domattr construct.xml isid.xml /reference/dom/functions dom-domattr-construct.xml dom-domattr-isid.xml

From: Date: Mon, 24 Mar 2008 17:55:32 +0000
Subject: cvs: phpdoc-fr /reference/dom/domattr construct.xml isid.xml /reference/dom/functions dom-domattr-construct.xml dom-domattr-isid.xml
Groups: php.doc.fr 
Request: Send a blank email to doc-fr+get-5619@lists.php.net to get a copy of this message
yannick Mon Mar 24 17:55:32 2008 UTC Added files: /phpdoc-fr/reference/dom/domattr construct.xml isid.xml Removed files: /phpdoc-fr/reference/dom/functions dom-domattr-construct.xml dom-domattr-isid.xml Log: sync with EN http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/dom/domattr/construct.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/dom/domattr/construct.xml +++ phpdoc-fr/reference/dom/domattr/construct.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <refentry xml:id='domattr.construct' xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>DOMAttr::__construct</refname> <refpurpose>Crée un nouvel objet <classname>DOMAttr</classname></refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <methodname>DOMAttr::__construct</methodname> <methodparam><type>string</type><parameter>name</parameter></methodparam> <methodparam choice='opt'><type>string</type><parameter>value</parameter></methodparam> </methodsynopsis> <para> Crée un nouvel objet <classname>DOMAttr</classname>. Cet objet est en lecture seule. Il peut être ajouté à un document, mais les noeuds additionnels ne peuvent pas être ajoutés à ce noeud tant que ce noeud est associé à un document. Pour créer un noeud accessible en écriture, utilisez <xref linkend="domdocument.createattribute" />. </para> </refsect1> <refsect1 role="parameters"> &reftitle.parameters; <para> <variablelist> <varlistentry> <term><parameter>name</parameter></term> <listitem> <para> Le nom de l'attribut. </para> </listitem> </varlistentry> <varlistentry> <term><parameter>value</parameter></term> <listitem> <para> La valeur de l'attribut. </para> </listitem> </varlistentry> </variablelist> </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title>Création d'un nouveau DOMAttr</title> <programlisting role="php"> <![CDATA[ <?php $dom = new DOMDocument('1.0', 'iso-8859-1'); $element = $dom->appendChild(new DOMElement('root')); $attr = $element->setAttributeNode(new DOMAttr('attr', 'attrvalue')); echo $dom->saveXML(); /* <?xml version="1.0" encoding="iso-8859-1"?><root attr="attrvalue" /> */ ?> ]]> </programlisting> </example> </para> </refsect1> <refsect1 role="seealso"> &reftitle.seealso; <para> <simplelist> <member><xref linkend="domdocument.createattribute" /></member> </simplelist> </para> </refsect1> </refentry> <!-- 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 --> http://cvs.php.net/viewvc.cgi/phpdoc-fr/reference/dom/domattr/isid.xml?view=markup&rev=1.1 Index: phpdoc-fr/reference/dom/domattr/isid.xml +++ phpdoc-fr/reference/dom/domattr/isid.xml <?xml version="1.0" encoding="iso-8859-1"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: yannick Status: ready --> <!-- Reviewed: yes --> <refentry xml:id='domattr.isid' xmlns="http://docbook.org/ns/docbook"> <refnamediv> <refname>DOMAttr::isId</refname> <refpurpose> Vérifie si l'attribut est un identifiant défini </refpurpose> </refnamediv> <refsect1 role="description"> &reftitle.description; <methodsynopsis> <type>bool</type><methodname>DOMAttr::isId</methodname> <void/> </methodsynopsis> <para> Cette fonction vérifie si l'attribut est un identifiant défini. </para> <para> En accord avec le standard DOM, ceci requiert une DTD qui définit l'attribut ID qui est du type ID. Vous devez valider votre document avec la fonction <xref linkend="domdocument.validate" /> ou la fonction <literal>DOMDocument::validateOnParse</literal> avant d'utiliser cette fonction. </para> </refsect1> <refsect1 role="returnvalues"> &reftitle.returnvalues; <para> &return.success; </para> </refsect1> <refsect1 role="examples"> &reftitle.examples; <para> <example> <title>Exemple avec DOMAttr->isId()</title> <programlisting role="php"> <![CDATA[ <?php $doc = new DomDocument; // Nous devons valider notre document avant de nous référer à l'ID $doc->validateOnParse = true; $doc->Load('book.xml'); // Nous récupérons l'attribut nommé id de l'élément chapter $attr = $doc->getElementsByTagName('chapter')->item(0)->getAttributeNode('id'); var_dump($attr->isId()); // bool(true) ?> ]]> </programlisting> </example> </para> </refsect1> </refentry> <!-- 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 -->

« previous php.doc.fr (#5619) next »