cvs: phpdoc(REF_STRUCT_DEV) / manual.xml.in /en/reference/domxml book.xml constants.xml reference.xml setup.xml /en/reference/libxml book.xml
constants.xml reference.xml setup.xml /en/reference/qtdom book.xml constants.xml reference.xml setup.xml /en/reference/sca book.xml constants.xml
examples.xml reference.xml setup.xml /en/reference/sdo_das_xml book.xml constants.xml examples.xml reference.xml setup.xml /en/reference/simplexml
book.xml constants.xml examples.xml reference.xml setup.xml /en/reference/wddx book.xml constants.xml examples.xml reference.xml setup.xml
/en/reference/xml book.xml case-folding.xml constants.xml encoding.xml error-codes.xml eventhandlers.xml examples.xml reference.xml setup.xml
/en/reference/xmlreader book.xml constants.xml part.xml reference.xml setup.xml xmlreader.xml /en/reference/xmlwriter book.xml constants.xml
reference.xml setup.xml /en/reference/xsl book.xml constants.xml examples.xml reference.xml setup.xml /en/refer! ence/xslt book.xml constants.xml
reference.xml setup.xml

From: Date: Sat, 08 Dec 2007 22:38:56 +0000
Subject: cvs: phpdoc(REF_STRUCT_DEV) / manual.xml.in /en/reference/domxml book.xml constants.xml reference.xml setup.xml /en/reference/libxml book.xml
constants.xml reference.xml setup.xml /en/reference/qtdom book.xml constants.xml reference.xml setup.xml /en/reference/sca book.xml constants.xml
examples.xml reference.xml setup.xml /en/reference/sdo_das_xml book.xml constants.xml examples.xml reference.xml setup.xml /en/reference/simplexml
book.xml constants.xml examples.xml reference.xml setup.xml /en/reference/wddx book.xml constants.xml examples.xml reference.xml setup.xml
/en/reference/xml book.xml case-folding.xml constants.xml encoding.xml error-codes.xml eventhandlers.xml examples.xml reference.xml setup.xml
/en/reference/xmlreader book.xml constants.xml part.xml reference.xml setup.xml xmlreader.xml /en/reference/xmlwriter book.xml constants.xml
reference.xml setup.xml /en/reference/xsl book.xml constants.xml examples.xml reference.xml setup.xml /en/refer! ence/xslt book.xml constants.xml
reference.xml setup.xml
Groups: php.doc.cvs 
Request: Send a blank email to doc-cvs+get-566@lists.php.net to get a copy of this message
bjori Sat Dec 8 22:38:56 2007 UTC Added files: (Branch: REF_STRUCT_DEV) /phpdoc/en/reference/domxml book.xml setup.xml /phpdoc/en/reference/libxml book.xml setup.xml /phpdoc/en/reference/qtdom book.xml constants.xml setup.xml /phpdoc/en/reference/sca book.xml examples.xml setup.xml /phpdoc/en/reference/sdo_das_xml book.xml constants.xml examples.xml setup.xml /phpdoc/en/reference/simplexml book.xml constants.xml examples.xml setup.xml /phpdoc/en/reference/wddx book.xml constants.xml examples.xml setup.xml /phpdoc/en/reference/xml book.xml case-folding.xml encoding.xml error-codes.xml eventhandlers.xml examples.xml setup.xml /phpdoc/en/reference/xmlreader book.xml setup.xml xmlreader.xml /phpdoc/en/reference/xmlwriter book.xml constants.xml setup.xml /phpdoc/en/reference/xsl book.xml examples.xml setup.xml /phpdoc/en/reference/xslt book.xml setup.xml Removed files: /phpdoc/en/reference/xmlreader part.xml reference.xml Modified files: /phpdoc manual.xml.in /phpdoc/en/reference/domxml constants.xml reference.xml /phpdoc/en/reference/libxml constants.xml reference.xml /phpdoc/en/reference/qtdom reference.xml /phpdoc/en/reference/sca constants.xml reference.xml /phpdoc/en/reference/sdo_das_xml reference.xml /phpdoc/en/reference/simplexml reference.xml /phpdoc/en/reference/wddx reference.xml /phpdoc/en/reference/xml constants.xml reference.xml /phpdoc/en/reference/xmlreader constants.xml /phpdoc/en/reference/xmlwriter reference.xml /phpdoc/en/reference/xsl constants.xml reference.xml /phpdoc/en/reference/xslt constants.xml reference.xml Log: Upgrade refs.xml to the new-ref-struct-markup

