WWPWWOusermarkup

From Digital Scholarship Group
Jump to navigation Jump to search

User-created markup

System so far:

1. user sees a text with a set of element identifiers overtly displayed. These IDs come from the basic OHCO encoding of the text. 2. user specifies a start tag for an element. Required information is:

  • element GI
  • element ID
  • the preceding OHCO ID value
  • enough words that follow the chosen start point to enable (with reasonable certainty) disambiguation if the OHCO element contains a lot of text

3. user then supplies the required info for the end tag, viz.:

  • the preceding OHCO ID value
  • enough words that precede the chosen end point to enable (with reasonable certainty) disambiguation if the OHCO element contains a lot of text

4. user clicks "submit" 5. all the start and end tag info is stored in the MySQL database ("wwothdb")

The next part of the process is displaying the text+user-created-markup. This is tricky because it involves repeatedly finding the correct place in the text content of an element node, then splitting the text content and inserting a child element node. I HAVE GOT THIS PARTIALLY WORKING, BUT CAN ONLY INSERT ONE CHILD PER ELEMENT SO FAR - AFTER THAT IT GOES WRONG AND ALWAYS PUTS ADDITIONAL CHILDREN IN THE SAME PLACE. IT MUST BE SOMETHING TO DO WITH MY USING FIXED ITEM() NUMBERS FROM THE CHILD NODELIST IN MY INSERTION ALGORITHM

Alternative method:

  • get the DOMElement object that will be the parent of the TH element
  • assign it to a variable as a serialized string