System.out.println("PCE!");
return xalanRTF;
}
Document doc = docBuilder.newDocument();
DocumentFragment df = doc.createDocumentFragment();
DOMBuilder rtf = new DOMBuilder(doc, df);
try {
String ns = colgroup.getNamespaceURI();
String localName = colgroup.getLocalName();
String name = colgroup.getTagName();
if (colgroup.getLocalName().equals("colgroup")) {
rtf.startElement(ns, localName, name,
copyAttributes(colgroup));
}
for (colnum = 0; colnum < numColumns; colnum++) {
Element col = columns[colnum];
NamedNodeMap domAttr = col.getAttributes();
AttributesImpl attr = new AttributesImpl();
for (int acount = 0; acount < domAttr.getLength(); acount++) {
Node a = domAttr.item(acount);
String a_ns = a.getNamespaceURI();
String a_localName = a.getLocalName();
if ((foStylesheet && !a_localName.equals("column-width"))
|| !a_localName.equalsIgnoreCase("width")) {
attr.addAttribute(a.getNamespaceURI(),
a.getLocalName(),
a.getNodeName(),
"CDATA",
a.getNodeValue());
}
}
if (foStylesheet) {
attr.addAttribute("", "column-width", "column-width", "CDATA", widths[colnum]);
} else {
attr.addAttribute("", "width", "width", "CDATA", widths[colnum]);
}
rtf.startElement(col.getNamespaceURI(),
col.getLocalName(),
col.getTagName(),
attr);
rtf.endElement(col.getNamespaceURI(),
col.getLocalName(),
col.getTagName());
}
if (colgroup.getLocalName().equals("colgroup")) {
rtf.endElement(ns, localName, name);
}
} catch (SAXException se) {
System.out.println("SE!");
return xalanRTF;
}