Wiki
Clone wikiOkapi / ResourceCase003
Simple table
In this case an HTML file contains a table
element.
<table id=100> <tr><td>text</td></tr> <table>
TextUnit model
Event -> Resource (with GenericSkeleton):
START_GROUP -> StartGroup={ id=g1 properties={ prop[id]='100' (read-only) } isReference=false skeleton={ part='<table id=100>\n ' } } START_GROUP -> StartGroup={ id=g2 properties={ } isReference=false skeleton={ part='<tr>' } } START_GROUP -> StartGroup={ id=g3 properties={ } isReference=false skeleton={ part='<td>' } } TEXT_UNIT -> TextUnit={ id=t1 properties={ } isReference=false text=[text] skeleton={ } } END_GROUP -> Ending={ id=g3 skeleton={ part='</td>' } } END_GROUP -> Ending={ id=g2 skeleton={ part='</tr>\n' } } END_GROUP -> Ending={ id=g1 skeleton={ part='</table>\n' } }
Maximalist 'TextFlow' Model
<table id=100> <tr><td>text</td></tr> <table>
becomes
Container[id=1]{ // ./table Properties{ ref:DataPart[ref-id=2] // ./@id } Children{ ref:Container[ref-id=3] // ./tr[0] } } DataPart[id=2]{ } Container[id=3]{ // tr[0] Properties{} Children{ ref:TextFlow[ref-id=4] // ./td } } TextFlow[id=4]{ // ./td Properties{} Content{ TextFragment[id=5]{'text'} } }
Missing from this picture is annotations (e.g. feature, skeleton data)
Events (indentation shows stack):
StartContainer(container) //table StartProperties StartDataPart(datapart) // id EndDataPart(datapart) EndProperties StartChildren StartContainer(container2) // tr StartProperties EndProperties StartChildren StartTextFlow(textflow) // td StartProperties EndProperties StartTextFlowContent StartTextFragment(fragment) // 'text' EndTextFragment(fragment) EndTextFlowContent EndTextFlow(textflow) EndChildren EndContainer(container2) EndChildren EndContainer(container)
Updated