import org.xml.sax.SAXException;
import org.xml.sax.helpers.AttributesImpl;
import org.w3c.dom.*;
+import org.apache.xpath.DOMHelper;
import org.apache.xml.utils.DOMBuilder;
import org.apache.xml.utils.AttList;
import com.nwalsh.xalan.Callout;
protected static final String foURI = "http://www.w3.org/1999/XSL/Format";
protected static final String xhURI = "http://www.w3.org/1999/xhtml";
protected boolean stylesheetFO = false;
+ protected DOMHelper dh = null;
public FormatCallout() {
//nop;
public String areaLabel(Element area) {
NamedNodeMap domAttr = area.getAttributes();
- AttList attr = new AttList(domAttr);
+ AttList attr = new AttList(domAttr, dh);
String label = null;
if (attr.getValue("label") != null) {
// Otherwise, if its parent is an areaset and it has a label, use that
Element parent = (Element) area.getParentNode();
NamedNodeMap pdomAttr = parent.getAttributes();
- AttList pAttr = new AttList(pdomAttr);
+ AttList pAttr = new AttList(pdomAttr, dh);
if (parent != null
&& parent.getNodeName().equals("areaset")
&& pAttr.getValue("label") != null) {
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.xml.utils.QName;
+import org.apache.xpath.DOMHelper;
import org.apache.xml.utils.AttList;
/**
public DocumentFragment adjustColumnWidths (ExpressionContext context,
NodeIterator xalanNI) {
+ // HACK!!!
+ XPathContext xpcontext = (XPathContext) context;
+ DOMHelper dh = xpcontext.getDOMHelper();
+
int nominalWidth = convertLength(Params.getString(context,
"nominal.table.width"));
String tableWidth = Params.getString(context, "table.width");
&& child.getLocalName().equals("table-column")))) {
Element col = (Element) child;
NamedNodeMap domAttr = col.getAttributes();
- AttList attr = new AttList(domAttr);
+ AttList attr = new AttList(domAttr,dh);
columns[colnum] = col;
String localName = colgroup.getLocalName();
String name = colgroup.getTagName();
NamedNodeMap colgroupDomAttr = colgroup.getAttributes();
- AttList colgroupAttr = new AttList(colgroupDomAttr);
+ AttList colgroupAttr = new AttList(colgroupDomAttr,dh);
if (colgroup.getLocalName().equals("colgroup")) {
rtf.startElement(ns, localName, name, colgroupAttr);
import org.apache.xpath.XPath;
import org.apache.xpath.XPathContext;
import org.apache.xpath.NodeSet;
+import org.apache.xpath.DOMHelper;
import org.apache.xalan.extensions.XSLProcessorContext;
import org.apache.xalan.extensions.ExpressionContext;
import org.apache.xalan.transformer.TransformerImpl;
private static final String foURI = "http://www.w3.org/1999/XSL/Format";
private static final String xhURI = "http://www.w3.org/1999/xhtml";
+ protected DOMHelper dh = null;
+
/**
* <p>Constructor for Verbatim</p>
*
public DocumentFragment numberLines (ExpressionContext context,
NodeIterator xalanNI) {
+ // HACK!!!
+ XPathContext xpcontext = (XPathContext) context;
+ dh = xpcontext.getDOMHelper();
+
int xalanMod = Params.getInt(context, "linenumbering.everyNth");
int xalanWidth = Params.getInt(context, "linenumbering.width");
String xalanSep = Params.getString(context, "linenumbering.separator");
String localName = node.getLocalName();
String name = ((Element) node).getTagName();
NamedNodeMap domAttr = node.getAttributes();
- AttList attr = new AttList(domAttr);
+ AttList attr = new AttList(domAttr, dh);
rtf.startElement(ns, localName, name, attr);
elementStack.push(node);
NodeIterator areaspecNodeSet,
NodeIterator xalanNI) {
+ // HACK!!!
+ XPathContext xpcontext = (XPathContext) context;
+ dh = xpcontext.getDOMHelper();
+
String type = Params.getString(context, "stylesheet.result.type");
boolean useFO = type.equals("fo");
int defaultColumn = Params.getInt(context, "callout.defaultcolumn");
String localName = node.getLocalName();
String name = ((Element) node).getTagName();
NamedNodeMap domAttr = node.getAttributes();
- AttList attr = new AttList(domAttr);
+ AttList attr = new AttList(domAttr, dh);
rtf.startElement(ns, localName, name, attr);
elementStack.push(node);
Element area = (Element) node;
NamedNodeMap domAttr = node.getAttributes();
- AttList attr = new AttList(domAttr);
+ AttList attr = new AttList(domAttr, dh);
String units = attr.getValue("units");
String otherUnits = attr.getValue("otherunits");