integrated user notes, examples, and wrapped text

git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@183432 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
Mehdi Achour 2005-04-02 22:46:41 +00:00
parent 9a51163ba1
commit 6358a74168
4 changed files with 60 additions and 10 deletions

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry id="function.dom-domdocument-createentityreference">
<refnamediv>
<refname>DOMDocument->createEntityReference()</refname>
@ -27,7 +27,9 @@
<term><parameter>name</parameter></term>
<listitem>
<para>
The content of the entity reference.
The content of the entity reference, e.g. the entity reference minus
the leading <literal>&amp;</literal> and the trailing
<literal>;</literal> characters.
</para>
</listitem>
</varlistentry>
@ -37,7 +39,8 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
The new <classname>DOMEntityReference</classname> or &false; if an error occured.
The new <classname>DOMEntityReference</classname> or &false; if an error
occured.
</para>
</refsect1>
<refsect1 role="exceptions">

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<refentry id='function.dom-domimplementation-createdocumenttype'>
<refnamediv>
<refname>DOMImplementation->createDocumentType()</refname>
@ -62,6 +62,51 @@
<literal>ownerDocument</literal> set to &null;.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Creating a document with an attached DTD</title>
<programlisting role="php">
<![CDATA[
<?php
// Creates an instance of the DOMImplementation class
$imp = new DOMImplementation;
// Creates a DOMDocumentType instance
$dtd = $imp->createDocumentType('graph', '', 'graph.dtd');
// Creates a DOMDocument instance
$dom = $imp->createDocument("", "", $dtd);
// Set other properties
$dom->encoding = 'UTF-8';
$dom->standalone = false;
// Create an empty element
$element = $dom->createElement('graph');
// Append the element
$dom->appendChild($element);
// Retrieve and print the document
echo $dom->saveXML();
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE graph SYSTEM "graph.dtd">
<graph/>
]]>
</screen>
</example>
</para>
</refsect1>
<refsect1 role="exceptions">
&reftitle.exceptions;
<para>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.8 $ -->
<!-- $Revision: 1.9 $ -->
<refentry id='function.dom-domnode-removechild'>
<refnamediv>
<refname>DOMNode->removeChild()</refname>
@ -90,7 +90,8 @@ echo $doc->saveXML();
<screen role="xml">
<![CDATA[
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<book id="listing">
<title>My lists</title>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.9 $ -->
<!-- $Revision: 1.10 $ -->
<refentry id='function.dom-domnode-replacechild'>
<refnamediv>
<refname>DOMNode->replaceChild()</refname>
@ -21,8 +21,7 @@
This function replaces the child <parameter>oldnode</parameter>
with the passed new node. If the new node is already a child it
will not be added a second time. If the replacement succeeds the
old node
is returned.
old node is returned.
</para>
</refsect1>
<refsect1 role="parameters">
@ -33,7 +32,9 @@
<term><parameter>newnode</parameter></term>
<listitem>
<para>
The new node.
The new node. It must be a member of the target document, i.e.
created by one of the DOMDocument->createXXX() methods or imported in
the document by <xref linkend='function.dom-domdocument-importnode' />.
</para>
</listitem>
</varlistentry>