IT. Expert System.

PHP

Basic usage


Basic usage

The examples below assume an SDO created with the schema and instance information shown below, using the XML Data Access Service.

The instance document below describes a single company, called 'MegaCorp', which contains a single department, called 'Advanced Technologies'. The Advanced Technologies department contains three employees. The company employeeOfTheMonth is referencing the second employee, 'Jane Doe'.

<?xml version="1.0" encoding="UTF-8" ?> <company xmlns="companyNS" name="MegaCorp" employeeOfTheMonth="E0003"> <departments name="Advanced Technologies" location="NY" number="123">  <employees name="John Jones" SN="E0001"/>  <employees name="Jane Doe" SN="E0003"/>  <employees name="Al Smith" SN="E0004" manager="true"/> </departments> </company>

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 'employeeOfTheMonth'.

<xsd:schema  xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml" xmlns:company="companyNS" targetNamespace="companyNS"> <xsd:element name="company" type="company:CompanyType"/> <xsd:complexType name="CompanyType">  <xsd:sequence>  <xsd:element name="departments" type="company:DepartmentType"   maxOccurs="unbounded"/>  </xsd:sequence>  <xsd:attribute name="name" type="xsd:string"/>  <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF"  sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType> <xsd:complexType name="DepartmentType">  <xsd:sequence>  <xsd:element name="employees" type="company:EmployeeType"   maxOccurs="unbounded"/>  </xsd:sequence>  <xsd:attribute name="name" type="xsd:string"/>  <xsd:attribute name="location" type="xsd:string"/>  <xsd:attribute name="number" type="xsd:int"/> </xsd:complexType> <xsd:complexType name="EmployeeType">  <xsd:attribute name="name" type="xsd:string"/>  <xsd:attribute name="SN" type="xsd:ID"/>  <xsd:attribute name="manager" type="xsd:boolean"/> </xsd:complexType> </xsd:schema>

The XML Data Access Service maps the schema to an SDO. Attributes such as "name" 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 sdoxml:propertyType attribute specifying the type of the non-containment reference.



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 453 / 96392507. Delta: 0.01952 с