IT. Expert System.


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="" 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.


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








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

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: 8854 / 159215712. Delta: 0.03292 с