Hiererchical Data Source

Top Previous Topic Next Topic  Print this topic

<das:hiererchical-data-source> element represents a sequence of elements with the same name and on the same level in a XML type data source.

 

The following XML will be described in a processing job as a tree of hierarchical data sources:

 

<?xml version="1.0" encoding="utf-8"?>

<books>

 

<book id="1">

  <title>Lord Of the Rings.</title>

  <info>

        <country>United Kingdom</country>

          <author>J. R. R. Tolkien</author>

  </info>

 </book>

 

<book id="2">

  <title>Principia Mathematica</title>

  <info>

        <country>U.S.A</country>

       <author>Bertrand Russell</author>

       <author>Alfred North Whitehead</author>

  </info>

</book>

 

<book id="3">

  <title>Black Holes, White Dwarfs and Neutron Stars: The Physics of Compact Objects</title>

  <info>

        <country>U.S.A</country>

       <author>Stuart L. Shapiro</author>

       <author>Saul A. Teukolsky</author>

  </info>

</book>

</books>

 

 

The hierarchical data source tree generated by the previous XML will look as follows:

 

 

<das:hierarchical-data-source id="booksds" source="src1" name="books">

       <das:hierarchical-data-source id="bookds" name="book">

               <das:field id="fld1" name="id"/>

               <das:hierarchical-data-source id="titleds" name="title">

                       <das:field id="fld2" name="text()"/>

               </das:hierarchical-data-source>

               <das:hierarchical-data-source id="infods" name="info">

                       <das:hierarchical-data-source id="authords" name="author">

                               <das:field id="fld3" name="text()"/>

                       </das:hierarchical-data-source>

                       <das:hierarchical-data-source id="countryds" name="country">

                               <das:field id="fld4" name="text()"/>

                       </das:hierarchical-data-source>

               </das:hierarchical-data-source>

       </das:hierarchical-data-source>

</das:hierarchical-data-source>

 

 

Attributes:

 

id - unique identifier of this resource in the current processing job.

name - the name of the XML elements iterated by the hierarchical-data-source.

 

 

Children Elements:

 

<das:field> - describes the attributes of the iterated hierarchical-data-source elements.

<das:hierarchical-data-source> - this name can also represent the children data source elements.