Code example for DefaultHandler

Methods: charactersendElementstartElement

0
 
		AttributesImpl attributes = new AttributesImpl();
		attributes.addAttribute("", "marker-class-name", "marker-class-name",
				"CDATA", "page-head"); 
 
		this.documentHandler.startElement(FOElementMapping.URI, "marker",
				"marker", attributes);
 
		AttributesImpl tableAttrs = new AttributesImpl();
		tableAttrs.addAttribute("", "width", "width", "CDATA", "100%");
		tableAttrs.addAttribute("", "table-layout", "table-layout", "CDATA",
				"fixed"); 
 
		this.documentHandler.startElement(FOElementMapping.URI, "table",
				"table", tableAttrs);
 
		AttributesImpl colAttrs1 = new AttributesImpl();
		colAttrs1.addAttribute("", "width", "width", "CDATA",
				"proportional-column-width(4)"); 
		AttributesImpl colAttrs2 = new AttributesImpl();
		colAttrs1.addAttribute("", "width", "width", "CDATA",
				"proportional-column-width(1)"); 
 
		this.documentHandler.startElement(FOElementMapping.URI, "table-column",
				"table-column", colAttrs1);
		this.documentHandler.endElement(FOElementMapping.URI, "table-column",
				"table-column"); 
		this.documentHandler.startElement(FOElementMapping.URI, "table-column",
				"table-column", colAttrs2);
		this.documentHandler.endElement(FOElementMapping.URI, "table-column",
				"table-column"); 
 
		this.documentHandler.startElement(FOElementMapping.URI, "table-body",
				"table-body", new AttributesImpl());
 
		this.documentHandler.startElement(FOElementMapping.URI, "table-row",
				"table-row", new AttributesImpl());
 
		this.documentHandler.startElement(FOElementMapping.URI, "table-cell",
				"table-cell", new AttributesImpl());
 
		this.documentHandler.startElement(FOElementMapping.URI, "block",
				"block", createTitleTextAttributes(context));
 
		String title = getTitleText();
		if (title == null) {
			title = model.getCube().getCaption();
		} 
 
		this.documentHandler.characters(title.toCharArray(), 0, title.length());
 
		this.documentHandler.endElement(FOElementMapping.URI, "block", "block");
 
		this.documentHandler.endElement(FOElementMapping.URI, "table-cell",
				"table-cell"); 
 
		this.documentHandler.startElement(FOElementMapping.URI, "table-cell",
				"table-cell", new AttributesImpl());
 
		AttributesImpl cellAttrs2 = new AttributesImpl();
		cellAttrs2.addAttribute("", "text-align", "text-align", "CDATA",
				"right"); 
 
		this.documentHandler.startElement(FOElementMapping.URI, "block",
				"block", cellAttrs2);
 
		this.documentHandler.characters("Page ".toCharArray(), 0, 5);
 
		this.documentHandler.startElement(FOElementMapping.URI, "page-number",
				"page-number", new AttributesImpl());
		this.documentHandler.endElement(FOElementMapping.URI, "page-number",
				"page-number"); 
 
		this.documentHandler.endElement(FOElementMapping.URI, "block", "block");
 
		this.documentHandler.endElement(FOElementMapping.URI, "table-cell",
				"table-cell"); 
 
		this.documentHandler.endElement(FOElementMapping.URI, "table-row",
				"table-row"); 
 
		this.documentHandler.endElement(FOElementMapping.URI, "table-body",
				"table-body"); 
 
		this.documentHandler.endElement(FOElementMapping.URI, "table", "table");
 
		this.documentHandler.endElement(FOElementMapping.URI, "marker",
				"marker"); 
	} 
 
	/** 
	 * @param context