NOTES (1306B)
1 # new tree concept suggestion: 2 3 I think this new design will be easier to implement and work with. 4 5 ## root 6 7 Contains numbered directories representing different documents, 8 as well as special 'new' file: 9 10 ```` 11 /1 12 2 13 3 14 new 15 ```` 16 17 On read from 'new' server will create new document and return it's 18 number. 19 20 ## document 21 22 Contains numbered files representing different nodes of a document 23 tree, as well as special 'new', 'tree' and 'ctl' files. 24 25 26 ```` 27 /1/1 28 2 29 3 30 4 31 ... 32 ctl 33 new 34 tree 35 ```` 36 37 Reading from 'new' creates new node, but alternatively you can just 38 write to files with numbered names directly. 39 40 ## ctl 41 42 user can write commands there. 43 44 at minimum there should be 'adopt parent child' command 45 46 ## tree 47 48 Contains tree structure. 49 50 example: 51 52 ```` 53 1 54 2 55 3 56 4 57 5 58 6 59 7 60 8 61 9 62 10 63 11 64 12 65 ```` 66 67 Optionally we can include short description of the node after it's 68 number. 69 70 example: 71 72 ```` 73 1 element docroot 74 2 element document 75 3 element html 76 4 element head 77 5 element title 78 6 element body 79 7 element p 80 8 text Hello World!!! Lorem ips... 81 ```` 82 83 84 ## node 85 86 Contains node info. 87 88 General structure is: 89 90 ```` 91 type 92 data 93 ```` 94 95 What data is depends on type. For text nodes it's text, for element 96 nodes it's attributes. 97 98 example: 99 100 ```` 101 element 102 a 103 id="logo" 104 href="www.example.org/logo.jpg" 105 ````