http://cvs.php.net/viewvc.cgi/phpdoc/manual.xml.in?r1=1.224.2.34&r2=1.224.2.35&diff_format=u Index: phpdoc/manual.xml.in diff -u phpdoc/manual.xml.in:1.224.2.34 phpdoc/manual.xml.in:1.224.2.35 --- phpdoc/manual.xml.in:1.224.2.34 Sat Dec 8 18:20:49 2007 +++ phpdoc/manual.xml.in Sat Dec 8 22:38:54 2007 @@ -2,7 +2,7 @@ <!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN" "@srcdir@/docbook/docbook-xml/docbook.dtd" [ -<!-- $Revision: 1.224.2.34 $ --> <!-- Last updated to comply to manual.xml.in 1.189 --> +<!-- $Revision: 1.224.2.35 $ --> <!-- Last updated to comply to manual.xml.in 1.189 --> <!-- We use xhtml entities all over the place --> <!ENTITY % xhtml-lat1 SYSTEM "@srcdir@/entities/ISO/xhtml1-lat1.ent"> <!ENTITY % xhtml-symbol SYSTEM "@srcdir@/entities/ISO/xhtml1-symbol.ent"> @@ -223,22 +223,22 @@ </set> </set> - <book xml:id="refs.xml"> + <set xml:id="refs.xml"> <title>XML Manipulation</title> - &reference.dom.reference; - &reference.domxml.reference; - &reference.libxml.reference; - &reference.qtdom.reference; - &reference.sca.reference; - &reference.sdo-das-xml.reference; - &reference.simplexml.reference; - &reference.wddx.reference; - &reference.xml.reference; - &reference.xmlreader.part; - &reference.xmlwriter.reference; - &reference.xsl.reference; - &reference.xslt.reference; - </book> + &reference.dom.book; + &reference.domxml.book; + &reference.libxml.book; + &reference.qtdom.book; + &reference.sca.book; + &reference.sdo-das-xml.book; + &reference.simplexml.book; + &reference.wddx.book; + &reference.xml.book; + &reference.xmlreader.book; + &reference.xmlwriter.book; + &reference.xsl.book; + &reference.xslt.book; + </set> <set xml:id="refs.webservice"> <title>Web Services</title> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/domxml/constants.xml?r1=1.5&r2=1.5.2.1&diff_format=u Index: phpdoc/en/reference/domxml/constants.xml diff -u phpdoc/en/reference/domxml/constants.xml:1.5 phpdoc/en/reference/domxml/constants.xml:1.5.2.1 --- phpdoc/en/reference/domxml/constants.xml:1.5 Wed Jun 20 22:24:22 2007 +++ phpdoc/en/reference/domxml/constants.xml Sat Dec 8 22:38:54 2007 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<section xml:id="domxml.constants" xmlns="http://docbook.org/ns/docbook"> +<!-- $Revision: 1.5.2.1 $ --> +<appendix xml:id="domxml.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <table> @@ -334,7 +334,7 @@ </tbody> </tgroup> </table> - </section> + </appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/domxml/reference.xml?r1=1.23.2.1&r2=1.23.2.2&diff_format=u Index: phpdoc/en/reference/domxml/reference.xml diff -u phpdoc/en/reference/domxml/reference.xml:1.23.2.1 phpdoc/en/reference/domxml/reference.xml:1.23.2.2 --- phpdoc/en/reference/domxml/reference.xml:1.23.2.1 Wed Oct 3 11:41:09 2007 +++ phpdoc/en/reference/domxml/reference.xml Sat Dec 8 22:38:54 2007 @@ -1,67 +1,10 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.23.2.1 $ --> -<!-- Purpose: xml --> -<!-- Membership: pecl, external --> +<!-- $Revision: 1.23.2.2 $ --> <reference xml:id="ref.domxml" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>DOM XML Functions</title> - <titleabbrev>DOM XML</titleabbrev> + <title>DOM XML &Functions;</title> <partintro> - <section xml:id="domxml.intro"> - &reftitle.intro; - <para> - The DOM XML extension has been overhauled in PHP 4.3.0 to better comply with - the DOM standard. The extension still contains - many old functions, but they should no longer be used. In particular, functions - that are not object-oriented should be avoided. - </para> - <para> - The extension allows you to operate on an XML document with the DOM API. - It also provides a function <function>domxml_xmltree</function> to turn the - complete XML document into a tree of PHP objects. Currently, this - tree should be considered read-only - you can modify it, but this - would not make any sense since <function>DomDocument_dump_mem</function> - cannot be - applied to it. Therefore, if you want to read an XML file and write - a modified version, use <function>DomDocument_create_element</function>, - <function>DomDocument_create_text_node</function>, - <function>set_attribute</function>, etc. and finally the - <function>DomDocument_dump_mem</function> function. - </para> - <note> - <para> - &pecl.moved-ver;5.0.0. - </para> - </note> - <note> - <simpara> - This extension is no longer marked experimental. It will, however, never - be released with PHP 5, and will only be distributed with PHP 4. - If you need DOM XML support with PHP 5 you can use the - <link linkend="ref.dom">DOM</link> extension. This - <literal>domxml</literal> extension is not compatible with the - <link linkend="ref.dom">DOM</link> extension. - </simpara> - </note> - </section> - - <section xml:id="domxml.requirements"> - &reftitle.required; - <para> - This extension makes use of the - <link xlink:href="&url.libxml;">GNOME XML library</link>. Download - and install this library. You will need at least libxml-2.4.14. - To use DOM XSLT features you can use the - <link xlink:href="&url.libxslt;">libxslt library</link> and EXSLT - enhancements from <link xlink:href="&url.exslt;">&url.exslt;</link>. - Download and install these libraries if you plan to use (enhanced) XSLT - features. You will need at least libxslt-1.0.18. - </para> - </section> - - &reference.domxml.configure; - <section xml:id="domxml.deprecated"> <title>Deprecated functions</title> <para> @@ -175,8 +118,11 @@ </para> </section> - &reference.domxml.constants; - + <!-- + FIXME: + Maybe someone, someday, wants to upgrade this mess to use the + new OO markup.. + --> <section xml:id="domxml.classes"> <title>Classes</title> <para> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/libxml/constants.xml?r1=1.7&r2=1.7.2.1&diff_format=u Index: phpdoc/en/reference/libxml/constants.xml diff -u phpdoc/en/reference/libxml/constants.xml:1.7 phpdoc/en/reference/libxml/constants.xml:1.7.2.1 --- phpdoc/en/reference/libxml/constants.xml:1.7 Wed Jun 20 22:24:49 2007 +++ phpdoc/en/reference/libxml/constants.xml Sat Dec 8 22:38:55 2007 @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.7 $ --> -<section xml:id="libxml.constants" xmlns="http://docbook.org/ns/docbook"> +<!-- $Revision: 1.7.2.1 $ --> +<appendix xml:id="libxml.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <variablelist> @@ -244,7 +244,7 @@ </listitem> </varlistentry> </variablelist> -</section> +</appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/libxml/reference.xml?r1=1.7.2.1&r2=1.7.2.2&diff_format=u Index: phpdoc/en/reference/libxml/reference.xml diff -u phpdoc/en/reference/libxml/reference.xml:1.7.2.1 phpdoc/en/reference/libxml/reference.xml:1.7.2.2 --- phpdoc/en/reference/libxml/reference.xml:1.7.2.1 Wed Oct 3 11:41:11 2007 +++ phpdoc/en/reference/libxml/reference.xml Sat Dec 8 22:38:55 2007 @@ -1,31 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.7.2.1 $ --> -<!-- Purpose: xml --> -<!-- Membership: bundled, external --> +<!-- $Revision: 1.7.2.2 $ --> <reference xml:id="ref.libxml" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>libxml Functions</title> - <titleabbrev>libxml</titleabbrev> + <title>libxml &Functions;</title> <partintro> - <section xml:id="libxml.intro"> - &reftitle.intro; - <para> - These functions/constants are available since PHP 5.1.0 and if you have - compiled one of the extensions based on libxml, like <link - linkend="ref.dom">DOM</link>, <link - linkend="ref.simplexml">SimpleXML</link> and <link - linkend="ref.xslt">XSLT</link>. - </para> - </section> - <section xml:id="libxml.requirements"> - &reftitle.required; - <para> - This extension requires <link xlink:href="&url.libxml;">libxml</link> &gt;= - 2.6.0. - </para> - </section> + <!-- FIXME: Upgrade this to the new-oo-markup ... --> <section xml:id='libxml.classes'> &reftitle.classes; @@ -66,7 +47,6 @@ </section> </section> - &reference.libxml.constants; </partintro> &reference.libxml.functions.entities; </reference> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/qtdom/reference.xml?r1=1.12.2.1&r2=1.12.2.2&diff_format=u Index: phpdoc/en/reference/qtdom/reference.xml diff -u phpdoc/en/reference/qtdom/reference.xml:1.12.2.1 phpdoc/en/reference/qtdom/reference.xml:1.12.2.2 --- phpdoc/en/reference/qtdom/reference.xml:1.12.2.1 Wed Oct 3 11:41:14 2007 +++ phpdoc/en/reference/qtdom/reference.xml Sat Dec 8 22:38:55 2007 @@ -1,38 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12.2.1 $ --> -<!-- Purpose: xml --> -<!-- Membership: pecl, external --> -<!-- State: experimental --> +<!-- $Revision: 1.12.2.2 $ --> - <reference xml:id="ref.qtdom" xmlns="http://docbook.org/ns/docbook"> - <title>qtdom Functions</title> - <titleabbrev>qtdom</titleabbrev> - - <partintro> - <para> - &warn.experimental; - </para> - &note.no-windows.extension; - <note> - <para> - &pecl.moved-ver;5.0.0. - </para> - </note> - - <section xml:id="qtdom.requirements"> - &reftitle.required; - <para> - You need the Qt-library &gt;=2.2.0 - </para> - </section> - - &reference.qtdom.configure; - - </partintro> +<reference xml:id="ref.qtdom" xmlns="http://docbook.org/ns/docbook"> + <title>qtdom &Functions;</title> &reference.qtdom.functions.entities; - </reference> +</reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sca/constants.xml?r1=1.2&r2=1.2.2.1&diff_format=u Index: phpdoc/en/reference/sca/constants.xml diff -u phpdoc/en/reference/sca/constants.xml:1.2 phpdoc/en/reference/sca/constants.xml:1.2.2.1 --- phpdoc/en/reference/sca/constants.xml:1.2 Wed Jun 20 22:25:18 2007 +++ phpdoc/en/reference/sca/constants.xml Sat Dec 8 22:38:55 2007 @@ -1,11 +1,10 @@ -<?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.2 $ --> -<!-- Generated by xml_proto.php v2.1. Found in /scripts directory of phpdoc. --> -<section xml:id="sca.constants" xmlns="http://docbook.org/ns/docbook"> +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 1.2.2.1 $ --> + +<appendix xml:id="sca.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; - &extension.constants; - <para>None</para> -</section> + &no.constants; +</appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sca/reference.xml?r1=1.6.2.3&r2=1.6.2.4&diff_format=u Index: phpdoc/en/reference/sca/reference.xml diff -u phpdoc/en/reference/sca/reference.xml:1.6.2.3 phpdoc/en/reference/sca/reference.xml:1.6.2.4 --- phpdoc/en/reference/sca/reference.xml:1.6.2.3 Fri Nov 2 12:13:27 2007 +++ phpdoc/en/reference/sca/reference.xml Sat Dec 8 22:38:55 2007 @@ -1,1360 +1,13 @@ <?xml version='1.0' encoding='iso-8859-1'?> -<!-- $Revision: 1.6.2.3 $ --> -<!-- Purpose: xml --> -<!-- Membership: pecl --> -<!-- State: experimental --> +<!-- $Revision: 1.6.2.4 $ --> -<reference xml:id="ref.SCA" xmlns="http://docbook.org/ns/docbook"> - <title>SCA Functions</title> - <titleabbrev>SCA</titleabbrev> +<reference xml:id="ref.sca" xmlns="http://docbook.org/ns/docbook"> + <title>SCA &Functions;</title> <partintro> - <section xml:id="SCA.intro"> - &reftitle.intro; - &warn.experimental; - <para> - SCA for PHP makes it possible for a PHP programmer to write - reusable components, which can be called in a variety of ways, with an - identical interface and with a minimum of fuss. At present - components can call each other either locally or via Web services, - but in the future it is expected that other ways will be possible. It - provides the programmer with a way of doing this which will look as - natural as possible in PHP. - </para> - - <para> - SCA components use phpDocumentor-style (see - http://www.phpdoc.org/) annotations to declare dependencies on - other SCA components or Web services. The SCA for PHP runtime - resolves these dependencies at runtime on behalf of the components, - and thus allows the PHP programmer to focus on the business logic - rather than on locating and obtaining references to dependencies. - </para> - - <para> - The SCA for PHP programming model can be extended to support a - number of service types, such as REST and Atompub. However, Web - services (more accurately, WSDL defined, SOAP/HTTP services), are - the only type currently specified. - </para> - - <para> - Components also use annotations to define the interface which - they expose as a service. The SCA for PHP runtime will automatically - generate WSDL from these annotations, so that an SCA component is - easily exposed as a web service. These annotations are a natural - extension to those provided by phpDocumentor. Deploying a Web - service can be as simple as placing a PHP component under the document - root of a web server. - </para> - - <para> - Components also use annotations to specify data structures - (expressed using XML schema complex types) which are then handled - using Service Data Objects (SDOs). - </para> - - <para> - A PHP script which is not an SCA component and which contains no - annotations can use the services of an SCA component. A PHP script or - component can make calls to a web service that is not an SCA component, - but using the same system of calls or annotations to obtain a - reference. - </para> - - <para> - First we show a single SCA component, ConvertedStockQuote - which illustrates many of the features of SCA for PHP. It has one - method, - <function>getQuote</function>, which given a stock "ticker" - obtains a price quote for that stock, converted to a given currency. - We shall be using this example as a basis for explaining the SCA for PHP - throughout the rest of this document. - </para> - - <para> - <example> - <title> A sample SCA component </title> - <programlisting role="php"> -<![CDATA[ -<?php - -include "SCA/SCA.php"; - -/** - * Calculate a stock price for a given ticker symbol in a given currency. - * - * @service - * @binding.soap - */ -class ConvertedStockQuote { - - /** - * The currency exchange rate service to use. - * - * @reference - * @binding.php ../ExchangeRate/ExchangeRate.php - */ - public $exchange_rate; - - /** - * The stock quote service to use. - * - * @reference - * @binding.soap ../StockQuote/StockQuote.wsdl - */ - public $stock_quote; - - /** - * Get a stock quote for a given ticker symbol in a given currency. - * - * @param string $ticker The ticker symbol. - * @param string $currency What currency to convert the value to. - * @return float The stock value is the target currency. - */ - function getQuote($ticker, $currency) - { - $quote = $this->stock_quote->getQuote($ticker); - $rate = $this->exchange_rate->getRate($currency); - return $rate * $quote; - } -} -?> -]]> - </programlisting> - </example> - </para> - - <para> - In this example, we see that an SCA component is implemented by a - script containing a PHP class and includes - <filename>SCA.php</filename>. The class contains a mixture of - business logic and references to other components or services. In - the illustrated - <function>getQuote</function> method there is only business - logic, but it relies on the instance variables - <varname>$stock_quote</varname> and - <varname>$exchange_rate</varname> having been initialized. - These refer to two other components and will be initialized by the SCA - runtime with proxies for these two services, whenever this - component executes. The annotations for these two services show one - to be a local component, which will be called within the same PHP - runtime, and one to be a remote component which will be called via a - SOAP request. This component also exposes the - <function>getQuote</function> method both locally and as a web - service, so it in turn can be called either locally or remotely. - </para> - - </section> - - <section xml:id="SCA.requirements"> - &reftitle.required; - <para> - If you want to use SCA to consume or produce Web services then you - need PHP 5.2.0 or later, built with the soap extension enabled. If you - just want to use local components, and do not wish to use the Web - service bindings, then this version of SCA for PHP will also run with - PHP 5.1.6. - </para> - </section> - - <section xml:id="SCA.installation"> - &reftitle.install; - <para> - SCA is packaged along with SDO in one combined package on PECL. - See http://www.php.net/sdo#sdo.installation for installing the - SCA_SDO package from PECL. The SCA code must be on the include path of - your PHP installation, for example if it is installed as - /usr/local/lib/php/SCA, the include_path directive must include - /usr/local/lib/php - </para> - </section> - - <section xml:id='SCA.examples'> - &reftitle.examples; - <para> - The examples in the subsequent sections illustrate the - following aspects of PHP for SCA: - </para> - - <itemizedlist> - <listitem> - <para> - How PHP annotations are used to define PHP classes as SCA - components, and how annotations are used to define the - services. - </para> - </listitem> - <listitem> - <para> - How an SCA component can be exposed as a Web service - </para> - </listitem> - <listitem> - <para> - How an SCA component can consume a Web service, whether - provided by another SCA component or by some other service which - knows nothing of SCA - </para> - </listitem> - <listitem> - <para> - How an SCA component can call another SCA component locally - (within the same process and on the same call stack) - </para> - </listitem> - <listitem> - <para> - How a client script which is not an SCA component can use the - getService call to obtain a proxy for an SCA component. - </para> - </listitem> - <listitem> - <para> - How data structures such as Addresses, or Puchase Orders, - are represented as Service Data Objects, and handled. - </para> - </listitem> - <listitem> - <para> - How SCA components are deployed, and in particular how and - when WSDL is generated for a service. - </para> - </listitem> - <listitem> - <para> - How parameters are always passed by value (and not by - reference) between components, even when the calls are local. - This ensures that the semantics of a call do not change depending on - the location of a component. - </para> - </listitem> - <listitem> - <para> - How positional parameters to a service are supported, even - when the underlying WSDL is document literal wrapped, and - naturally supports only named parameters. - </para> - </listitem> - <listitem> - <para> - How business and runtime exceptions are handled. - </para> - </listitem> - - </itemizedlist> - - <section xml:id="SCA.examples.structure"> - <title>The structure of a Service Component</title> - <para> - A service component is implemented by a class. To identify it - as a service component, it contains an @service annotation. The SCA - runtime will use the file name of the script to determine the - component name, by convention. The class and script file must - therefore share the same name. - </para> - - <para> - PHP SCA components always expose a service, and there is no way - for a component to be invoked other than to be called as a result of a - Web service request, or called directly from another component or - from a script. For this reason a valid PHP SCA component will always - contain an @service annotation and at least one public method. - </para> - - <para> - Each SCA Component requires that the SCA.php script is - included. As well as containing the definition of the SCA class, - this script contains executable PHP code that will run whenever the - script is called, and which will be responsible for making the - component behave as needed. - </para> - - <caution> - - <para> - It is very important that if your file contains other - includes, they come before the include for SCA.php. If there are - includes after the include for SCA.php, they will not have been - processed when the SCA runtime runs your class. - </para> - </caution> - - <para> - The example below illustrates this overall structure - </para> - - <para> - <example> - <title> The structure of an SCA for PHP component </title> - - <programlisting role="php"> -<![CDATA[ -<?php - -// any includes - -include "SCA/SCA.php"; - -/** - * @service - */ - -class ConvertedStockQuote { - - // instance variables, business logic, including at least one public method - -} -?> -]]> - </programlisting> - </example> - </para> - </section> - - <section xml:id="SCA.examples.proxies"> - <title> Obtaining a proxy for another Service Component </title> - <para> - One SCA component can call the service provided by another SCA - component. The service a component provides is made up of all of its - public methods. SCA for PHP currently provides two ways for one - component to call another: either locally (i.e. within the same PHP - run-time, and on the same call stack) or remotely if the called - component exposes a Web service binding. - </para> - - <para> - In order for one component to call another, the calling - component needs a proxy for the called component. This proxy is - usually provided as an instance variable in the calling component, - though proxies can also be obtained with the SCA::getService() - call, as we shall see later. When a component is constructed, - proxies are constructed for any instance variable which refer to - another component, and these proxies are "injected" into the - instance variables. Proxies are always used, whether the - component is local or remote, in order to provide identical calling - behavior between remote and local calls (for example, local calls - are made to always pass data by-value). The proxies know how to - locate the required component and to pass the calls made on to them. - </para> - - <para> - Instance variables which are intended to hold proxies for - services are indicated by the two PHPDocumentor-style - annotations, @reference and @binding. Both annotations are - placed in the documentation section for a class instance variable, - as shown by the code below. - </para> - - <para> - The @reference annotation before an instance variable - indicates that that instance variable is to be initialized with a - proxy to a component. - </para> - - <para> - The @binding annotation has two forms @binding.php and - @binding.soap, and indicates that the proxy is either for a local - component or for a Web service respectively. For both @binding.php - and @binding.soap, the annotation gives a target URI. - </para> - - <para> - At the moment, with the annotation-based method of - specifying dependencies, the only way to alter the intended target - of a reference is to alter the annotation within the component. - </para> - - <para> - In our ConvertedStockQuote example, the - <varname>$exchange_rate</varname> instance variable will be - initialized with a proxy to the local ExchangeRate component - whenever an instance of the ConvertedStockQuote is constructed. - </para> - - <para> - <example> - <title> Obtaining a proxy for a local PHP class </title> - - <programlisting role="php"> -<![CDATA[ - <?php - /** - * The currency exchange rate service to use. - * - * @reference - * @binding.php ../ExchangeRate/ExchangeRate.php - */ - public $exchange_rate; -?> -]]> - </programlisting> - </example> - </para> - - <para> - For @binding.php, the URI identifies the location of the - script containing the implementation of the component. The - component will be called locally. The service provided is the set of - public methods of the component. The URI must be a simple pathname, - either absolute or relative. The component will be loaded with the - PHP include directive, after testing to see if it is already loaded - with - <function>class_exists</function>. If the URI is a relative - path, it is resolved relative to the component containing the - annotation. Note that this is different from the normal PHP - behaviour where scripts would be looked for along the PHP - include_path, This is intended to provide some - location-independence for cross-component references. - </para> - - <para> - If this ExchangeRate service were remote and to be called as a - Web service, only the @binding line changes. Instead of giving the - location of a PHP class, it gives the location of the WSDL describing - the web service. In our example component, this is illustrated by - the second reference: - </para> - - <para> - <example> - <title> Obtaining a proxy for a web service </title> - <programlisting role="php"> -<![CDATA[ -<?php -/** - * The stock quote service to use. - * - * @reference - * @binding.soap ../StockQuote/StockQuote.wsdl - */ - public $stock_quote; -?> -]]> - </programlisting> - </example> - </para> - - <para> - The StockQuote component will be called via a Web service - request. In this case the URI for the WSDL can be a simple pathname, or - may contain a PHP wrapper and begin, for example, with - <varname>file://</varname> or - <varname>http://</varname>. In the event that it is a simple - pathname, it can be absolute or relative, and if relative will be - resolved relative to the component containing the annotation. - Note that this is like the behaviour for @binding.php, and - different from the normal PHP behaviour where the file would be - looked for relative to the PHP current working directory, which - would usually be the location of the first script to be called. This - behaviour is intended to give consistency across the different - bindings and to provide some location-independence for - references between components. - </para> - - </section> - - <section xml:id="SCA.examples.calling"> - - <title> Calling another Service Component </title> - - <para> - The ConvertedStockQuote example also calls the proxies for - the two components to which it refers. - </para> - - <para> - <example> - <title> Calling services </title> - <programlisting role="php"> -<![CDATA[ -<?php -$quote = $this->stock_quote->getQuote($ticker); -$rate = $this->exchange_rate->getRate($currency); -?> -]]> - </programlisting> - </example> - </para> - - <para> - The call to the StockQuote service is a call to a local service; - the call to the ExchangeRate service is a call to a remote service. - Note that the way the call is made looks the same regardless of - whether the call is to a local service or a remote one. - </para> - - <para> - The proxies which have been injected ensure that the way calls - to components look and behave are the same way regardless of whether - they are to a local or remote service, so that components are not - sensitive to whether a call is to a local or a remote service. For - example, the proxy for a local service takes copies of the arguments - and passes only those copies, to ensure that calls are made to be - pass-by-value, as they would be for a remote call. Also, the proxy - for a remote service takes the arguments from a positional - parameter list and ensures they are packaged properly in a SOAP - request and converted back to a positional parameter list at the far - end. - </para> - - <para> - In the example above, the - - <varname>$ticker</varname> and - - <varname>$currency</varname> are clearly PHP scalar types. - Components can pass the PHP scalar types string, integer, float and - boolean, but data structures on service calls are always passed as - Service Data Objects (SDOs). A later section describes how a - component can create an SDO to pass on a local or Web service call, or - how a component can create an SDO to return. The PHP SDO project - documentation describes how to work with the SDO APIs (see - <link linkend='ref.sdo'>the SDO pages</link>. - </para> - - </section> - - <section xml:id="SCA.examples.nonSCAscript"> - - <title>Locating and calling services from a script which is not an - SCA Component </title> - - <para> - SCA components obtain proxies for other components or - services as instance variables annotated with @reference, but - this is not possible for a script that is not itself also a component. - A client script which is not a component must use the - <function>SCA::getService</function> static method to obtain a - proxy for a service, whether local or remote. The - <function>getService</function> method takes a URI as the - argument. Typically this is the location of a local PHP script - containing a component, or of a wsdl file, and is used in exactly the - same way as the targets of the @binding annotations described in the - previous section: that is, relative URIs are resolved against the - location of the client script and not against the PHP include_path - or current working directory. - </para> - - <para> - For example, a script that needed to obtain proxies for the - ExchangeRate and StockQuote services but was not a component would - use the - <function>getService</function> method as follows: - </para> - - <para> - <example> - <title> Obtaining a proxy using getService </title> - <programlisting role="php"> -<![CDATA[ -<?php -$exchange_rate = SCA::getService('../ExchangeRate/ExchangeRate.php'); -$stock_quote = SCA::getService('../StockQuote/StockQuote.wsdl'); -?> -]]> - </programlisting> - </example> - </para> - - <para> - Methods on services can then be called on the returned proxy, - just as they can in a component. - </para> - <para> - <example> - <title> Making calls on the proxy </title> - <programlisting role="php"> -<![CDATA[ -<?php -$quote = $stock_quote->getQuote($ticker); -$rate = $exchange_rate->getRate($currency); -?> -]]> - </programlisting> - </example> - </para> - - </section> - - <section> - <title> Exposing a Service Component as a Web service </title> - - <para> - SCA for PHP can generate WSDL from the annotations within a - service component, so that it can be easily deployed and exposed as a - Web service. To provide SCA with the information it needs to - generate the WSDL, it is necessary to add the annotation - @binding.soap under the @service annotation and to specify the - parameters and return values of the methods using the @param and - @return annotations. These annotations will be read when WSDL is - generated, and the order and types of the parameters determine the - contents of the - &lt;schema&gt; section of the WSDL. - </para> - - <para> - SCA for PHP always generates document/literal wrapped WSDL - for components that are exposing a Web service. Note that this does - not stop components from consuming Web services which are not SCA - components and which are documented with WSDL written in a - different style. - </para> - - <para> - The scalar types which can be used in the @param annotation are - the four common PHP scalar types: boolean, integer, float and - string. These are simply mapped to the XML schema types of the same - name in the WSDL. The example below, which is a trivial - implementation of the StockQuote service that the - ConvertedStockQuote component calls, illustrates string and - float types. - </para> - - <para> - <example> - <title> StockQuote Service </title> - <programlisting role="php"> -<![CDATA[ -<?php - -include "SCA/SCA.php"; - -/** - * Scaffold implementation for a remote StockQuote Web service. - * - * @service - * @binding.soap - * - */ -class StockQuote { - - /** - * Get a stock quote for a given ticker symbol. - * - * @param string $ticker The ticker symbol. - * @return float The stock quote. - */ - function getQuote($ticker) { - return 80.9; - } -} -?> -]]> - </programlisting> - </example> - </para> - - <para> - WSDL much like the following (though with a service location - other than 'localhost', probably) would be generated from this - service: - </para> - - <para> - <example> - <title> Generated WSDL </title> - <programlisting role="xml"> -<![CDATA[ -<?xml version="1.0" encoding="UTF-8"?> -<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xsi:type="tDefinitions" - xmlns:tns2="http://StockQuote" xmlns:tns="http://schemas.xmlsoap.org/wsdl/" - xmlns:tns3="http://schemas.xmlsoap.org/wsdl/soap/" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" targetNamespace="http://StockQuote"> - <types> - <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://StockQuote"> - <xs:element name="getQuote"> - <xs:complexType> - <xs:sequence> - <xs:element name="ticker" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getQuoteResponse"> - <xs:complexType> - <xs:sequence> - <xs:element name="getQuoteReturn" type="xs:float"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:schema> - </types> - - <message name="getQuoteRequest"> - <part name="getQuoteRequest" element="tns2:getQuote"/> - </message> - <message name="getQuoteResponse"> - <part name="return" element="tns2:getQuoteResponse"/> - </message> - <portType name="StockQuotePortType"> - <operation name="getQuote"> - <input message="tns2:getQuoteRequest"/> - <output message="tns2:getQuoteResponse"/> - </operation> - </portType> - <binding name="StockQuoteBinding" type="tns2:StockQuotePortType"> - <operation name="getQuote"> - <input> - <tns3:body xsi:type="tBody" use="literal"/> - </input> - <output> - <tns3:body xsi:type="tBody" use="literal"/> - </output> - <tns3:operation xsi:type="tOperation" soapAction=""/> - </operation> - <tns3:binding xsi:type="tBinding" transport="http://schemas.xmlsoap.org/soap/http" style="document"/> - </binding> - <service name="StockQuoteService"> - <port name="StockQuotePort" binding="tns2:StockQuoteBinding"> - <tns3:address xsi:type="tAddress" location="http://localhost/StockQuote/StockQuote.php"/> - </port> - </service> -</definitions> - -<!-- this line identifies this file as WSDL generated by SCA for PHP. Do not remove --> -]]> - - </programlisting> - </example> - </para> - - </section> - - <section xml:id="SCA.examples.deploy"> - - <title> Deploying an SCA component </title> - <para> - There are no special steps needed to deploy a PHP SCA - component. It is sufficient to place the component PHP script in its - proper place under the web server document root, just like any other - PHP script. It is the - <function>SCA::initComponent</function> executable line - within each component that will be executed whenever the script is - called, and which will be responsible for making the component - respond appropriately to Web service calls, local calls, or - requests for WSDL. - </para> - - </section> - - <section xml:id="SCA.examples.obtaining-wsdl"> - - <title> Obtaining the WSDL for an SCA component offering a Service as - a Web service </title> - - <para> - SCA components that expose a Web service interface (i.e. have - an @binding.soap annotation) will return their WSDL definition in - response to an HTTP request with a get parameter of "wsdl". The usual - way to obtain this is with "?wsdl" on the end of a URL. The example - below uses - <function>file_get_contents</function> to obtain WSDL from a - service and writes it to a temporary file before then obtaining a - proxy for the service in the usual way. You could of course also - obtain the WSDL in a browser, or by some other means, and save the file - yourself. - </para> - - <para> - <example> - <title> Generated WSDL </title> - <programlisting role="xml"> -<![CDATA[ -<?php -$wsdl = file_get_contents('http://www.example.com/Services/Example.php?wsdl'); -file_put_contents("service.wsdl",$wsdl); //write the wsdl to a file -$service = SCA::getService('service.wsdl'); -?> -]]> - - </programlisting> - </example> - </para> - - <para> - NOTE: If the wsdl requires imported xsds, these will need to be - fetched separately. - </para> - - </section> - - <section xml:id="SCA.examples.understanding-wsdl"> - <title> Understanding how the WSDL is generated </title> - <para> - SCA for PHP generates WSDL for components which contain an - @binding.soap annotation after the @service annotation. To - generate WSDL, the SCA runtime reflects on the component and - examines the @param and @return annotations for each public - method, as well as any @types annotations within the component. The - information from the @param and @return annotations is used to - build the &lt;types&gt; section of the WSDL. Any @types - annotations which specify a separate schema file will result in an - &lt;import&gt; element for that schema within the WSDL. - </para> - - <section xml:id="SCA.examples.understanding-wsdl.location"> - <title> Location attribute of the &lt;service&gt; element - </title> - <para> - At the bottom of the WSDL is the &lt;service&gt; element - which uses the location attribute to identify the URL of the - service. For example this might look as follows: - </para> - - <para> - <example> - <title> location attribute </title> - <programlisting role="xml"> -<![CDATA[ - <service name="ConvertedStockQuote" -... -location="http://localhost/ConvertedStockQuote/ConvertedStockQuote.php"/> -]]> - - </programlisting> - </example> - </para> - <para> - Note that this location is relative to the document root of - the web server, and cannot be worked out in advance. It can only be - worked out once the component is in its proper place under a running - web server, when the hostname and port can be known and placed in the - WSDL. Detail from the URL that requests the WSDL is used, so for - example if the WSDL is generated in response to a request to - http://www.example.com:1111/ConvertedStockQuote/ConvertedStockQuote.php?wsdl, - a location of - http://www.example.com:1111/ConvertedStockQuote/ConvertedStockQuote.php - is what will be inserted into the location attribute in the WSDL. - </para> - </section> - - <section - xml:id="SCA.examples.understanding-wsdl.positional-parameters"> - <title>Document/literal wrapped WSDL and positional - parameters</title> - <para> - SCA for PHP generates WSDL in the document/literal wrapped - style. This style encloses the parameters and return types of a - method in 'wrappers' which are named after the corresponding - method. The &lt;types&gt; element at the top of the WSDL defines - each of these wrappers. If we consider the - <function>getQuote</function> method of the - ConvertedStockQuote example: - </para> - - <para> - <example> - <title> method with two arguments </title> - <programlisting role="php"> -<![CDATA[ -<?php - /** - * Get a stock quote for a given ticker symbol in a given currency. - * - * @param string $ticker The ticker symbol. - * @param string $currency What currency to convert the value to. - * @return float The stock value is the target currency. - */ - function getQuote($ticker, $currency) - { - $quote = $this->stock_quote->getQuote($ticker); - $rate = $this->exchange_rate->getRate($currency); - return $rate * $quote; - } -?> -]]> - - </programlisting> - </example> - </para> - - <para> - The WSDL generated to define this method will name both the - method and the parameters, and give an XML schema type for the - parameters. The types section of the WSDL looks like this: - </para> - - <para> - <example> - <title> types section illustrating named parameters </title> - <programlisting role="xml"> -<![CDATA[ - <types> - <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" - targetNamespace="http://ConvertedStockQuote"> - <xs:element name="getQuote"> - <xs:complexType> - <xs:sequence> - <xs:element name="ticker" type="xs:string"/> - <xs:element name="currency" type="xs:string"/> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="getQuoteResponse"> - <xs:complexType> - <xs:sequence> - <xs:element name="getQuoteReturn" type="xs:float"/> - </xs:sequence> - </xs:complexType> - </xs:element> - </xs:schema> - </types> -]]> - - </programlisting> - </example> - </para> - - <para> - The SCA run-time has special processing to handle how - positional parameter lists in the interface are converted to XML - containing named parameters in the soap request, and then back to - positional parameter lists again. To see why this matters, - consider how a PHP script which used a different interface to make a - SOAP call would need to construct the parameter list. A PHP script - using the PHP SoapClient, for example, would need to pass the - SoapClient a single parameter giving the values for "ticker" and - "currency", perhaps as an associative array. To insist that SCA - components construct parameter lists to make Web service calls in - this way would be to make local and remote calls look different, so a - different approach is needed. - </para> - - <para> - When SCA generates WSDL for an SCA component it includes a - comment in the WSDL which marks that WSDL as being the interface for - an SCA component. In this case, when one SCA component calls - another through a Web service, the SCA runtime on the calling end - takes the positional parameter list from the call and assigns the - values one by one to the named elements in the soap message. For - example a call to the - <function>getQuote</function> method defined above that - passes the values 'IBM' and 'USD' and looks like this: - </para> - - <para> - <programlisting role="php"> -<![CDATA[ - $quote = $remote_service->getQuote('IBM','USD'); - ]]> - </programlisting> - </para> - - <para> - will result in a soap message containing the - following: - </para> - - <para> - <programlisting role="php"> -<![CDATA[ -<getQuote> - <ticker>IBM</ticker> - <currency>USD</currency> -</getQuote> - ]]> - </programlisting> - </para> - - <para> - On the service-providing end, the SCA run-time takes the - parameters one by one from the soap message and forms a positional - parameter list from them, re-forming the argument list - ('IBM','USD'). - </para> - - <caution> - - <para> - At both ends the SCA runtime relies on the order in which the - parameters appear in the soap message being the same as that in the - target method's parameter list. This is ultimately determined - by the order of the @param annotations: this determines the order - in which the parameters appear in the WSDL and thereby the order in - which they appear in the soap message. Therefore it is essential - that the order of the @param annotations matches that of the - parameters in the method's parameter list. - </para> - </caution> - - </section> - - </section> - - <section xml:id="SCA.examples.structures"> - <title> Working with Data Structures </title> - <para> - SCA components can pass and return the four PHP scalar types - boolean, integer, float and string, but to pass or return data - structures, SCA components use Service Data Objects (SDOs). SDOs - are described in much more detail in - <link linkend='ref.sdo'>the SDO pages</link> of this manual. - Readers familiar with SDOs will know that they are suitable for - representing the sort of structured and semi-structured data that - is frequently modeled in XML, and that they serialize very - naturally for passing between remote components, or in Web - services. SDOs are presently the only supported way to pass and - return data structures. It is not possible to pass or return PHP - objects, or PHP arrays. - </para> - - <para> - The SCA runtime always assures data is passed by-value, even - for local calls. To do this, the SCA runtime copies any SDOs in the - parameter list before passing them on, just as it does for scalar - types. - </para> - - <section> - <title> How data structures are defined to SCA components </title> - <para> - Currently the only mechanism for specifying the location of - a data structure definition is by specifying the types in an XML - schema file. However, in the future it may be possible to define - types in other ways, such as based on PHP classes or interfaces, or - based on definitions expressed as associative arrays. - </para> - - <para> - To illustrate the use of SDOs we introduce a new component. - The PortfolioMangement service below returns an SDO - representing a stock portfolio for a given customer. - </para> - - <para> - <example> - <title>A Component that uses Data Structures</title> - <programlisting role="php"> -<![CDATA[ -<?php - -include "SCA/SCA.php"; - -/** - * Manage the portfolio for a customer. - * - * @service - * @binding.soap - * - * @types http://www.example.org/Portfolio PortfolioTypes.xsd - * - */ -class PortfolioManagement { - - /** - * Get the stock portfolio for a given customer. - * - * @param integer $customer_id The id for the customer - * @return Portfolio http://www.example.org/Portfolio The stock portfolio (symbols and quantities) - */ - function getPortfolio($customer_id) { - // Pretend we just got this from a database - $portfolio = SCA::createDataObject('http://www.example.org/Portfolio', 'Portfolio'); - $holding = $portfolio->createDataObject('holding'); - $holding->ticker = 'AAPL'; - $holding->number = 100.5; - $holding = $portfolio->createDataObject('holding'); - $holding->ticker = 'INTL'; - $holding->number = 100.5; - $holding = $portfolio->createDataObject('holding'); - $holding->ticker = 'IBM'; - $holding->number = 100.5; - return $portfolio; - } - -} -?> -]]> - - </programlisting> - </example> - </para> - - <para> - The @types annotation: - </para> - - <para> - <programlisting role="php"> -<![CDATA[ -<?php -@types http://www.example.org/Portfolio PortfolioTypes.xsd -?> -]]> - </programlisting> - </para> - - <para> - indicates that types in the namespace - http://www.example.org/Portfolio will be found in the schema - file located by the URI PortfolioTypes.xsd. The generated WSDL - would reproduce this information with an import statement as - follows: - </para> - - <para> - <programlisting role="xml"> -<![CDATA[ - <xs:import schemaLocation="PortfolioTypes.xsd" - namespace="http://www.example.org/Portfolio"/> -]]> - </programlisting> - </para> - - <para> - so the URI, absolute or relative, must be one that can be - resolved when included in the schemaLocation attribute. - </para> - - </section> - - <section> - <title> Creating SDOs </title> - <para> - Readers familiar with SDOs will know that they are always - created according to a description of the permitted structure - (sometimes referred to as the 'schema' or 'model') and that, - rather than creating them directly using 'new', some form of data - factory is needed. Often, an existing data object can be used as the - data factory, but sometimes, and especially in order to get the - first data object, something else must act as the data factory. - </para> - - <para> - In SCA, either the SCA runtime class or the proxies for - services, whether local or remote, can act as the data factories - for SDOs. The choice of which to use, and when, is described in the - next two sections. - </para> - <para> - We switch to a new example in order to illustrate the creation - of SDOs, both to pass to a service, and to be returned from a service. - </para> - </section> - - <section> - <title>Creating an SDO to pass to a service</title> - <para> - A caller of a service which requires a data structure to be - passed in to it uses the proxy to the service as the data factory for - the corresponding SDOs. For example, suppose a component makes - use of a proxy for a service provided by a local AddressBook - component. - </para> - - <para> - <programlisting role="php"> -<![CDATA[ -<?php -/** - * @reference - * @binding.local AddressBook.php - */ -$address_book; -?> -]]> - - </programlisting> - </para> - <para> - The AddressBook component that it wishes to call is defined - as follows: - </para> - <para> - <programlisting role="php"> -<![CDATA[ -<?php -/** -* @service -* @binding.soap -* @types http://addressbook ../AddressBook/AddressBook.xsd -*/ -class AddressBook { - - /** - * @param personType $person http://addressbook (a person object) - * @return addressType http://addressbook (the address object for the person object) - */ - function lookupAddress($person) { - ... - } -} -?> -]]> - - </programlisting> - </para> - - <para> - The AddressBook component provides a service method called - - <function>lookupAddress</function> which uses types from the - http://addressbook namespace. The lookupAddress method takes a - personType data structure and returns an addressType. Both types - are defined in the schema file addressbook.xsd. - </para> - - <para> - Once the component that wishes to use the AddressBook - component has been constructed, so that the - <varname>$address_book</varname> instance variable contains - a proxy for the service, the calling component can use the proxy in - <varname>$address_book</varname> to create the person SDO, as - shown below: - </para> - - <para> - <programlisting role="php"> -<![CDATA[ -<?php -$william_shakespeare = $address_book->createDataObject('http://addressbook','personType'); -$william_shakespeare ->name = "William Shakespeare"; -$address = $address_book->lookupAddress($william_shakespeare); -?> -]]> - - </programlisting> - </para> - - <para> - Note, the use of the proxy as the means to create the SDO is not - limited to SCA components. If a service is being called from a - general PHP script, and the proxy was obtained with - <function>getService</function> then the same approach is - used. - </para> - - <para> - <programlisting role="php"> -<![CDATA[ -<?php -$address_book = SCA::getService('AddressBook.php'); -$william_shakespeare = $address_book->createDataObject('http://addressbook','personType'); -?> -]]> - - </programlisting> - </para> - - </section> - <section> - <title> Creating an SDO to return from a component </title> - <para> - A component that needs to create a data object for return to a - caller will not have a proxy to use as a data object, In this case it - uses the - <function>createDataObject</function> static method on - <filename>SCA.php</filename>. Hence if the AddressBook - component described above needed to create an object of type - <classname>addressType</classname> within the namespace - http://addressbook, it might do so as follows: - </para> - - <para> - <programlisting role="php"> -<![CDATA[ -<?php -$address = SCA::createDataObject('http://addressbook','addressType'); -?> -]]> - - </programlisting> - </para> - - </section> - - </section> - - <section xml:id="SCA.examples.errorhandling"> - <title> Error handling </title> - <para> - This section describes how errors are handled. There are two - types of errors: - </para> - <itemizedlist> - <listitem> - <para> - SCA runtime exceptions are those that signal problems in - the management of the execution of components, and in the - interaction with remote services. These might occur due to - network or configuration problems. - </para> - </listitem> - - <listitem> - <para> - Business exceptions are those that are defined by the - programmer. They extend the PHP Exception class, and are thrown - and caught deliberately as part of the business logic. - </para> - </listitem> - - </itemizedlist> - - <section> - <title> Handling of Runtime exceptions </title> - <para> - There are two types of SCA runtime exception: - </para> - - <itemizedlist> - <listitem> - <para> - SCA_RuntimeException - signals a problem found by or - perhaps occurring within the SCA runtime. This can be thrown for - a variety of reasons, many of which can occur regardless of - whether a connection is being made to a local or a remote service: - an error in one of the annotations within a component, a missing - WSDL or php file, and so on. In the case of Web services, an - SCA_RuntimeException can also be thrown if a SoapFault is - received from a remote Web service and the fault code in the - SoapFault indicates that a retry is unlikely to be successful. - </para> - </listitem> - - <listitem> - <para> - SCA_ServiceUnavailableException - this is a subclass of - SCA_RuntimeException and signals a problem in connecting to or - using a remote service, but one which might succeed if retried. - In the case of Web services, this exception is thrown if a - SoapFault is received with a fault code that indicates that a - retry might be successful. - </para> - </listitem> - - </itemizedlist> - </section> - <section> - <title> Handling of Business exceptions </title> - <para> - Business exceptions may be defined and thrown by a component - in the normal way, regardless of whether the component has been - called locally or remotely. The SCA runtime does not catch - business exceptions that have been thrown by a component called - locally, so they will be returned to a caller in the normal way. If a - component has been called via a Web service, on the other hand, the - SCA runtime on the service providing end does catch business - exceptions, and will ensure these are passed back to the calling - end and re-thrown. Assuming that the calling end has a definition - of the exception (that is, is able to include a file containing the - PHP class defining the exception) the re-thrown exception will - contain the same details as the original, so that the - <function>getLine</function> and - <function>getFile</function> methods for example will contain - the location where the exception was thrown within the business - logic. The exception will be passed in the detail field of a soap - fault with a fault code of "Client". - </para> - </section> - - </section> - - </section> <!-- end of examples --> - - <!-- class definition section --> - <section xml:id='sca.classes'> + <!-- FIXME: This needs to be upgraded to the new oo-markup --> + <!-- Class definition section --> + <section xml:id='sca.classes'><!-- {{{ --> &reftitle.classes; <para> Most of the interface to SCA is through the annotations within @@ -1363,11 +16,8 @@ itself, and the proxy classes SCA_LocalProxy and SCA_SoapProxy. </para> - <section xml:id='sca.class'> - - <title> - <classname>SCA</classname> - </title> + <section xml:id='sca.class'><!-- {{{ --> + <title><classname>SCA</classname></title> <para> Much of the work of the SCA class is performed when the file SCA.php is included within an SCA component. However, a PHP script @@ -1389,7 +39,8 @@ SDO's XML Data Access Service. </para> - <section xml:id='sca.class.SCA.methods'> &reftitle.methods; + <section xml:id='sca.class.SCA.methods'><!-- {{{ --> + &reftitle.methods; <itemizedlist> <listitem> <para> @@ -1404,10 +55,10 @@ </para> </listitem> </itemizedlist> - </section> - </section> + </section> <!-- }}} --> + </section><!-- }}} --> - <section xml:id='sca-local-proxy.class'> + <section xml:id='sca-local-proxy.class'><!-- {{{ --> <title> <classname>SCA_LocalProxy</classname> </title> @@ -1430,7 +81,7 @@ Service. </para> - <section xml:id='sca.class.SCA-LocalProxy.methods'> + <section xml:id='sca.class.SCA-LocalProxy.methods'><!-- {{{ --> &reftitle.methods; <itemizedlist> <listitem> @@ -1441,10 +92,10 @@ </para> </listitem> </itemizedlist> - </section> - </section> + </section><!-- }}} --> + </section><!-- }}} --> - <section xml:id='sca-soap-proxy.class'> + <section xml:id='sca-soap-proxy.class'><!-- {{{ --> <title> <classname>SCA_SoapProxy</classname> </title> @@ -1467,7 +118,7 @@ Data Access Service. </para> - <section xml:id='sca.class.SCA-SoapProxy.methods'> + <section xml:id='sca.class.SCA-SoapProxy.methods'><!-- {{{ --> &reftitle.methods; <itemizedlist> <listitem> @@ -1478,17 +129,12 @@ </para> </listitem> </itemizedlist> - </section> - </section> - + </section><!-- }}} --> + </section><!-- }}} --> </section> - - <!-- - &reference.sca.constants; - --> - + <!-- }}} --> + </partintro> - &reference.sca.functions.entities; </reference> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sdo_das_xml/reference.xml?r1=1.22.2.2&r2=1.22.2.3&diff_format=u Index: phpdoc/en/reference/sdo_das_xml/reference.xml diff -u phpdoc/en/reference/sdo_das_xml/reference.xml:1.22.2.2 phpdoc/en/reference/sdo_das_xml/reference.xml:1.22.2.3 --- phpdoc/en/reference/sdo_das_xml/reference.xml:1.22.2.2 Fri Nov 2 12:13:28 2007 +++ phpdoc/en/reference/sdo_das_xml/reference.xml Sat Dec 8 22:38:55 2007 @@ -1,737 +1,16 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.22.2.2 $ --> -<!-- Purpose: xml --> -<!-- Membership: pecl --> +<!-- $Revision: 1.22.2.3 $ --> <reference xml:id="ref.sdo-das-xml" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>SDO XML Data Access Service Functions</title> + <title>SDO XML Data Access Service &Functions;</title> <titleabbrev>SDO DAS XML</titleabbrev> <partintro> - <section xml:id="sdo-das-xml.intro"> - &reftitle.intro; - <para> - In order to use the XML Data Access Service for Service Data Objects, - you will need to understand some of the concepts behind SDO: - the data graph, the data object, XPath and property expressions, - and so on. - If you are not familiar with these ideas, you might want to look first at - <link linkend='ref.sdo'>the section on SDO</link>. - </para> - <para> - The job of the XML DAS is to move data between the - application and an XML data source, which can be either a file or - a URL. SDOs are always created and maintained according to a model - which defines type names and what property names each type may have. - For data which is from XML, this SDO model is built from a schema file - written in XML schema language (an xsd file). This schema file is - usually passed to the create method when the XMLDAS is initialised. - The - <link xlink:href='&url.ibm.sdo;'>SDO 2.0 specification</link> - defines the mapping between XML types and SDO types. - There are a number of small limitations in the PHP support - - not everything which is in the specification can be done - and - these limitations are summarised in a later section. - </para> - </section> - - <section xml:id="sdo-das-xml.requirements"> - &reftitle.required; - <para> - The SDO XML Data Access Service requires PHP 5.1.0 or higher. - It is packaged with the SDO extension and requires - SDO to have been installed. - See the - <link linkend="sdo.installation">SDO installation instructions</link> - for the details of how to do this. - </para> - </section> - - <section xml:id="sdo-das-xml.installation"> - &reftitle.install; - <para> - The XML Data Access Service is packaged and installed as part of the - <link linkend='ref.sdo'>SDO extension</link>. Please Refer - <link linkend="sdo.installation">SDO installation instructions</link>. - </para> - </section> - - <section xml:id='sdo-das-xml.examples'> - &reftitle.examples; - <para> - Several of the following examples are based on the - <link linkend="sdo.sample.sequence">letter example</link> - described in the - <link linkend="ref.sdo">SDO documentation</link>. - The examples assume the XML Schema for the letter is contained in a file - <filename>letter.xsd</filename> - and the letter instance is in the file - <filename>letter.xml</filename>. - These two files are reproduced here: - </para> - <para> - <programlisting role="xml"> -<![CDATA[ -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:letter="http://letterSchema" - targetNamespace="http://letterSchema"> - <xsd:element name="letters" type="letter:FormLetter"/> - <xsd:complexType name="FormLetter" mixed="true"> - <xsd:sequence> - <xsd:element name="date" minOccurs="0" type="xsd:string"/> - <xsd:element name="firstName" minOccurs="0" type="xsd:string"/> - <xsd:element name="lastName" minOccurs="0" type="xsd:string"/> - </xsd:sequence> - </xsd:complexType> -</xsd:schema> -]]> - </programlisting> - </para> - - <para> - <programlisting role="xml"> -<![CDATA[ -<letter:letters xmlns:letter="http://letterSchema"> - <date>March 1, 2005</date> - Mutual of Omaha - Wild Kingdom, USA - Dear - <firstName>Casy</firstName> - <lastName>Crocodile</lastName> - Please buy more shark repellent. - Your premium is past due. -</letter:letters> -]]> - </programlisting> - </para> - - <example> - <title>Loading, altering, and saving an XML document</title> - - <para> - The following example shows how an XML document can be loaded from a file, - altered, and written back. - </para> - - <programlisting role="php" xml:id="sdo-das-xml.examples.loadfromfile"> - <![CDATA[ -<?php -/** - * Load, update, and save an XML document - */ -try { - $xmldas = SDO_DAS_XML::create("letter.xsd"); - $document = $xmldas->loadFile("letter.xml"); - $root_data_object = $document->getRootDataObject(); - $root_data_object->date = "September 03, 2004"; - $root_data_object->firstName = "Anantoju"; - $root_data_object->lastName = "Madhu"; - $xmldas->saveFile($document, "letter-out.xml"); - echo "New file has been written:\n"; - print file_get_contents("letter-out.xml"); -} catch (SDO_Exception $e) { - print($e->getMessage()); -} -?> ]]> - </programlisting> - - <para> - An instance of the XML DAS is first obtained from the - <function>SDO_DAS_XML::create</function> - method, - which is a static method of the - <classname>SDO_DAS_XML</classname> - class. - The location of the xsd is passed as a parameter. - Once we have an instance of the XML DAS initialised - with a given schema, - we can use it to load the instance document using the - <function>loadFile</function> - method. - There is also a - <function>loadString</function> - method if you want to load an XML - instance document from a string. - If the instance document loads successfully, - you will be returned an object of type - <classname>SDO_DAS_XML_Document</classname>, - on which you can call the - <function>getRootDataObject</function> - method to get the SDO data object which is the root - of the SDO data graph. - You can then use SDO operations to change the graph. - In this example we alter the - <varname>date</varname>, - <varname>firstName</varname>, and - <varname>lastName</varname> properties. - Then we use the - <function>saveFile</function> - method to write the changed document back to the file system. - The saveFile method has an optional extra integer argument which if specified - will cause the XML DAS to format the XML, using the integer as the amount to - indent by at each change in level on the document. - </para> - - <para> - This will write the following to <filename>letter-out.xml</filename>. - </para> - - <programlisting role="xml" xml:id="sdo-das-xml.examples.loadfromfile.output"> - <![CDATA[ -<?xml version="1.0" encoding="UTF-8"?> -<FormLetter xmlns="http://letterSchema" xsi:type="FormLetter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <date>September 03, 2004</date> - Mutual of Omaha - Wild Kingdom, USA - Dear - <firstName>Anantoju</firstName> - <lastName>Madhu</lastName> - Please buy more shark repellent. - Your premium is past due. -</FormLetter> -]]> - </programlisting> - - </example> - - <example> - - <title>Creating a new XML document</title> - - <para> - The previous example loaded the document from a file. - This example shows how to create an SDO data graph in memory. - In this example it is then saved to an XML string. - Furthermore, because the letter contains both structured and - unstructured content, it uses - <link linkend="sdo.sample.sequence">the Sequence API</link> - as well assignments to properties to construct the data graph. - </para> - - <programlisting role="php" xml:id="sdo-das-xml.examples.create"> - <![CDATA[ -<?php -/** - * Create an XML document from scratch - */ -try { - $xmldas = SDO_DAS_XML::create("letter.xsd"); - try { - $doc = $xmldas->createDocument(); - $rdo = $doc->getRootDataObject(); - $seq = $rdo->getSequence(); - $seq->insert("April 09, 2005", NULL, 'date'); - $seq->insert("Acme Inc. ", NULL, NULL); - $seq->insert("United Kingdom. "); - $seq->insert("Dear", NULL, NULL); - $seq->insert("Tarun", NULL, "firstName"); - $seq->insert("Nayaraaa", NULL, "lastName"); - $rdo->lastName = "Nayar"; - $seq->insert("Please note that your order number "); - $seq->insert(12345); - $seq->insert(" has been dispatched today. Thanks for your business with us."); - print($xmldas->saveString($doc)); - } catch (SDO_Exception $e) { - print($e); - } -} catch (SDO_Exception $e) { - print("Problem creating an XML document: " . $e->getMessage()); -} -?> - ]]> - </programlisting> - - </example> - - <para> - The - <function>createDocument</function> - method on the XML DAS returns a document object - with a single root data object corresponding to an empty document element. - The element name of the document element is known from the schema file. - If there is any ambiguity about what the document element is, as there can be - when more than one schema has been loaded into the same XML DAS, - the element name and the namespace URI can be passed to the - <function>createDocument</function> - method. - </para> - - <para> - This will emit the following output (line breaks have been inserted for readability): - </para> - - <programlisting role="xml" xml:id="sdo-das-xml.examples.create.output"> - <![CDATA[ -<?xml version="1.0" encoding="UTF-8"?> -<FormLetter xmlns="http://letterSchema" xsi:type="FormLetter" -xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> -<date>April 09, 2005</date> -Acme Inc. United Kingdom. -Dear -<firstName>Tarun</firstName> -<lastName>Nayar</lastName> -Please note that your order number 12345 has been -dispatched today. Thanks for your business with us. -</FormLetter> -]]> - </programlisting> - - - <example> - - <title>Setting XML document properties</title> - - <para> - This third example shows you how to set the XML version and - encoding on the document object. - These will be used when the XML is written out. - If no XML declaration is wanted at all - (perhaps you want to generate the XML as a string to embed - in something) then you can use the - <function>setXMLDeclaration</function> - method to suppress it. - </para> - - <programlisting role="php" xml:id="sdo-das-xml.examples.Example3"> - <![CDATA[ -<?php -/** - * Illustrate the calls that control the XML declaration - */ - $xmldas = SDO_DAS_XML::create("letter.xsd"); - $document = $xmldas->loadFile("letter.xml"); - $document->setXMLVersion("1.1"); - $document->setEncoding("ISO-8859-1"); - print($xmldas->saveString($document)); -?> ]]> - </programlisting> - - <para> - The XML version and encoding are set in the XML declaration at the top - of the XML document. - </para> - - <programlisting role="xml" xml:id="sdo-das-xml.examples.sdo_das_xml_document.output"> -<![CDATA[ -<?xml version="1.1" encoding="ISO-8859-1"?> -.../... -]]> - </programlisting> - - </example> - - - <example> - <title>Using an open type</title> - <para> - This fourth example illustrates the use of an SDO open type - and the use of the - <function>createDataObject</function> - method. - For this example we use the following two - schema: - </para> - <para> - <programlisting role="xml"> -<![CDATA[ -<schema - xmlns="http://www.w3.org/2001/XMLSchema"> - - <element name="jungle"> - <complexType> - <sequence> - <any minOccurs="0" maxOccurs="unbounded"/> - </sequence> - </complexType> - </element> - -</schema> -]]> - </programlisting> - </para> - - <para> - Note the presence of the - <varname>any</varname> - element in the definition. - This first schema defines the - <varname>jungle</varname> - complex type as containing a sequence of - any other type. - The other types that the example will use are defined in a - second schema file: - </para> - - <para> - <programlisting role="xml"> -<![CDATA[ -<schema xmlns= "http://www.w3.org/2001/XMLSchema"> - - <complexType name="snakeType"> - <sequence> - <element name= "name" type="string"/> - <element name= "length" type="positiveInteger" /> - </sequence> - </complexType> - - <complexType name="bearType"> - <sequence> - <element name= "name" type="string"/> - <element name= "weight" type="positiveInteger" /> - </sequence> - </complexType> - - <complexType name="pantherType"> - <sequence> - <element name= "name" type="string"/> - <element name= "colour" type="string" /> - </sequence> - </complexType> - -</schema> -]]> - </programlisting> - </para> - - <para> - Here is the example PHP code that uses these two schema files: - </para> - - <para> - <programlisting role="php" xml:id="sdo-das-xml.examples.Example4"> - <![CDATA[ -<?php - -/** - * Illustrate open types and the use of the addTypes() method - */ - -$xmldas = SDO_DAS_XML::create(); -$xmldas->addTypes("jungle.xsd"); // this is an open type i.e. the xsd specifies it can contain "any" type -$xmldas->addTypes('animalTypes.xsd'); - -$baloo = $xmldas->createDataObject('','bearType'); -$baloo->name = "Baloo"; -$baloo->weight = 800; - -$bagheera = $xmldas->createDataObject('','pantherType'); -$bagheera->name = "Bagheera"; -$bagheera->colour = 'inky black'; - -$kaa = $xmldas->createDataObject('','snakeType'); -$kaa->name = "Kaa"; -$kaa->length = 25; - -$document = $xmldas->createDocument(); -$do = $document->getRootDataObject(); -$do->bear = $baloo; -$do->panther = $bagheera; -$do->snake = $kaa; - -print($xmldas->saveString($document,2)); - -?> - ]]> - </programlisting> - </para> - <para> - These two schema files are loaded into the XML DAS with first the - <function>create</function> - and - <function>addTypes</function> - methods. - The - <function>createDataObject</function> - method is used to create three separate data objects. - In each case the namespaceURI and typename of the type are passed to the - <function>createDataObject</function> - method: in this example the namespace URI is blank because no - namespace is used in the schema. - Once the three data objects - representing a bear, a panther and a snake - - have been created, a document object is created with the - <function>createDocument</function> - method. - In this case there is no ambiguity about what the document element of the - document should be - as the second schema file only defines complex types, - the document element can only be the global - <varname>jungle</varname> - element defined - in the first schema. - This document will have a single root data object corresponding to an - empty document element <varname>jungle</varname>. - As this is an open type, properties can be added at will. - When the first assignment is made to <varname>$do->bear</varname>, - a property - <varname>bear</varname> - is added to the root data object: - likewise for the next two assignments. - When the document is written out by the - <function>saveString</function> - method, the resulting document is: - </para> - - <para> - <programlisting role="xml"> -<![CDATA[ -<?xml version="1.0" encoding="UTF-8"?> -<jungle xsi:type="jungle" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> - <bear xsi:type="bearType"> - <name>Baloo</name> - <weight>800</weight> - </bear> - <panther xsi:type="pantherType"> - <name>Bagheera</name> - <colour>inky black</colour> - </panther> - <snake xsi:type="snakeType"> - <name>Kaa</name> - <length>25</length> - </snake> -</jungle> -]]> - </programlisting> - </para> - - </example> - - <example> - - <title>Finding out what you can from the document</title> - - <para> - This example is intended to illustrate how you can find the - element name and - namespace of the document element from the XML Document object, and - the SDO type and namespace from the root data object of the XML data - object, and how they relate to one another. - This can be difficult to understand because there are four method calls: - two can be made against the Document object, and two that can be made - against any data object including the root data object. - Because of the rules that define how the SDO model is derived - from the XML model, when the data object concerned is the - root object that represents the document object for the document, - only three possible values can come back from these - four method calls. - - </para> - - <para> - The two method calls that can be made against the document - are <function>getRootElementName</function> and - <function>getRootEelementURI</function>. - These return the element name and namespace of the document element, - respectively. - </para> - - <para> - The two method calls that can be made against any data object are - <function>getTypeName</function> - and - <function>getTypeNamespaceURI</function>. - These return the SDO type name and type namespace of the data object, - respectively. - </para> - - <para> - Always, calling <function>getRootElementURI</function> - on the document object will return the same value as - calling <function>getNamespaceURI</function> on the - root data object. - Essentially, the information is all derived from the first few lines of the - schema file, - where there are three distinct pieces of information. - For illustration, here again are the first few lines of the - letter.xsd that we used above. - </para> - - <programlisting role="xml"> -<![CDATA[ -<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - xmlns:letter="http://letterSchema" - targetNamespace="http://letterSchema"> - - <xsd:element name="letters" type="letter:FormLetter"/> - - <xsd:complexType name="FormLetter" mixed="true"> - .../... -]]> - </programlisting> - - <para> - The three important values are: - <itemizedlist> - <listitem> - <para> - <varname>letters</varname>, the name of the document element - </para> - </listitem> - <listitem> - <para> - <varname>FormLetter</varname>, the name of the complex type of the document element. - This is also the name of the SDO type of the root data object. - </para> - </listitem> - <listitem> - <para> - <varname>http://letterSchema</varname>, the namespace to which the document element belongs. - This is also the namespaceURI of the SDO type of the root data object. - </para> - </listitem> - </itemizedlist> - It is part of the XML-SDO mapping rules that - when the SDO model is built from the schema file, - the typename and namespaceURI of the SDO types for the root element - are taken - from those of the complex type of the document element, where it exists. - Hence in this example the typename of the root data object is FormLetter. - In the event that there is no separate complex type definition - for the document element, when the the type is defined inline and is - anonymous, - the SDO type name will be the same as the element name. - </para> - - <para> - The following program loads the letter document and checks the - return values from each of the four calls. - </para> - <programlisting role="php" xml:id="sdo-das-xml.examples.Example5"> - <![CDATA[ -<?php -/** - * Finding out what you can about the document and document element - * This can be quite hard to understand because there are four calls - * Two calls are made against the document - * Two calls are made against the root data object and its model - * Because of the SDO-XML mapping rules and how the SDO model is derived - * from the XML model, only three possible values can come back from these four calls. - * Always, $document->getRootElementURI() == (type of root data object)->namespaceURI - * Essentially, it all comes form the first few lines of the xsd: - * <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" - * xmlns:letter="http://letterSchema" - * targetNamespace="http://letterSchema"> - * <xsd:element name="letters" type="letter:FormLetter"/> - */ - -$xmldas = SDO_DAS_XML::create("letter.xsd"); -$document = $xmldas->loadFile("letter.xml"); -$root_do = $document->getRootDataObject(); - -/** - * The "root element name" is the element name of the document element - * in this case 'letters' - * This matches the 'name' attribute of the document element in the xsd and matches - * the element name from the xml - */ -echo "The document element name is " . $document->getRootElementName() . "\n"; -assert($document->getRootElementName() == 'letters'); // a property of the document - -/** - * The "root element URI" is the namespace part of the element name of the document element - * in this case 'http://letterSchema' since 'letters' is in that namespace - * This is taken from the xsd and matches the namespace picked up from the xml - */ -echo "The document element is in the namespace " . $document->getRootElementURI() . "\n"; -assert($document->getRootElementURI() == 'http://letterSchema'); // a property of the document - -/** - * The type name is taken from the SDO model - * The XML-SDO mapping rules make this either: - * The name of the complexType if there is one (in this case there is) - * The document element name if there no complexType - * This is taken from the xsd - */ -echo "The type name of the root data object is " . $root_do->getTypeName() . "\n"; -assert($root_do->getTypeName() == 'FormLetter'); - -/** - * The type's namespaceURI is taken from the SDO model - * The XML-SDO mapping rules ensure that this will always be the same as - * the namepace URI of the document element - */ -echo "The namespaceURI of the root data object is " . $root_do->getTypeNamespaceURI() . "\n"; -assert($root_do->getTypeNamespaceURI() == 'http://letterSchema'); - -?> - ]]> - </programlisting> - <para> - The output from this program is as follows: - </para> - <programlisting role="xml" xml:id="sdo-das-xml.examples.Example5.output"> -<![CDATA[ -The document element name is letters -The document element is in the namespace http://letterSchema -The type name of the root data object is FormLetter -The namespaceURI of the root data object is http://letterSchema -]]> - </programlisting> - - </example> - - <example> - - <title>Printing the SDO model</title> - - <para> - The XML DAS provides a simple means to see what types and properties - have been loaded. The php "print" or "echo" instruction will - print out the types and properties. - </para> - - <programlisting role="php" xml:id="sdo-das-xml.examples.Example6"> - <![CDATA[ -<?php -/** - * Illustrate printing out the model - */ - -$xmldas = SDO_DAS_XML::create("letter.xsd"); -print $xmldas; - -?> -]]> - </programlisting> - - <para> - The output from this program is as follows: - </para> - <programlisting role="xml" xml:id="sdo-das-xml.examples.Example6.output"> -<![CDATA[ -object(SDO_XML_DAS)#1 { -18 types have been defined. The types and their properties are:: -1. commonj.sdo:BigDecimal -2. commonj.sdo:BigInteger -3. commonj.sdo:Boolean -4. commonj.sdo:Byte -5. commonj.sdo:Bytes -6. commonj.sdo:ChangeSummary -7. commonj.sdo:Character -8. commonj.sdo:DataObject -9. commonj.sdo:Date -10. commonj.sdo:Double -11. commonj.sdo:Float -12. commonj.sdo:Integer -13. commonj.sdo:Long -14. commonj.sdo:Short -15. commonj.sdo:String -16. commonj.sdo:URI -17. http://letterSchema:FormLetter - - date (commonj.sdo:String) - - firstName (commonj.sdo:String) - - lastName (commonj.sdo:String) -18. http://letterSchema:RootType - - letters (http://letterSchema:FormLetter) -]]> - </programlisting> - - </example> - - - </section> + <!-- FIXME: Upgrade to the new-oo-markup --> <!-- class definition section --> - <section xml:id='sdo-das-xml.classes'> + <section xml:id='sdo-das-xml.classes'><!-- {{{ --> &reftitle.classes; <para> The XML DAS provides two main classes. @@ -746,7 +25,7 @@ xml files. </para> - <section xml:id='sdo-das-xml.class.sdo_das_xml'> + <section xml:id='sdo-das-xml.class.sdo_das_xml'><!-- {{{ --> <title> <classname>SDO_DAS_XML</classname> </title> @@ -756,7 +35,7 @@ and also used to write the data back. Other than the methods to load and save xml files, </para> - <section xml:id='sdo-das-xml.class.SDO_DAS_XML.methods'> + <section xml:id='sdo-das-xml.class.SDO_DAS_XML.methods'><!-- {{{ --> &reftitle.methods; <itemizedlist> @@ -817,11 +96,11 @@ </itemizedlist> - </section> - </section> + </section><!-- }}} --> + </section><!-- }}} --> - <section xml:id='sdo-das-xml.class.sdo_das_xml_document'> + <section xml:id='sdo-das-xml.class.sdo_das_xml_document'><!-- {{{ --> <title> <classname>SDO_DAS_XML_Document</classname> </title> @@ -831,7 +110,7 @@ Lastly, it can also be used to set the XML version and encoding of a document on output. </para> - <section xml:id='sdo-das-xml.class.SDO_DAS_XML_Document.methods'> + <section xml:id='sdo-das-xml.class.SDO_DAS_XML_Document.methods'><!-- {{{ --> &reftitle.methods; <itemizedlist> <listitem> @@ -875,8 +154,8 @@ </para> </listitem> </itemizedlist> - </section> - </section> + </section><!-- }}} --> + </section><!-- }}} --> <section xml:id='sdo-das-xml.class.sdo_das_xml_parserexception'> <title> @@ -1038,6 +317,7 @@ </step> </procedure> </section> + <!-- }}} --> </partintro> &reference.sdo-das-xml.functions.entities; http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/simplexml/reference.xml?r1=1.23.2.1&r2=1.23.2.2&diff_format=u Index: phpdoc/en/reference/simplexml/reference.xml diff -u phpdoc/en/reference/simplexml/reference.xml:1.23.2.1 phpdoc/en/reference/simplexml/reference.xml:1.23.2.2 --- phpdoc/en/reference/simplexml/reference.xml:1.23.2.1 Wed Oct 3 11:41:15 2007 +++ phpdoc/en/reference/simplexml/reference.xml Sat Dec 8 22:38:55 2007 @@ -1,308 +1,13 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.23.2.1 $ --> -<!-- Purpose: xml --> -<!-- Membership: bundled, external --> +<!-- $Revision: 1.23.2.2 $ --> - <reference xml:id="ref.simplexml" xmlns="http://docbook.org/ns/docbook"> - <title>SimpleXML functions</title> - <titleabbrev>SimpleXML</titleabbrev> +<reference xml:id="ref.simplexml" xmlns="http://docbook.org/ns/docbook"> + <title>SimpleXML functions</title> - <partintro> - <section xml:id="simplexml.intro"> - &reftitle.intro; - <para> - The SimpleXML extension provides a very simple and easily usable - toolset to convert XML to an object that can be processed with - normal property selectors and array iterators. - </para> - </section> - - <section xml:id="simplexml.requirements"> - &reftitle.required; - <para> - The SimpleXML extension requires PHP 5. - </para> - </section> + &reference.simplexml.functions.entities; - &reference.simplexml.configure; - - <section xml:id="simplexml.examples"> - &reftitle.examples; - <para> - Many examples in this reference require an XML string. Instead of - repeating this string in every example, we put it into a file which - we include in each example. This included file is shown in the - following example section. Alternatively, you could create an XML - document and read it with <function>simplexml_load_file</function>. - </para> - <para> - <example> - <title>Include file example.php with XML string</title> - <programlisting role="php" xml:id="simplexml.examples.movie"> -<![CDATA[ -<?php -$xmlstr = <<<XML -<?xml version='1.0' standalone='yes'?> -<movies> - <movie> - <title>PHP: Behind the Parser</title> - <characters> - <character> - <name>Ms. Coder</name> - <actor>Onlivia Actora</actor> - </character> - <character> - <name>Mr. Coder</name> - <actor>El Act&#211;r</actor> - </character> - </characters> - <plot> - So, this language. It's like, a programming language. Or is it a - scripting language? All is revealed in this thrilling horror spoof - of a documentary. - </plot> - <great-lines> - <line>PHP solves all my web problems</line> - </great-lines> - <rating type="thumbs">7</rating> - <rating type="stars">5</rating> - </movie> -</movies> -XML; -?> -]]> - </programlisting> - </example> - </para> - <para> - The simplicity of SimpleXML appears most clearly when one extracts - a string or number from a basic XML document. - <example> - <title>Getting <literal>&lt;plot&gt;</literal></title> - <programlisting role="php"><![CDATA[ -<?php -include 'example.php'; +</reference> -$xml = new SimpleXMLElement($xmlstr); - -echo $xml->movie[0]->plot; // "So this language. It's like..." -?> -]]> - </programlisting> - </example> - </para> - <para> - Accessing elements within an XML document that contain characters not permitted under - PHP's naming convention (e.g. the hyphen) can be accomplished by encapsulating the - element name within braces and the apostrophe. - <example> - <title>Getting <literal>&lt;line&gt;</literal></title> - <programlisting role="php"> -<![CDATA[ -<?php -include 'example.php'; - -$xml = new SimpleXMLElement($xmlstr); - -echo $xml->movie->{'great-lines'}->line; // "PHP solves all my web problems" -?> -]]> - </programlisting> - </example> - </para> - <para> - <example> - <title>Accessing non-unique elements in SimpleXML</title> - <simpara> - When multiple instances of an element exist as children of - a single parent element, normal iteration techniques apply. - </simpara> - <programlisting role="php"> -<![CDATA[ -<?php -include 'example.php'; - -$xml = new SimpleXMLElement($xmlstr); - -/* For each <movie> node, we echo a separate <plot>. */ -foreach ($xml->movie as $movie) { - echo $movie->plot, '<br />'; -} - -?> -]]> - </programlisting> - </example> - </para> - <para> - <example> - <title>Using attributes</title> - <simpara> - So far, we have only covered the work of reading element names - and their values. SimpleXML can also access element attributes. - Access attributes of an element just as you would elements - of an <type>array</type>. - </simpara> - <programlisting role="php"> -<![CDATA[ -<?php -include 'example.php'; - -$xml = new SimpleXMLElement($xmlstr); - -/* Access the <rating> nodes of the first movie. - * Output the rating scale, too. */ -foreach ($xml->movie[0]->rating as $rating) { - switch((string) $rating['type']) { // Get attributes as element indices - case 'thumbs': - echo $rating, ' thumbs up'; - break; - case 'stars': - echo $rating, ' stars'; - break; - } -} -?> -]]> - </programlisting> - </example> - </para> - <para> - <example> - <title>Comparing Elements and Attributes with Text</title> - <simpara> - To compare an element or attribute with a string or pass it into a - function that requires a string, you must cast it to a string using - <literal>(string)</literal>. Otherwise, PHP treats the element as an object. - </simpara> - <programlisting role="php"><![CDATA[ -<?php -include 'example.php'; - -$xml = new SimpleXMLElement($xmlstr); - -if ((string) $xml->movie->title == 'PHP: Behind the Parser') { - print 'My favorite movie.'; -} - -htmlentities((string) $xml->movie->title); -?> -]]> - </programlisting> - </example> - </para> - <para> - <example> - <title>Using XPath</title> - <simpara> - SimpleXML includes built-in <acronym>XPath</acronym> support. - To find all <literal>&lt;character&gt;</literal> elements: - </simpara> - <programlisting role="php"> -<![CDATA[ -<?php -include 'example.php'; -$xml = new SimpleXMLElement($xmlstr); - -foreach ($xml->xpath('//character') as $character) { - echo $character->name, 'played by ', $character->actor, '<br />'; -} -?> -]]> - </programlisting> - <simpara> - '<literal>//</literal>' serves as a wildcard. To specify absolute - paths, omit one of the slashes. - </simpara> - </example> - </para> - <para> - <example> - <title>Setting values</title> - <simpara> - Data in SimpleXML doesn't have to be constant. The object allows - for manipulation of all of its elements. - </simpara> - <programlisting role="php"> -<![CDATA[ -<?php -include 'example.php'; -$xml = new SimpleXMLElement($xmlstr); - -$xml->movie[0]->characters->character[0]->name = 'Miss Coder'; - -echo $xml->asXML(); -?> -]]> - </programlisting> - <simpara> - The above code will output a new XML document, just like the original, - except that the new XML will change Ms. Coder to Miss Coder. - </simpara> - </example> - </para> - <para> - <example> - <title>Adding elements and attributes</title> - <simpara> - Since PHP 5.1.3, SimpleXML has had the ability to easily add children and - attributes. - </simpara> - <programlisting role="php"> -<![CDATA[ -<?php -include 'example.php'; -$xml = new SimpleXMLElement($xmlstr); - -$character = $xml->movie[0]->characters->addChild('character'); -$character->addChild('name', 'Mr. Parser'); -$character->addChild('actor', 'John Doe'); - -$rating = $xml->movie[0]->addChild('rating', 'PG'); -$rating->addAttribute('type', 'mpaa'); - -echo $xml->asXML(); -?> -]]> - </programlisting> - <simpara> - The above code will output an XML document based on the original but - having a new character and rating. - </simpara> - </example> - </para> - <para> - <example> - <title>DOM Interoperability</title> - <simpara> - PHP has a mechanism to convert XML nodes between SimpleXML - and DOM formats. This example shows how one might change - a DOM element to SimpleXML. - </simpara> - <programlisting role="php"> -<![CDATA[ -<?php -$dom = new domDocument; -$dom->loadXML('<books><book><title>blah</title></book></books>'); -if (!$dom) { - echo 'Error while parsing the document'; - exit; -} - -$s = simplexml_import_dom($dom); - -echo $s->book[0]->title; -?> -]]> - </programlisting> - </example> - </para> - </section> - </partintro> - -&reference.simplexml.functions.entities; - - </reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/wddx/reference.xml?r1=1.14.2.1&r2=1.14.2.2&diff_format=u Index: phpdoc/en/reference/wddx/reference.xml diff -u phpdoc/en/reference/wddx/reference.xml:1.14.2.1 phpdoc/en/reference/wddx/reference.xml:1.14.2.2 --- phpdoc/en/reference/wddx/reference.xml:1.14.2.1 Wed Oct 3 11:41:16 2007 +++ phpdoc/en/reference/wddx/reference.xml Sat Dec 8 22:38:55 2007 @@ -1,123 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.14.2.1 $ --> -<!-- Purpose: webservice --> -<!-- Membership: bundled, external --> +<!-- $Revision: 1.14.2.2 $ --> - <reference xml:id="ref.wddx" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>WDDX Functions</title> - <titleabbrev>WDDX</titleabbrev> - - <partintro> - <section xml:id="wddx.intro"> - &reftitle.intro; - <para> - These functions are intended for work with <link - xlink:href="&url.wddx;">WDDX</link>. - </para> - </section> +<reference xml:id="ref.wddx" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>WDDX &Functions;</title> - <section xml:id="wddx.requirements"> - &reftitle.required; - <para> - In order to use WDDX, you will need to install the expat library - (which comes with Apache 1.3.7 or higher). - </para> - </section> - - &reference.wddx.configure; - - <section xml:id="wddx.configuration"> - &reftitle.runtime; - &no.config; - </section> - - <section xml:id="wddx.resources"> - &reftitle.resources; - <para> - This extension defines a WDDX packet identifier returned by - <function>wddx_packet_start</function>. - </para> - </section> - - <section xml:id="wddx.constants"> - &reftitle.constants; - &no.constants; - </section> - - <section xml:id="wddx.examples"> - &reftitle.examples; - <para> - All the functions that serialize variables use the first - element of an array to determine whether the array is to be - serialized into an array or structure. If the first element has - string key, then it is serialized into a structure, otherwise, - into an array. - </para> - - <example> - <title>Serializing a single value with WDDX</title> - <programlisting role="php"> -<![CDATA[ -<?php -echo wddx_serialize_value("PHP to WDDX packet example", "PHP packet"); -?> -]]> - </programlisting> - <para> - This example will produce: - </para> - <screen> -<![CDATA[ -<wddxPacket version='1.0'><header comment='PHP packet'/><data> -<string>PHP to WDDX packet example</string></data></wddxPacket> -]]> - </screen> - </example> - - <example> - <title>Using incremental packets with WDDX</title> - <programlisting role="php"> -<![CDATA[ -<?php -$pi = 3.1415926; -$packet_id = wddx_packet_start("PHP"); -wddx_add_vars($packet_id, "pi"); - -/* Suppose $cities came from database */ -$cities = array("Austin", "Novato", "Seattle"); -wddx_add_vars($packet_id, "cities"); - -$packet = wddx_packet_end($packet_id); -echo $packet; -?> -]]> - </programlisting> - <para> - This example will produce: - </para> - <screen> -<![CDATA[ -<wddxPacket version='1.0'><header comment='PHP'/><data><struct> -<var name='pi'><number>3.1415926</number></var><var name='cities'> -<array length='3'><string>Austin</string><string>Novato</string> -<string>Seattle</string></array></var></struct></data></wddxPacket> -]]> - </screen> - </example> - - <note> - <para> - If you want to serialize non-ASCII characters you have to convert - your data to UTF-8 first (see <function>utf8_encode</function> and - <function>iconv</function>). - </para> - </note> - </section> - </partintro> - -&reference.wddx.functions.entities; + &reference.wddx.functions.entities; - </reference> +</reference> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xml/constants.xml?r1=1.3&r2=1.3.2.1&diff_format=u Index: phpdoc/en/reference/xml/constants.xml diff -u phpdoc/en/reference/xml/constants.xml:1.3 phpdoc/en/reference/xml/constants.xml:1.3.2.1 --- phpdoc/en/reference/xml/constants.xml:1.3 Wed Jun 20 22:25:36 2007 +++ phpdoc/en/reference/xml/constants.xml Sat Dec 8 22:38:55 2007 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.3 $ --> -<section xml:id="xml.constants" xmlns="http://docbook.org/ns/docbook"> +<!-- $Revision: 1.3.2.1 $ --> +<appendix xml:id="xml.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <variablelist> @@ -291,7 +291,7 @@ </listitem> </varlistentry> </variablelist> -</section> +</appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xml/reference.xml?r1=1.21.2.1&r2=1.21.2.2&diff_format=u Index: phpdoc/en/reference/xml/reference.xml diff -u phpdoc/en/reference/xml/reference.xml:1.21.2.1 phpdoc/en/reference/xml/reference.xml:1.21.2.2 --- phpdoc/en/reference/xml/reference.xml:1.21.2.1 Wed Oct 3 11:41:16 2007 +++ phpdoc/en/reference/xml/reference.xml Sat Dec 8 22:38:55 2007 @@ -1,606 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.21.2.1 $ --> -<!-- Purpose: xml --> -<!-- Membership: bundled, external --> +<!-- $Revision: 1.21.2.2 $ --> - <reference xml:id="ref.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>XML Parser Functions</title> - <titleabbrev>XML</titleabbrev> +<reference xml:id="ref.xml" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>XML Parser &Functions;</title> - <partintro> + &reference.xml.functions.entities; - <section xml:id="xml.intro"> - &reftitle.intro; - <para> - XML (eXtensible Markup Language) is a data format for structured - document interchange on the Web. It is a standard defined by - The World Wide Web consortium (W3C). Information about XML and - related technologies can be found at <link - xlink:href="&url.xml;">&url.xml;</link>. - </para> - <para> - This PHP extension implements support for James Clark's - <productname>expat</productname> in PHP. This toolkit lets you - parse, but not validate, XML documents. It supports three - source <link linkend="xml.encoding">character encodings</link> - also provided by PHP: <literal>US-ASCII</literal>, - <literal>ISO-8859-1</literal> and <literal>UTF-8</literal>. - <literal>UTF-16</literal> is not supported. - </para> - <para> - This extension lets you <link - linkend="function.xml-parser-create">create XML parsers</link> - and then define <emphasis>handlers</emphasis> for different XML - events. Each XML parser also has a few <link - linkend="function.xml-parser-set-option">parameters</link> you - can adjust. - </para> - </section> - - <section xml:id="xml.requirements"> - &reftitle.required; - <para> - This extension uses an <productname>expat compat layer</productname> by - default. It can use also <productname>expat</productname>, which can - be found at <link xlink:href="&url.expat;">&url.expat;</link>. The - Makefile that comes with expat does not build a library by - default, you can use this make rule for that: - <programlisting role="makefile"> -<![CDATA[ -libexpat.a: $(OBJS) - ar -rc $@ $(OBJS) - ranlib $@ -]]> - </programlisting> - A source RPM package of expat can be found at <link - xlink:href="&url.expat.rpm;">&url.expat.rpm;</link>. - </para> - </section> - - &reference.xml.configure; - - <section xml:id="xml.configuration"> - &reftitle.runtime; - &no.config; - </section> - - <section xml:id="xml.resources"> - &reftitle.resources; - <section xml:id="xml.resources.xml"> - <title><literal>xml</literal></title> - <para> - The <literal>xml</literal> resource as returned by - <function>xml_parser_create</function> and - <function>xml_parser_create_ns</function> references an xml - parser instance to be used with the functions provided by this - extension. - </para> - </section> - </section> - - &reference.xml.constants; - - <section xml:id="xml.eventhandlers"> - <title>Event Handlers</title> - <para> - The XML event handlers defined are: - <table> - <title>Supported XML handlers</title> - <tgroup cols="2"> - <thead> - <row> - <entry>PHP function to set handler</entry> - <entry>Event description</entry> - </row> - </thead> - <tbody> - <row> - <entry><function>xml_set_element_handler</function></entry> - <entry> - Element events are issued whenever the XML parser - encounters start or end tags. There are separate handlers - for start tags and end tags. - </entry> - </row> - <row> - <entry> - <function>xml_set_character_data_handler</function> - </entry> - <entry> - Character data is roughly all the non-markup contents of - XML documents, including whitespace between tags. Note - that the XML parser does not add or remove any whitespace, - it is up to the application (you) to decide whether - whitespace is significant. - </entry> - </row> - <row> - <entry> - <function>xml_set_processing_instruction_handler</function> - </entry> - <entry> - PHP programmers should be familiar with processing - instructions (PIs) already. &lt;?php ?&gt; is a processing - instruction, where <replaceable>php</replaceable> is called - the "PI target". The handling of these are - application-specific, except that all PI targets starting - with "XML" are reserved. - </entry> - </row> - <row> - <entry><function>xml_set_default_handler</function></entry> - <entry> - What goes not to another handler goes to the default - handler. You will get things like the XML and document - type declarations in the default handler. - </entry> - </row> - <row> - <entry> - <function>xml_set_unparsed_entity_decl_handler</function> - </entry> - <entry> - This handler will be called for declaration of an unparsed - (NDATA) entity. - </entry> - </row> - <row> - <entry> - <function>xml_set_notation_decl_handler</function> - </entry> - <entry> - This handler is called for declaration of a notation. - </entry> - </row> - <row> - <entry> - <function>xml_set_external_entity_ref_handler</function> - </entry> - <entry> - This handler is called when the XML parser finds a - reference to an external parsed general entity. This can - be a reference to a file or URL, for example. See <link - linkend="example.xml-external-entity">the external entity - example</link> for a demonstration. - </entry> - </row> - </tbody> - </tgroup> - </table> - </para> - </section> - - <section xml:id="xml.case-folding"> - <title>Case Folding</title> - <para> - The element handler functions may get their element names - <glossterm>case-folded</glossterm>. Case-folding is defined by - the XML standard as "a process applied to a sequence of - characters, in which those identified as non-uppercase are - replaced by their uppercase equivalents". In other words, when - it comes to XML, case-folding simply means uppercasing. - </para> - <para> - By default, all the element names that are passed to the handler - functions are case-folded. This behaviour can be queried and - controlled per XML parser with the - <function>xml_parser_get_option</function> and - <function>xml_parser_set_option</function> functions, - respectively. - </para> - </section> - - <section xml:id="xml.error-codes"> - <title>Error Codes</title> - <para> - The following constants are defined for XML error codes (as - returned by <function>xml_parse</function>): - <simplelist> - <member>XML_ERROR_NONE</member> - <member>XML_ERROR_NO_MEMORY</member> - <member>XML_ERROR_SYNTAX</member> - <member>XML_ERROR_NO_ELEMENTS</member> - <member>XML_ERROR_INVALID_TOKEN</member> - <member>XML_ERROR_UNCLOSED_TOKEN</member> - <member>XML_ERROR_PARTIAL_CHAR</member> - <member>XML_ERROR_TAG_MISMATCH</member> - <member>XML_ERROR_DUPLICATE_ATTRIBUTE</member> - <member>XML_ERROR_JUNK_AFTER_DOC_ELEMENT</member> - <member>XML_ERROR_PARAM_ENTITY_REF</member> - <member>XML_ERROR_UNDEFINED_ENTITY</member> - <member>XML_ERROR_RECURSIVE_ENTITY_REF</member> - <member>XML_ERROR_ASYNC_ENTITY</member> - <member>XML_ERROR_BAD_CHAR_REF</member> - <member>XML_ERROR_BINARY_ENTITY_REF</member> - <member>XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF</member> - <member>XML_ERROR_MISPLACED_XML_PI</member> - <member>XML_ERROR_UNKNOWN_ENCODING</member> - <member>XML_ERROR_INCORRECT_ENCODING</member> - <member>XML_ERROR_UNCLOSED_CDATA_SECTION</member> - <member>XML_ERROR_EXTERNAL_ENTITY_HANDLING</member> - </simplelist> - </para> - </section> - - <section xml:id="xml.encoding"> - <title>Character Encoding</title> - <para> - PHP's XML extension supports the <link - xlink:href="&url.unicode;">Unicode</link> character set through - different <glossterm>character encoding</glossterm>s. There are - two types of character encodings, <glossterm>source - encoding</glossterm> and <glossterm>target encoding</glossterm>. - PHP's internal representation of the document is always encoded - with <literal>UTF-8</literal>. - </para> - <para> - Source encoding is done when an XML document is <link - linkend="function.xml-parse">parsed</link>. Upon <link - linkend="function.xml-parser-create">creating an XML - parser</link>, a source encoding can be specified (this encoding - can not be changed later in the XML parser's lifetime). The - supported source encodings are <literal>ISO-8859-1</literal>, - <literal>US-ASCII</literal> and <literal>UTF-8</literal>. The - former two are single-byte encodings, which means that each - character is represented by a single byte. - <literal>UTF-8</literal> can encode characters composed by a - variable number of bits (up to 21) in one to four bytes. The - default source encoding used by PHP is - <literal>ISO-8859-1</literal>. - </para> - <para> - Target encoding is done when PHP passes data to XML handler - functions. When an XML parser is created, the target encoding - is set to the same as the source encoding, but this may be - changed at any point. The target encoding will affect character - data as well as tag names and processing instruction targets. - </para> - <para> - If the XML parser encounters characters outside the range that - its source encoding is capable of representing, it will return - an error. - </para> - <para> - If PHP encounters characters in the parsed XML document that can - not be represented in the chosen target encoding, the problem - characters will be "demoted". Currently, this means that such - characters are replaced by a question mark. - </para> - </section> - - <section xml:id="xml.examples"> - &reftitle.examples; - <para> - Here are some example PHP scripts parsing XML documents. - </para> - <section xml:id="example.xml-structure"> - <title>XML Element Structure Example</title> - <para> - This first example displays the structure of the start elements in - a document with indentation. - <example> - <title>Show XML Element Structure</title> - <programlisting role="php"> -<![CDATA[ -<?php -$file = "data.xml"; -$depth = array(); - -function startElement($parser, $name, $attrs) -{ - global $depth; - for ($i = 0; $i < $depth[$parser]; $i++) { - echo " "; - } - echo "$name\n"; - $depth[$parser]++; -} - -function endElement($parser, $name) -{ - global $depth; - $depth[$parser]--; -} - -$xml_parser = xml_parser_create(); -xml_set_element_handler($xml_parser, "startElement", "endElement"); -if (!($fp = fopen($file, "r"))) { - die("could not open XML input"); -} - -while ($data = fread($fp, 4096)) { - if (!xml_parse($xml_parser, $data, feof($fp))) { - die(sprintf("XML error: %s at line %d", - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser))); - } -} -xml_parser_free($xml_parser); -?> -]]> - </programlisting> - </example> - </para> - </section> - - <section xml:id="example.xml-map-tags"> - <title>XML Tag Mapping Example</title> - <para> - <example> - <title>Map XML to HTML</title> - <para> - This example maps tags in an XML document directly to HTML - tags. Elements not found in the "map array" are ignored. Of - course, this example will only work with a specific XML - document type. - </para> - <para> - <programlisting role="php"> -<![CDATA[ -<?php -$file = "data.xml"; -$map_array = array( - "BOLD" => "B", - "EMPHASIS" => "I", - "LITERAL" => "TT" -); - -function startElement($parser, $name, $attrs) -{ - global $map_array; - if (isset($map_array[$name])) { - echo "<$map_array[$name]>"; - } -} - -function endElement($parser, $name) -{ - global $map_array; - if (isset($map_array[$name])) { - echo "</$map_array[$name]>"; - } -} - -function characterData($parser, $data) -{ - echo $data; -} - -$xml_parser = xml_parser_create(); -// use case-folding so we are sure to find the tag in $map_array -xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); -xml_set_element_handler($xml_parser, "startElement", "endElement"); -xml_set_character_data_handler($xml_parser, "characterData"); -if (!($fp = fopen($file, "r"))) { - die("could not open XML input"); -} - -while ($data = fread($fp, 4096)) { - if (!xml_parse($xml_parser, $data, feof($fp))) { - die(sprintf("XML error: %s at line %d", - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser))); - } -} -xml_parser_free($xml_parser); -?> -]]> - </programlisting> - </para> - </example> - </para> - </section> - - <section xml:id="example.xml-external-entity"> - <title>XML External Entity Example</title> - <para> - This example highlights XML code. It illustrates how to use an - external entity reference handler to include and parse other - documents, as well as how PIs can be processed, and a way of - determining "trust" for PIs containing code. - </para> - <para> - XML documents that can be used for this example are found below - the example (<filename>xmltest.xml</filename> and - <filename>xmltest2.xml</filename>.) - </para> - <para> - <example> - <title>External Entity Example</title> - <programlisting role="php"> -<![CDATA[ -<?php -$file = "xmltest.xml"; - -function trustedFile($file) -{ - // only trust local files owned by ourselves - if (!eregi("^([a-z]+)://", $file) - && fileowner($file) == getmyuid()) { - return true; - } - return false; -} - -function startElement($parser, $name, $attribs) -{ - echo "&lt;<font color=\"#0000cc\">$name</font>"; - if (count($attribs)) { - foreach ($attribs as $k => $v) { - echo " <font color=\"#009900\">$k</font>=\"<font - color=\"#990000\">$v</font>\""; - } - } - echo "&gt;"; -} - -function endElement($parser, $name) -{ - echo "&lt;/<font color=\"#0000cc\">$name</font>&gt;"; -} - -function characterData($parser, $data) -{ - echo "<b>$data</b>"; -} - -function PIHandler($parser, $target, $data) -{ - switch (strtolower($target)) { - case "php": - global $parser_file; - // If the parsed document is "trusted", we say it is safe - // to execute PHP code inside it. If not, display the code - // instead. - if (trustedFile($parser_file[$parser])) { - eval($data); - } else { - printf("Untrusted PHP code: <i>%s</i>", - htmlspecialchars($data)); - } - break; - } -} - -function defaultHandler($parser, $data) -{ - if (substr($data, 0, 1) == "&" && substr($data, -1, 1) == ";") { - printf('<font color="#aa00aa">%s</font>', - htmlspecialchars($data)); - } else { - printf('<font size="-1">%s</font>', - htmlspecialchars($data)); - } -} - -function externalEntityRefHandler($parser, $openEntityNames, $base, $systemId, - $publicId) { - if ($systemId) { - if (!list($parser, $fp) = new_xml_parser($systemId)) { - printf("Could not open entity %s at %s\n", $openEntityNames, - $systemId); - return false; - } - while ($data = fread($fp, 4096)) { - if (!xml_parse($parser, $data, feof($fp))) { - printf("XML error: %s at line %d while parsing entity %s\n", - xml_error_string(xml_get_error_code($parser)), - xml_get_current_line_number($parser), $openEntityNames); - xml_parser_free($parser); - return false; - } - } - xml_parser_free($parser); - return true; - } - return false; -} - -function new_xml_parser($file) -{ - global $parser_file; - - $xml_parser = xml_parser_create(); - xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 1); - xml_set_element_handler($xml_parser, "startElement", "endElement"); - xml_set_character_data_handler($xml_parser, "characterData"); - xml_set_processing_instruction_handler($xml_parser, "PIHandler"); - xml_set_default_handler($xml_parser, "defaultHandler"); - xml_set_external_entity_ref_handler($xml_parser, "externalEntityRefHandler"); - - if (!($fp = @fopen($file, "r"))) { - return false; - } - if (!is_array($parser_file)) { - settype($parser_file, "array"); - } - $parser_file[$xml_parser] = $file; - return array($xml_parser, $fp); -} - -if (!(list($xml_parser, $fp) = new_xml_parser($file))) { - die("could not open XML input"); -} - -echo "<pre>"; -while ($data = fread($fp, 4096)) { - if (!xml_parse($xml_parser, $data, feof($fp))) { - die(sprintf("XML error: %s at line %d\n", - xml_error_string(xml_get_error_code($xml_parser)), - xml_get_current_line_number($xml_parser))); - } -} -echo "</pre>"; -echo "parse complete\n"; -xml_parser_free($xml_parser); - -?> -]]> - </programlisting> - </example> - </para> - <para> - <example> - <title>xmltest.xml</title> - <programlisting role="xml"> -<![CDATA[ -<?xml version='1.0'?> -<!DOCTYPE chapter SYSTEM "/just/a/test.dtd" [ -<!ENTITY plainEntity "FOO entity"> -<!ENTITY systemEntity SYSTEM "xmltest2.xml"> -]> -<chapter> - <TITLE>Title &plainEntity;</TITLE> - <para> - <informaltable> - <tgroup cols="3"> - <tbody> - <row><entry>a1</entry><entry morerows="1">b1</entry><entry>c1</entry></row> - <row><entry>a2</entry><entry>c2</entry></row> - <row><entry>a3</entry><entry>b3</entry><entry>c3</entry></row> - </tbody> - </tgroup> - </informaltable> - </para> - &systemEntity; - <section id="about"> - <title>About this Document</title> - <para> - <!-- this is a comment --> - <?php echo 'Hi! This is PHP version ' . phpversion(); ?> - </para> - </section> -</chapter> -]]> - </programlisting> - </example> - </para> - <para> - This file is included from <filename>xmltest.xml</filename>: - <example> - <title>xmltest2.xml</title> - <programlisting role="xml"> -<![CDATA[ -<?xml version="1.0"?> -<!DOCTYPE foo [ -<!ENTITY testEnt "test entity"> -]> -<foo> - <element attrib="value"/> - &testEnt; - <?php echo "This is some more PHP code being executed."; ?> -</foo> -]]> - </programlisting> - </example> - </para> - </section> - </section> - </partintro> - -&reference.xml.functions.entities; - - </reference> +</reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xmlreader/constants.xml?r1=1.4&r2=1.4.2.1&diff_format=u Index: phpdoc/en/reference/xmlreader/constants.xml diff -u phpdoc/en/reference/xmlreader/constants.xml:1.4 phpdoc/en/reference/xmlreader/constants.xml:1.4.2.1 --- phpdoc/en/reference/xmlreader/constants.xml:1.4 Wed Jun 20 22:25:37 2007 +++ phpdoc/en/reference/xmlreader/constants.xml Sat Dec 8 22:38:55 2007 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<section xml:id="xmlreader.constants" xmlns="http://docbook.org/ns/docbook"> +<!-- $Revision: 1.4.2.1 $ --> +<appendix xml:id="xmlreader.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <warning> @@ -213,7 +213,7 @@ </tbody> </tgroup> </table> -</section> +</appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xmlwriter/reference.xml?r1=1.4.2.1&r2=1.4.2.2&diff_format=u Index: phpdoc/en/reference/xmlwriter/reference.xml diff -u phpdoc/en/reference/xmlwriter/reference.xml:1.4.2.1 phpdoc/en/reference/xmlwriter/reference.xml:1.4.2.2 --- phpdoc/en/reference/xmlwriter/reference.xml:1.4.2.1 Wed Oct 3 11:41:16 2007 +++ phpdoc/en/reference/xmlwriter/reference.xml Sat Dec 8 22:38:55 2007 @@ -1,28 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4.2.1 $ --> -<!-- Purpose: xml --> -<!-- Membership: pecl --> -<!-- Generated by xml_proto.php v2.4. Found in /scripts directory of phpdoc. --> +<!-- $Revision: 1.4.2.2 $ --> + <reference xml:id="ref.xmlwriter" xmlns="http://docbook.org/ns/docbook"> - <title>XMLWriter Functions</title> - <titleabbrev>XMLWriter</titleabbrev> + <title>XMLWriter &Functions;</title> <partintro> - <section xml:id="xmlwriter.intro"> - &reftitle.intro; - <para> - This is the XMLWriter extension. It wraps the libxml xmlWriter API. - </para> - <para> - This extension represents a writer that provides a non-cached, - forward-only means of generating streams or files containing XML data. - </para> - <para> - This extension can be used in an object oriented style or a procedural - one. Every method documented describes the alternative procedural call. - </para> - </section> + <!-- FIXME: More classess needing markup upgrade --> <section xml:id='xmlwriter.classes'> &reftitle.classes; <para> @@ -165,22 +149,6 @@ </section> </section> </section> - - - <section xml:id="xmlwriter.resources"> - &reftitle.resources; - <para> - There is one resource used by the procedural version of the XMLWriter - extension: returned by <function>xmlwriter_open_memory</function> or - <function>xmlwriter_open_uri</function>. - </para> - </section> - - <section xml:id="xmlwriter.constants"> - &reftitle.constants; - &no.constants; - </section> - </partintro> &reference.xmlwriter.functions.entities; </reference> http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xsl/constants.xml?r1=1.4&r2=1.4.2.1&diff_format=u Index: phpdoc/en/reference/xsl/constants.xml diff -u phpdoc/en/reference/xsl/constants.xml:1.4 phpdoc/en/reference/xsl/constants.xml:1.4.2.1 --- phpdoc/en/reference/xsl/constants.xml:1.4 Wed Jun 20 22:25:37 2007 +++ phpdoc/en/reference/xsl/constants.xml Sat Dec 8 22:38:56 2007 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.4 $ --> -<section xml:id="xsl.constants" xmlns="http://docbook.org/ns/docbook"> +<!-- $Revision: 1.4.2.1 $ --> +<appendix xml:id="xsl.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <variablelist> @@ -79,7 +79,7 @@ </listitem> </varlistentry> </variablelist> -</section> +</appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xsl/reference.xml?r1=1.12.2.1&r2=1.12.2.2&diff_format=u Index: phpdoc/en/reference/xsl/reference.xml diff -u phpdoc/en/reference/xsl/reference.xml:1.12.2.1 phpdoc/en/reference/xsl/reference.xml:1.12.2.2 --- phpdoc/en/reference/xsl/reference.xml:1.12.2.1 Wed Oct 3 11:41:17 2007 +++ phpdoc/en/reference/xsl/reference.xml Sat Dec 8 22:38:56 2007 @@ -1,34 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.12.2.1 $ --> -<!-- Purpose: xml --> -<!-- Membership: bundled, external --> +<!-- $Revision: 1.12.2.2 $ --> <reference xml:id="ref.xsl" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>XSL functions</title> - <titleabbrev>XSL</titleabbrev> + <title>XSL &Functions;</title> <partintro> - <section xml:id="xsl.intro"> - &reftitle.intro; - <para> - The XSL extension implements the XSL standard, performing <link - xlink:href="&url.xslt;">XSLT transformations</link> using the <link - xlink:href="&url.libxslt;">libxslt library</link> - </para> - </section> - - <section xml:id="xsl.requirements"> - &reftitle.required; - <para> - This extension uses <productname>libxslt</productname> which can be - found at <link xlink:href="&url.libxslt;">&url.libxslt;</link>. libxslt - version 1.1.0 or greater is required. - </para> - </section> - - &reference.xsl.configure; - + <!-- FIXME: Upgrade to the new oo markup --> <section xml:id='xsl.classes'> &reftitle.classes; <para> @@ -81,63 +59,12 @@ </section> </section> - <section xml:id="xsl.examples"> - &reftitle.examples; - <para> - Many examples in this reference require both an XML and an XSL file. - We will use <filename>collection.xml</filename> and - <filename>collection.xsl</filename> that contains the following: - </para> - <para> - <example> - <title>collection.xml</title> - <programlisting role="xml"> -<![CDATA[ -<collection> - <cd> - <title>Fight for your mind</title> - <artist>Ben Harper</artist> - <year>1995</year> - </cd> - <cd> - <title>Electric Ladyland</title> - <artist>Jimi Hendrix</artist> - <year>1997</year> - </cd> -</collection> -]]> - </programlisting> - </example> - <example> - <title>collection.xsl</title> - <programlisting role="xml"> -<![CDATA[ -<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> - <xsl:param name="owner" select="'Nicolas Eliaszewicz'"/> - <xsl:output method="html" encoding="iso-8859-1" indent="no"/> - <xsl:template match="collection"> - Hey! Welcome to <xsl:value-of select="$owner"/>'s sweet CD collection! - <xsl:apply-templates/> - </xsl:template> - <xsl:template match="cd"> - <h1><xsl:value-of select="title"/></h1> - <h2>by <xsl:value-of select="artist"/> - <xsl:value-of select="year"/></h2> - <hr /> - </xsl:template> -</xsl:stylesheet> -]]> - </programlisting> - </example> - </para> - </section> - - &reference.xsl.constants; - </partintro> &reference.xsl.functions.entities; </reference> + <!-- Keep this comment at the end of the file Local variables: mode: sgml @@ -158,3 +85,4 @@ vim: et tw=78 syn=sgml vi: ts=1 sw=1 --> + http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xslt/constants.xml?r1=1.5&r2=1.5.2.1&diff_format=u Index: phpdoc/en/reference/xslt/constants.xml diff -u phpdoc/en/reference/xslt/constants.xml:1.5 phpdoc/en/reference/xslt/constants.xml:1.5.2.1 --- phpdoc/en/reference/xslt/constants.xml:1.5 Wed Jun 20 22:25:37 2007 +++ phpdoc/en/reference/xslt/constants.xml Sat Dec 8 22:38:56 2007 @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.5 $ --> -<section xml:id="xslt.constants" xmlns="http://docbook.org/ns/docbook"> +<!-- $Revision: 1.5.2.1 $ --> +<appendix xml:id="xslt.constants" xmlns="http://docbook.org/ns/docbook"> &reftitle.constants; &extension.constants; <variablelist> @@ -86,7 +86,7 @@ </listitem> </varlistentry> </variablelist> -</section> +</appendix> <!-- Keep this comment at the end of the file Local variables: http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xslt/reference.xml?r1=1.16.2.1&r2=1.16.2.2&diff_format=u Index: phpdoc/en/reference/xslt/reference.xml diff -u phpdoc/en/reference/xslt/reference.xml:1.16.2.1 phpdoc/en/reference/xslt/reference.xml:1.16.2.2 --- phpdoc/en/reference/xslt/reference.xml:1.16.2.1 Wed Oct 3 11:41:17 2007 +++ phpdoc/en/reference/xslt/reference.xml Sat Dec 8 22:38:56 2007 @@ -1,82 +1,12 @@ <?xml version="1.0" encoding="iso-8859-1"?> -<!-- $Revision: 1.16.2.1 $ --> -<!-- Purpose: xml --> -<!-- Membership: bundled, external --> +<!-- $Revision: 1.16.2.2 $ --> - <reference xml:id="ref.xslt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>XSLT Functions</title> - <titleabbrev>XSLT</titleabbrev> +<reference xml:id="ref.xslt" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>XSLT &Functions;</title> - <partintro> - <section xml:id="xslt.intro"> - &reftitle.intro; - <para> - This PHP extension provides a processor independent API to XSLT - transformations. Currently this extension only supports the Sablotron - library from the Ginger Alliance. Support is planned for other - libraries, such as the Xalan library or the libxslt library. - </para> - <para> - XSLT (Extensible Stylesheet Language (XSL) Transformations) is a - language for transforming XML documents into other XML documents. - It is a standard defined by The World Wide Web Consortium (W3C). - Information about XSLT and related technologies can be - found at <link xlink:href="&url.xslt;">&url.xslt;</link>. - </para> - <note> - <simpara> - This extension is different than the sablotron extension distributed with - versions of PHP prior to PHP 4.1.0, currently only the new XSLT extension in - PHP 4.1.0 is supported. If you need support for the old extension, please ask - your questions on the PHP mailing lists. - </simpara> - </note> - <note> - <para> - &pecl.moved-ver;5.0.0. - </para> - </note> - <note> - <simpara> - If you need xslt support with PHP 5 you can use the - <link linkend="ref.xsl">XSL</link> extension. - </simpara> - </note> - </section> + &reference.xslt.functions.entities; - <section xml:id="xslt.requirements"> - &reftitle.required; - <para> - This extension uses <productname>Sablotron</productname> - and <productname>expat</productname>, which can both be - found at <link - xlink:href="&url.sablotron;">&url.sablotron;</link>. Binaries - are provided as well as source. - </para> - </section> - - &reference.xslt.configure; - - <section xml:id="xslt.configuration"> - &reftitle.runtime; - &no.config; - </section> - - <section xml:id="xslt.resources"> - &reftitle.resources; - <para> - This extension defines a XSLT processor resource returned by - <function>xslt_create</function>. - </para> - </section> - - &reference.xslt.constants; - - </partintro> - -&reference.xslt.functions.entities; - - </reference> +</reference> <!-- Keep this comment at the end of the file Local variables: mode: sgml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/domxml/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/domxml/book.xml +++ phpdoc/en/reference/domxml/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/domxml/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/domxml/setup.xml +++ phpdoc/en/reference/domxml/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/libxml/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/libxml/book.xml +++ phpdoc/en/reference/libxml/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/libxml/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/libxml/setup.xml +++ phpdoc/en/reference/libxml/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/qtdom/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/qtdom/book.xml +++ phpdoc/en/reference/qtdom/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/qtdom/constants.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/qtdom/constants.xml +++ phpdoc/en/reference/qtdom/constants.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/qtdom/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/qtdom/setup.xml +++ phpdoc/en/reference/qtdom/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sca/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/sca/book.xml +++ phpdoc/en/reference/sca/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sca/examples.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/sca/examples.xml +++ phpdoc/en/reference/sca/examples.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sca/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/sca/setup.xml +++ phpdoc/en/reference/sca/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sdo_das_xml/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/sdo_das_xml/book.xml +++ phpdoc/en/reference/sdo_das_xml/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sdo_das_xml/constants.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/sdo_das_xml/constants.xml +++ phpdoc/en/reference/sdo_das_xml/constants.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sdo_das_xml/examples.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/sdo_das_xml/examples.xml +++ phpdoc/en/reference/sdo_das_xml/examples.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/sdo_das_xml/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/sdo_das_xml/setup.xml +++ phpdoc/en/reference/sdo_das_xml/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/simplexml/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/simplexml/book.xml +++ phpdoc/en/reference/simplexml/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/simplexml/constants.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/simplexml/constants.xml +++ phpdoc/en/reference/simplexml/constants.xml <?xml version='1.0' encoding='iso-8859-1'?> <!-- $Revision: 1.1 $ --> <section id="simplexml.constants"> &reftitle.constants; &extension.constants; <variablelist> <varlistentry> <term> <constant>LIBXML_NOENT</constant> (<type>integer</type>) </term> <listitem> <simpara> Substitute entities </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>LIBXML_DTDLOAD</constant> (<type>integer</type>) </term> <listitem> <simpara> Load the external subset </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>LIBXML_DTDATTR</constant> (<type>integer</type>) </term> <listitem> <simpara> Default DTD attributes </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>LIBXML_DTDVALID</constant> (<type>integer</type>) </term> <listitem> <simpara> Validate with the DTD </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>LIBXML_NOERROR</constant> (<type>integer</type>) </term> <listitem> <simpara> Suppress error reports </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>LIBXML_NOWARNING</constant> (<type>integer</type>) </term> <listitem> <simpara> Suppress warning reports </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>LIBXML_NOBLANKS</constant> (<type>integer</type>) </term> <listitem> <simpara> Remove blank nodes </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>LIBXML_XINCLUDE</constant> (<type>integer</type>) </term> <listitem> <simpara> Implement XInclude substitition </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>LIBXML_NSCLEAN</constant> (<type>integer</type>) </term> <listitem> <simpara> Remove redundant namespaces declarations </simpara> </listitem> </varlistentry> <varlistentry> <term> <constant>LIBXML_NOCDATA</constant> (<type>integer</type>) </term> <listitem> <simpara> Merge CDATA as text nodes </simpara> </listitem> </varlistentry> </variablelist> <note> <para> These constants were added in PHP 5.1.0. </para> </note> </section> <!-- 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/en/reference/simplexml/examples.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/simplexml/examples.xml +++ phpdoc/en/reference/simplexml/examples.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/simplexml/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/simplexml/setup.xml +++ phpdoc/en/reference/simplexml/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/wddx/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/wddx/book.xml +++ phpdoc/en/reference/wddx/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/wddx/constants.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/wddx/constants.xml +++ phpdoc/en/reference/wddx/constants.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/wddx/examples.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/wddx/examples.xml +++ phpdoc/en/reference/wddx/examples.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/wddx/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/wddx/setup.xml +++ phpdoc/en/reference/wddx/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xml/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xml/book.xml +++ phpdoc/en/reference/xml/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xml/case-folding.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xml/case-folding.xml +++ phpdoc/en/reference/xml/case-folding.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xml/encoding.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xml/encoding.xml +++ phpdoc/en/reference/xml/encoding.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xml/error-codes.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xml/error-codes.xml +++ phpdoc/en/reference/xml/error-codes.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xml/eventhandlers.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xml/eventhandlers.xml +++ phpdoc/en/reference/xml/eventhandlers.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xml/examples.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xml/examples.xml +++ phpdoc/en/reference/xml/examples.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xml/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xml/setup.xml +++ phpdoc/en/reference/xml/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xmlreader/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xmlreader/book.xml +++ phpdoc/en/reference/xmlreader/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xmlreader/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xmlreader/setup.xml +++ phpdoc/en/reference/xmlreader/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xmlreader/xmlreader.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xmlreader/xmlreader.xml +++ phpdoc/en/reference/xmlreader/xmlreader.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xmlwriter/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xmlwriter/book.xml +++ phpdoc/en/reference/xmlwriter/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xmlwriter/constants.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xmlwriter/constants.xml +++ phpdoc/en/reference/xmlwriter/constants.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xmlwriter/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xmlwriter/setup.xml +++ phpdoc/en/reference/xmlwriter/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xsl/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xsl/book.xml +++ phpdoc/en/reference/xsl/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xsl/examples.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xsl/examples.xml +++ phpdoc/en/reference/xsl/examples.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xsl/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xsl/setup.xml +++ phpdoc/en/reference/xsl/setup.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xslt/book.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xslt/book.xml +++ phpdoc/en/reference/xslt/book.xml http://cvs.php.net/viewvc.cgi/phpdoc/en/reference/xslt/setup.xml?view=markup&rev=1.1 Index: phpdoc/en/reference/xslt/setup.xml +++ phpdoc/en/reference/xslt/setup.xml
« previous php.doc.cvs (#566) next »