Details
- 
    Type:
Improvement
 - 
    Status: Closed (View Workflow)
 - 
    Priority:
Major
 - 
    Resolution: Upstream Problem
 - 
    Affects Version/s: None
 - 
    Fix Version/s: None
 - 
    Component/s: osis2mod, usfm2osis.py
 - 
    Labels:
 
Description
Usfm2osis.py generates paragraphs having many different values for type (such as x-center, x-right, x-noindent etc.). Currently this information is lost when importing to SWORD because during the transformation of <p> to milestone <div type="x-p"> the paragraph type attributes are just dropped. Instead, can they be copied to the div's subType so they can be retained and accessed later, something like:
SWBuf tagName = t.getName();
if (!t.isEndTag()) {
  // Transform <p> into <div type="x-p"> and milestone it
  if (tagName == "p") {
+   SWBuf subType = t.getAttribute("type");
    t.setText("<div type=\"x-p\" />");
    sprintf(buf, "gen%d", sID++);
    t.setAttribute("sID", buf);
+   if (subType.length()) 
}