@@ -317,7 +317,7 @@ The Sections
317
317
------------
318
318
319
319
There are several ways to access Sections. You can either call them by name or
320
- by index using either explicitely the function that returns the list of
320
+ by index using either explicitly the function that returns the list of
321
321
Sections (see last part of `The Document `_ chapter) or using again a short cut
322
322
notation. Let's test all the different ways to access a Section, by having a
323
323
look at the first Section in the sections list attached to the Document in our
@@ -332,7 +332,7 @@ example odML file::
332
332
>>> print(odmlEX[0])
333
333
<Section TheCrew[crew] (4)>
334
334
335
- In the following we will call Sections explicitely by their name using the
335
+ In the following we will call Sections explicitly by their name using the
336
336
short cut notation.
337
337
338
338
The printout of a Section is similar to the Document printout and gives you
@@ -363,9 +363,6 @@ document
363
363
attribute is set automatically for a Section and all its children when
364
364
it is attached to a Document.
365
365
366
- id
367
- - XXXTODOXXX
368
-
369
366
parent
370
367
- Returns the parent to which this Section was directly attached to. Can be
371
368
either a Document or another Section.
@@ -384,6 +381,11 @@ repository
384
381
terminologies used in this Document. Could be the URL to the G-Node
385
382
terminologies or to a user defined template.
386
383
384
+ id
385
+ - id is a UUID (universally unique identifiers) that uniquely identifies
386
+ the current section. If not otherwise specified, this id is automatically
387
+ created and assigned.
388
+
387
389
Let's have a look at the attributes for the Section 'TheCrew'::
388
390
389
391
>>> print(odmlEX['TheCrew'].name)
@@ -392,22 +394,22 @@ Let's have a look at the attributes for the Section 'TheCrew'::
392
394
Information on the crew
393
395
>>> print(odmlEX['TheCrew'].document)
394
396
<Doc 42 by D. N. Adams (2 sections)>
395
- >>> print(sec1 .parent)
397
+ >>> print(odmlEX['TheCrew'] .parent)
396
398
<Doc 42 by D. N. Adams (2 sections)>
397
- >>> print(odmlEX['TheCrew'].id)
398
- None
399
399
>>> print(odmlEX['TheCrew'].type)
400
400
crew
401
401
>>> print(odmlEX['TheCrew'].reference)
402
402
None
403
403
>>> print(odmlEX['TheCrew'].repository)
404
404
None
405
+ >>> print(odmlEX['TheCrew'].id)
406
+ None
405
407
406
408
As expected for this Section, the name and type attribute match the information
407
409
given in the Section printout, and the document and parent attribute return the
408
- same object, namely the our example Document.
410
+ same object, namely our example Document.
409
411
410
- To see which Sections are directly attached to the Section 'TheCrew' use again
412
+ To see which Sections are directly attached to the Section 'TheCrew' again use
411
413
the following command::
412
414
413
415
>>> print(odmlEX['TheCrew'].sections)
0 commit comments