Create the data schema (xsd) from a PHP data source

After you write or modify a PHP report program, generate the data schema (xsd) file. This file is required input for the Report Design Document.

The data schema (xsd) file is based on the data model in your PHP report application source file (php). This xsd file is used in the report design document (4rp) to populate the Data View, providing details about the fields that will be streamed by the application. The schema contains the list of database columns that make up your data record, as well as grouping details.

When you use BAM, the data schema file is created at compile time. For example, the Account.php file shown in Quick Start: Generate a PHP report application results in the schema file shown here:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="" elementFormDefault="qualified">
    <xs:element name="Account">
                <xs:element name="Record1" minOccurs="0" maxOccurs="unbounded">
                            <xs:element name="account_userid" type="xs:string"/>
                            <xs:element name="account_email" type="xs:string"/>
                            <xs:element name="account_firstname" type="xs:string"/>
                            <xs:element name="account_lastname" type="xs:string"/>
                            <xs:element name="account_acstatus" type="xs:string"/>
                            <xs:element name="account_addr1" type="xs:string"/>
                            <xs:element name="account_addr2" type="xs:string"/>
                            <xs:element name="account_city" type="xs:string"/>
                            <xs:element name="account_state" type="xs:string"/>
                            <xs:element name="account_zip" type="xs:string"/>
                            <xs:element name="account_country" type="xs:string"/>
                            <xs:element name="account_phone" type="xs:string"/>
                            <xs:element name="account_langpref" type="xs:string"/>
                            <xs:element name="account_favcategory" type="xs:string"/>
                            <xs:element name="account_mylistopt" type="xs:int"/>
                            <xs:element name="account_banneropt" type="xs:int"/>
                            <xs:element name="account_sourceapp" type="xs:string"/>