⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdo.examples.html

📁 php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Examples</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="sdo.limitations.html">Limitations</a></div> <div class="next" style="text-align: right; float: right;"><a href="sdo.sample.getset.html">Setting and Getting Property Values</a></div> <div class="up"><a href="book.sdo.html">SDO</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div> <h1>Examples</h1><h2>Table of Contents</h2><ul class="chunklist chunklist_chapter"><li><a href="sdo.sample.getset.html">Setting and Getting Property Values</a></li><li><a href="sdo.sample.sequence.html">Working with Sequenced Data Objects</a></li><li><a href="sdo.sample.reflection.html">Reflecting on Service Data Objects</a></li></ul> <div id="sdo.examples-basic" class="section">  <h2 class="title">Basic Usage</h2>  <p class="para">   The examples below assume an SDO created with the schema   and instance information shown below, using the XML Data Access Service.  </p>  <p class="para">   The instance document below describes a single company,    called &#039;MegaCorp&#039;, which contains a single department,    called &#039;Advanced Technologies&#039;.   The Advanced Technologies department contains three employees.   The company employeeOfTheMonth is referencing the second employee,   &#039;Jane Doe&#039;.  </p>  <p class="para">   <div class="example-contents"><div class="cdata"><pre>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt; &lt;company xmlns=&quot;companyNS&quot; name=&quot;MegaCorp&quot;   employeeOfTheMonth=&quot;E0003&quot;&gt;  &lt;departments name=&quot;Advanced Technologies&quot; location=&quot;NY&quot; number=&quot;123&quot;&gt;    &lt;employees name=&quot;John Jones&quot; SN=&quot;E0001&quot;/&gt;    &lt;employees name=&quot;Jane Doe&quot; SN=&quot;E0003&quot;/&gt;    &lt;employees name=&quot;Al Smith&quot; SN=&quot;E0004&quot; manager=&quot;true&quot;/&gt;  &lt;/departments&gt;&lt;/company&gt;</pre></div>   </div>  </p>  <p class="para"> The root element of the schema is a company. The company contains departments, and   each department contains employees. Each element has a number of attributes to store   things like name, serial number, and so on. Finally, the company also has an IDREF   attribute which identifies one of the employees as the &#039;employeeOfTheMonth&#039;.  </p>  <p class="para">   <div class="example-contents"><div class="cdata"><pre>&lt;xsd:schema    xmlns:xsd=&quot;http://www.w3.org/2001/XMLSchema&quot;  xmlns:sdo=&quot;commonj.sdo&quot;  xmlns:sdoxml=&quot;commonj.sdo/xml&quot;  xmlns:company=&quot;companyNS&quot;  targetNamespace=&quot;companyNS&quot;&gt;  &lt;xsd:element name=&quot;company&quot; type=&quot;company:CompanyType&quot;/&gt;  &lt;xsd:complexType name=&quot;CompanyType&quot;&gt;    &lt;xsd:sequence&gt;      &lt;xsd:element name=&quot;departments&quot; type=&quot;company:DepartmentType&quot;         maxOccurs=&quot;unbounded&quot;/&gt;    &lt;/xsd:sequence&gt;    &lt;xsd:attribute name=&quot;name&quot; type=&quot;xsd:string&quot;/&gt;    &lt;xsd:attribute name=&quot;employeeOfTheMonth&quot; type=&quot;xsd:IDREF&quot;       sdoxml:propertyType=&quot;company:EmployeeType&quot;/&gt;   &lt;/xsd:complexType&gt;  &lt;xsd:complexType name=&quot;DepartmentType&quot;&gt;    &lt;xsd:sequence&gt;      &lt;xsd:element name=&quot;employees&quot; type=&quot;company:EmployeeType&quot;          maxOccurs=&quot;unbounded&quot;/&gt;    &lt;/xsd:sequence&gt;    &lt;xsd:attribute name=&quot;name&quot; type=&quot;xsd:string&quot;/&gt;    &lt;xsd:attribute name=&quot;location&quot; type=&quot;xsd:string&quot;/&gt;    &lt;xsd:attribute name=&quot;number&quot; type=&quot;xsd:int&quot;/&gt;  &lt;/xsd:complexType&gt;  &lt;xsd:complexType name=&quot;EmployeeType&quot;&gt;    &lt;xsd:attribute name=&quot;name&quot; type=&quot;xsd:string&quot;/&gt;    &lt;xsd:attribute name=&quot;SN&quot; type=&quot;xsd:ID&quot;/&gt;    &lt;xsd:attribute name=&quot;manager&quot; type=&quot;xsd:boolean&quot;/&gt;  &lt;/xsd:complexType&gt;&lt;/xsd:schema&gt;</pre></div>   </div>  </p>  <p class="para">The XML Data Access Service maps the schema to an SDO. Attributes such as &quot;name&quot;   become primitive properties, the sequence of employees becomes a many-valued   containment relationship, and so on. Note that the containment relationships are   expressed as one complex type within another, whereas non-containment references are   expressed in terms of ID and IDREF, with a special   <strong class="command">sdoxml:propertyType</strong> attribute specifying the type of the   non-containment reference.  </p> </div>   </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="sdo.limitations.html">Limitations</a></div> <div class="next" style="text-align: right; float: right;"><a href="sdo.sample.getset.html">Setting and Getting Property Values</a></div> <div class="up"><a href="book.sdo.html">SDO</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -