-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
initial translation in reference/dom
- Loading branch information
1 parent
0e22a4e
commit ffc6d02
Showing
13 changed files
with
1,071 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: a8b6f4dd3a23875b066d4e47ea4a4977a63e0655 Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="dom-htmldocument.createempty" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>Dom\HTMLDocument::createEmpty</refname> | ||
<refpurpose>Cria um documento <acronym>HTML</acronym> vazio</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis role="Dom\\HTMLDocument"> | ||
<modifier>public</modifier> <modifier>static</modifier> <type>Dom\HTMLDocument</type><methodname>Dom\HTMLDocument::createEmpty</methodname> | ||
<methodparam choice="opt"><type>string</type><parameter>encoding</parameter><initializer>"UTF-8"</initializer></methodparam> | ||
</methodsynopsis> | ||
<simpara> | ||
Cria um documento <acronym>HTML</acronym> vazio sem nenhum elemento. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>encoding</parameter></term> | ||
<listitem> | ||
<simpara> | ||
A codificação de caracteres do documento, usada para serialização ao | ||
chamar os métodos de salvamento. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
Um documento <acronym>HTML</acronym> vazio. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="examples"> | ||
&reftitle.examples; | ||
<example xml:id="dom-htmldocument.createempty.example.basic"> | ||
<title>Exemplo de <methodname>Dom\HTMLDocument::createEmpty</methodname></title> | ||
<simpara> | ||
Cria um documento vazio e o serializa. | ||
</simpara> | ||
<programlisting role="php"> | ||
<![CDATA[ | ||
<?php | ||
$dom = Dom\HTMLDocument::createEmpty(); | ||
var_dump($dom->saveHtml()); | ||
?> | ||
]]> | ||
</programlisting> | ||
&example.outputs; | ||
<screen> | ||
<![CDATA[ | ||
string(0) "" | ||
]]> | ||
</screen> | ||
</example> | ||
</refsect1> | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><methodname>Dom\HTMLDocument::createFromString</methodname></member> | ||
<member><methodname>Dom\HTMLDocument::createFromFile</methodname></member> | ||
</simplelist> | ||
</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:"~/.phpdoc/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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: a8b6f4dd3a23875b066d4e47ea4a4977a63e0655 Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="dom-htmldocument.createfromfile" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>Dom\HTMLDocument::createFromFile</refname> | ||
<refpurpose>Analisa um documento <acronym>HTML</acronym> a partir de um arquivo</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis role="Dom\\HTMLDocument"> | ||
<modifier>public</modifier> <modifier>static</modifier> <type>Dom\HTMLDocument</type><methodname>Dom\HTMLDocument::createFromFile</methodname> | ||
<methodparam><type>string</type><parameter>path</parameter></methodparam> | ||
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam> | ||
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>overrideEncoding</parameter><initializer>&null;</initializer></methodparam> | ||
</methodsynopsis> | ||
<simpara> | ||
Analisa um documento <acronym>HTML</acronym> a partir de um arquivo, | ||
de acordo com o padrão vigente. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>path</parameter></term> | ||
<listitem> | ||
<simpara> | ||
O caminho para o arquivo a ser serializado. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>options</parameter></term> | ||
<listitem> | ||
&dom.parameter.compliant.options; | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>overrideEncoding</parameter></term> | ||
<listitem> | ||
&dom.parameter.compliant.encoding; | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
O documento analisado como uma instância de <classname>Dom\HTMLDocument</classname>. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="errors"> | ||
&reftitle.errors; | ||
<itemizedlist> | ||
<listitem> | ||
<simpara> | ||
Lança uma exceção <exceptionname>ValueError</exceptionname> se | ||
<parameter>path</parameter> contiver bytes nulos ou contiver | ||
<literal>"%00"</literal>. | ||
</simpara> | ||
</listitem> | ||
&dom.errors.compliant.common; | ||
<listitem> | ||
<simpara> | ||
Lança uma <exceptionname>Exception</exceptionname> se | ||
o arquivo não puder ser aberto. | ||
</simpara> | ||
</listitem> | ||
</itemizedlist> | ||
</refsect1> | ||
|
||
&dom.parser.compliant.note.whitespace; | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><methodname>Dom\HTMLDocument::createEmpty</methodname></member> | ||
<member><methodname>Dom\HTMLDocument::createFromString</methodname></member> | ||
</simplelist> | ||
</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:"~/.phpdoc/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 | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!-- EN-Revision: a8b6f4dd3a23875b066d4e47ea4a4977a63e0655 Maintainer: leonardolara Status: ready --> | ||
<refentry xml:id="dom-htmldocument.createfromstring" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> | ||
<refnamediv> | ||
<refname>Dom\HTMLDocument::createFromString</refname> | ||
<refpurpose>Analisa um documento <acronym>HTML</acronym> a partir de uma string</refpurpose> | ||
</refnamediv> | ||
|
||
<refsect1 role="description"> | ||
&reftitle.description; | ||
<methodsynopsis role="Dom\\HTMLDocument"> | ||
<modifier>public</modifier> <modifier>static</modifier> <type>Dom\HTMLDocument</type><methodname>Dom\HTMLDocument::createFromString</methodname> | ||
<methodparam><type>string</type><parameter>source</parameter></methodparam> | ||
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam> | ||
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>overrideEncoding</parameter><initializer>&null;</initializer></methodparam> | ||
</methodsynopsis> | ||
<simpara> | ||
Analisa um documento <acronym>HTML</acronym> a partir de uma string, | ||
de acordo com o padrão vigente. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="parameters"> | ||
&reftitle.parameters; | ||
<variablelist> | ||
<varlistentry> | ||
<term><parameter>source</parameter></term> | ||
<listitem> | ||
<simpara> | ||
A string contendo o <acronym>HTML</acronym> a ser analisado. | ||
</simpara> | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>options</parameter></term> | ||
<listitem> | ||
&dom.parameter.compliant.options; | ||
</listitem> | ||
</varlistentry> | ||
<varlistentry> | ||
<term><parameter>overrideEncoding</parameter></term> | ||
<listitem> | ||
&dom.parameter.compliant.encoding; | ||
</listitem> | ||
</varlistentry> | ||
</variablelist> | ||
</refsect1> | ||
|
||
<refsect1 role="returnvalues"> | ||
&reftitle.returnvalues; | ||
<simpara> | ||
O documento analisado como uma instância de <classname>Dom\HTMLDocument</classname>. | ||
</simpara> | ||
</refsect1> | ||
|
||
<refsect1 role="errors"> | ||
&reftitle.errors; | ||
<itemizedlist> | ||
&dom.errors.compliant.common; | ||
</itemizedlist> | ||
</refsect1> | ||
|
||
<refsect1 role="examples"> | ||
&reftitle.examples; | ||
<example xml:id="dom-htmldocument.createfromstring.example.basic"> | ||
<title>Exemplo de <methodname>Dom\HTMLDocument::createFromString</methodname></title> | ||
<simpara> | ||
Analisa um documento. | ||
</simpara> | ||
<programlisting role="php"> | ||
<![CDATA[ | ||
<?php | ||
$dom = Dom\HTMLDocument::createFromString(<<<'HTML' | ||
<!DOCTYPE html> | ||
<html> | ||
<body> | ||
<p>Hello, world!</p> | ||
</body> | ||
</html> | ||
HTML); | ||
echo $dom->saveHtml(); | ||
?> | ||
]]> | ||
</programlisting> | ||
&example.outputs; | ||
<screen> | ||
<![CDATA[ | ||
<!DOCTYPE html><html><head></head><body> | ||
<p>Hello, world!</p> | ||
</body></html> | ||
]]> | ||
</screen> | ||
</example> | ||
</refsect1> | ||
|
||
&dom.parser.compliant.note.whitespace; | ||
|
||
<refsect1 role="seealso"> | ||
&reftitle.seealso; | ||
<simplelist> | ||
<member><methodname>Dom\HTMLDocument::createEmpty</methodname></member> | ||
<member><methodname>Dom\HTMLDocument::createFromFile</methodname></member> | ||
</simplelist> | ||
</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:"~/.phpdoc/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 | ||
--> |
Oops, something went wrong.