axlSDBSetChild
axlSDBSetChild(x_SDBH t_name t_value) =>x_SDBH/ nil
Description
Creates a new child element under the provided setup database handle.
Arguments
|
Setup database handle under which a new child element is to be added |
||
|
Name of the new element. Following are the naming conventions: |
||
Value Returned
|
The setup database handle of the child element is not returned. |
||
Examples
Creates a new child element under the provided setup database handle.
;; given mainSDBH pointing to current setup
extensionSDBH = axlSDBPutExtension( mainSDBH "test extension")
kingSDBH = axlSDBSetChild( extensionSDBH "King" "Louis XIV")
Any name is either single or multi-entry. A single-entry element is differentiated by its name only, whereas a multi-entry element is differentiated by both name and value. All children of a particular element must be unique.
extensionSDBH = axlSDBPutExtension( mainSDBH "test extension")
kingSDBH = axlSDBSetChild( extensionSDBH "King" "Louis XIV")
Since King is a single-entry name (the default), there can only be one child of extensionSDBH with King as its name. Attempting to specify another child element will update the value of the pre-existing element, and not create a new element. name can be made multi-entry by calling axlSDBSetMultipleEntry, after which calls to axlSDBSetChild with same name and different value will create new child elements.
axlSDBSetChild( extensionSDBH "King" "Henry VIII")
;; create an aggregating child under king. This isn't necessary but keeps the database tidy
;; we are not supplying a value because this is only demarcating a collection
ministersSDBH = axlSDBSetChild( kingSDBH "Ministers" "")
;; set the Minister tag as multi-entry. No session or SDB handle is provided, and this affects *all* open ADE sessions and databases in the current
;; virtuoso invocation.
axlSDBSetMultipleEntry( "Minister")
;; OK, now we can add multiple ministers
axlSDBSetChild( ministersSDBH "Minister" "Alice")
axlSDBSetChild( ministersSDBH "Minister" "Bob")
axlSDBSetChild( ministersSDBH "Minister" "Eve")
Return to top