diff --git a/manual/ExternalFunctions.ipynb b/manual/ExternalFunctions.ipynb index 638e130093e6d1398c774b397b24305cc65b02f2..a3c0eac497760edd7ae40d35f67089d42e4aee93 100644 --- a/manual/ExternalFunctions.ipynb +++ b/manual/ExternalFunctions.ipynb @@ -4108,6 +4108,8 @@ "\n", "Each entry (aka record) has its own id (it is the index in the global sequence, but for convenience the id is repeated as the ```recId``` field).\n", "```pID``` is the Id of the parent of an entry, and 0 if the record is at the top-level.\n", + "Note that the text content of an element is stored in a separate record with ```element: \"CText\"``` and an attribute ```text``` containing the actual text.\n", + "Its wrapping element can be obtained from the record's parent ID.\n", "\n", "### Files and Strings\n", "\n", @@ -4154,10 +4156,10 @@ { "data": { "text/markdown": [ - "$\\{(1\\mapsto\\mathit{rec}(\\mathit{attributes}\\in\\{(\\text{\"version\"}\\mapsto\\text{\"0.1\"})\\},\\mathit{element}\\in\\text{\"Data\"},\\mathit{meta}\\in\\{(\\text{\"xmlLineNumber\"}\\mapsto\\text{\"3\"})\\},\\mathit{pId}\\in 0,\\mathit{recId}\\in 1)),(2\\mapsto\\mathit{rec}(\\mathit{attributes}\\in\\{(\\text{\"attr1\"}\\mapsto\\text{\"value1\"}),(\\text{\"elemID\"}\\mapsto\\text{\"ID1\"})\\},\\mathit{element}\\in\\text{\"Tag1\"},\\mathit{meta}\\in\\{(\\text{\"xmlLineNumber\"}\\mapsto\\text{\"4\"})\\},\\mathit{pId}\\in 1,\\mathit{recId}\\in 2))\\}$" + "$\\{(1\\mapsto\\mathit{rec}(\\mathit{attributes}\\in\\{(\\text{\"version\"}\\mapsto\\text{\"0.1\"})\\},\\mathit{element}\\in\\text{\"Data\"},\\mathit{meta}\\in\\{(\\text{\"xmlLineNumber\"}\\mapsto\\text{\"3\"})\\},\\mathit{pId}\\in 0,\\mathit{recId}\\in 1)),(2\\mapsto\\mathit{rec}(\\mathit{attributes}\\in\\{(\\text{\"text\"}\\mapsto\\text{\"a text content\"})\\},\\mathit{element}\\in\\text{\"CText\"},\\mathit{meta}\\in\\{(\\text{\"xmlLineNumber\"}\\mapsto\\text{\"4\"})\\},\\mathit{pId}\\in 1,\\mathit{recId}\\in 2)),(3\\mapsto\\mathit{rec}(\\mathit{attributes}\\in\\{(\\text{\"attr1\"}\\mapsto\\text{\"value1\"}),(\\text{\"elemID\"}\\mapsto\\text{\"ID1\"})\\},\\mathit{element}\\in\\text{\"Tag1\"},\\mathit{meta}\\in\\{(\\text{\"xmlLineNumber\"}\\mapsto\\text{\"5\"})\\},\\mathit{pId}\\in 1,\\mathit{recId}\\in 3))\\}$" ], "text/plain": [ - "{(1↦rec(attributes∈{(\"version\"↦\"0.1\")},element∈\"Data\",meta∈{(\"xmlLineNumber\"↦\"3\")},pId∈0,recId∈1)),(2↦rec(attributes∈{(\"attr1\"↦\"value1\"),(\"elemID\"↦\"ID1\")},element∈\"Tag1\",meta∈{(\"xmlLineNumber\"↦\"4\")},pId∈1,recId∈2))}" + "{(1↦rec(attributes∈{(\"version\"↦\"0.1\")},element∈\"Data\",meta∈{(\"xmlLineNumber\"↦\"3\")},pId∈0,recId∈1)),(2↦rec(attributes∈{(\"text\"↦\"a text content\")},element∈\"CText\",meta∈{(\"xmlLineNumber\"↦\"4\")},pId∈1,recId∈2)),(3↦rec(attributes∈{(\"attr1\"↦\"value1\"),(\"elemID\"↦\"ID1\")},element∈\"Tag1\",meta∈{(\"xmlLineNumber\"↦\"5\")},pId∈1,recId∈3))}" ] }, "execution_count": 2, @@ -4169,7 +4171,8 @@ "READ_XML_FROM_STRING('''\n", "<?xml version=\"1.0\" encoding=\"ASCII\"?>\n", " <Data version= \"0.1\">\n", - " <Tag1 elemID=\"ID1\" attr1=\"value1\" />\n", + " a text content\n", + " <Tag1 elemID=\"ID1\" attr1=\"value1\" />\n", " </Data>\n", "''')" ] @@ -4220,7 +4223,7 @@ "xml = READ_XML_FROM_STRING('''\n", "<?xml version=\"1.0\" encoding=\"ASCII\"?>\n", " <Data version= \"0.1\">\n", - " <Tag1 elemID=\"ID1\" attr1=\"value1\" />\n", + " <Tag1 elemID=\"ID1\" attr1=\"value1\" />\n", " </Data>\n", "''') &\n", "\n",