The NPVModelData Namespace
Last updated: 4th October 2004
Chapter 23 - Excel, XML and Web Services contains an example XML file used to import data into a simple spreadsheet model for calculating the net present value of a sequence of cash flows. The XML in that sample file uses this URL as its namespace identifier, so a human reader can browse to this URL to find a description of the namespace.
The sample XML data file is shown below:
<?xml version="1.0" encoding="UTF-8" ?>
<NPVModelData xmlns="http://www.oaltd.co.uk/ProExcelDev/NPVModelData">
<ControlInformation>
<SubmittedBy>Stephen Bullen</SubmittedBy>
<Email>stephen@oaltd.co.uk</Email>
<Comment>Fee Fi Fo Fum</Comment>
</ControlInformation>
<InputData>
<Rate>0.05</Rate>
<Flows>10</Flows>
<Flows>20</Flows>
<Flows>30</Flows>
<Flows>40</Flows>
</InputData>
</NPVModelData>
The following table gives a description of each element and tag:
Tag | Description |
NPVModelData | The root element, being a container for all the model's information. There must be one and only one of these elements. |
ControlInformation | A container element for information about the person submitting the data. There must be one and only one of these elements. |
SubmittedBy | The name of the person submitting the data. There must be one and only one of these elements. |
The email address of the person submitting the data. There must be one and only one of these elements. | |
Comment | A comment provided with the submission. This element is optional, but if provided can only occur once. |
InputData | A container element for the source data used by the model. |
Rate | The rate of inflation to use in the Net Present Value calculation. There must be one and only one of these elements. |
Flows | The cash flows to use in the Net Present Value calculation. There can be any number of these elements, but there must be at least two. |
The XSD file for this namespace is shown below and can be downloaded from here.
<?xml version="1.0" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.oaltd.co.uk/ProExcelDev/NPVModelData"
xmlns="http://www.oaltd.co.uk/ProExcelDev/NPVModelData"
elementFormDefault="qualified" >
<xsd:element name="NPVModelData">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ControlInformation">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SubmittedBy" type="xsd:string" />
<xsd:element name="Email" type="xsd:string" />
<xsd:element name="Comment" type="xsd:string" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="InputData">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Rate" type="xsd:double" />
<xsd:element name="Flows" type="xsd:double" minOccurs="2" maxOccurs="unbounded"
/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>