9.5 Modifications for Continued Fractions

<..remove end of non-tail continued frac..>
 Node child = node.getLastChild();
 if (child.getNodeType() == Node.ELEMENT_NODE) {
    Node cls = child.getAttributes() .getNamedItem("class");
    if (cls != null) {
       String clsName = cls.getNodeValue();
       if ( clsName.equals("begin-end")) {
          node.removeChild( child  );
 }  }  }
-_-_-

<..set end continued fracs mark..>
 Node child = node.getLastChild();
 if (child.getNodeType() == Node.ELEMENT_NODE) {
    Node cls = child.getAttributes() .getNamedItem("class");
    if (cls != null) {
       String clsName = cls.getNodeValue();
       if ( clsName.equals("begin-end")) {
          setContinuedNote(child);
 }  }  }
-_-_-

<..set start continued fracs mark..>
 Node child = node.getFirstChild();
 if (child.getNodeType() == Node.ELEMENT_NODE) {
    Node cls = child.getAttributes() .getNamedItem("class");
    if (cls != null) {
       String clsName = cls.getNodeValue();
       if ( clsName.equals("begin-end")) {
          setContinuedNote(child);
 }  }  }
-_-_-

<..HtJsml utility members..>+
 private static void setContinuedNote(Node node){
    if (node.getNodeType() == Node.ELEMENT_NODE) {
      if( node.getNodeName().equals( "level" ) ){
         <.fix end continued note.>
      } else {
         NodeList children = node.getChildNodes();
         for (int i = 0; i < children.getLength(); i++) {
            Node child = children.item(i);
            setContinuedNote(child);
 }  }  } }
-_-_-

<..fix end continued note..>
 Node attr = node.getAttributes().getNamedItem("continued");
 if (attr != null) {
   node = node.getFirstChild();
   if( node != null ){
      ((org.w3c.dom.Text) node).setData( attr.getNodeValue() );
 } }
-_-_-