Dynamic View Services > Specifying Dynamic View Types > Basic Specification > XML View Specification
 
XML View Specification
The specification of the dynamic view type can be described with an XML document. This document can be a file, a string, or a Document Object Model (DOM). See class IlsMvServer for details.
The XML document must be validated with the ILS XML Schema. This schema can be found in the ILSHOME/data directory: ils.xsd
Example
The following table shows the XML equivalent of an view specification .ils file written in View Specification Language.
ILS versus XML View Specification
ILS Specification
ILS XML View Specification
 
<?xml version='1.0' encoding='UTF-8'?>
 
<ils:view-type-spec
xmlns:ils='http://www.roguewave.com/schemas/server/1.0'>
view CompanyTree:
<ils:view-header type="CompanyTree" />
subscribe origin Company:
<ils:subscribe origin='true' type='Company'>
represent TreeR root:
<ils:represent class="TreeR" name="root">
string label = identifier;
<ils:attr-mapping type="string" name="label">
<ils:path><ils:simple-path name="identifier"/></ils:path>
 
</ils:attr-mapping>
 
</ils:represent>
propagate departements;
<ils:propagate rel-name="departements"/>
 
</ils:subscribe>
 
 
subscribe Department:
<ils:subscribe type='Department'>
represent TreeItemR item:
<ils:represent class="TreeItemR" name="item">
Ref<TreeR> ownerTree = company->root;
<ils:ref-mapping class="TreeR" name="ownerTree">
<ils:repres-path>
 
<ils:path>
 
<ils:simple-path name="company"/>
 
</ils:path>
 
<ils:rp-name name="root"/>
 
</ils:repres-path>
 
</ils:ref-mapping>
string label = name;
<ils:attr-mapping type="string" name="label">
 
<ils:path><ils:simple-path name="name"/></ils:path>
 
</ils:attr-mapping>
 
</ils:represent>
 
</ils:subscribe>
 
</ils:view-type-spec>
An example of a dynamic view type that uses all the ILS XML tag can be found in the dynserver demo in the following directory:
ILSHOME/demo/dynserver/network/data/netgraph.xml

Version 6.3
Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.