From 61aa45abf866604465e7ba7c5be126d586a655d3 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Thu, 21 Mar 2002 13:27:28 +0000 Subject: [PATCH] Abandon support for Saxon 6.4.2 --- xsl/extensions/Makefile | 12 +- xsl/extensions/saxon642/.cvsignore | 1 - .../saxon642/com/nwalsh/saxon/CVS.java | 90 --- .../saxon642/com/nwalsh/saxon/Callout.java | 90 --- .../com/nwalsh/saxon/CalloutEmitter.java | 524 ------------------ .../com/nwalsh/saxon/ColumnScanEmitter.java | 165 ------ .../com/nwalsh/saxon/ColumnUpdateEmitter.java | 94 ---- .../com/nwalsh/saxon/CopyEmitter.java | 148 ----- .../com/nwalsh/saxon/FormatCallout.java | 111 ---- .../nwalsh/saxon/FormatGraphicCallout.java | 88 --- .../com/nwalsh/saxon/FormatTextCallout.java | 43 -- .../nwalsh/saxon/FormatUnicodeCallout.java | 98 ---- .../com/nwalsh/saxon/LineCountEmitter.java | 141 ----- .../com/nwalsh/saxon/NumberLinesEmitter.java | 322 ----------- .../saxon642/com/nwalsh/saxon/Table.java | 431 -------------- .../saxon642/com/nwalsh/saxon/Text.java | 132 ----- .../com/nwalsh/saxon/TextFactory.java | 67 --- .../saxon642/com/nwalsh/saxon/Verbatim.java | 471 ---------------- .../saxon642/com/nwalsh/saxon/package.html | 48 -- xsl/extensions/saxon642/prj.el | 218 -------- 20 files changed, 6 insertions(+), 3288 deletions(-) delete mode 100644 xsl/extensions/saxon642/.cvsignore delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/CVS.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/Callout.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/CalloutEmitter.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/ColumnScanEmitter.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/ColumnUpdateEmitter.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/CopyEmitter.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/FormatCallout.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/FormatGraphicCallout.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/FormatTextCallout.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/FormatUnicodeCallout.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/LineCountEmitter.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/NumberLinesEmitter.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/Table.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/Text.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/TextFactory.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/Verbatim.java delete mode 100644 xsl/extensions/saxon642/com/nwalsh/saxon/package.html delete mode 100644 xsl/extensions/saxon642/prj.el diff --git a/xsl/extensions/Makefile b/xsl/extensions/Makefile index 4de6563fc..9d966ee0e 100644 --- a/xsl/extensions/Makefile +++ b/xsl/extensions/Makefile @@ -1,10 +1,7 @@ -.PHONY: doc saxon642 saxon643 saxon644 saxon65 xalan2 +.PHONY: doc saxon643 saxon644 saxon65 saxon651 xalan2 all: jars -saxon642: - $(MAKE) -C saxon642/.classes - saxon643: $(MAKE) -C saxon643/.classes @@ -14,17 +11,20 @@ saxon644: saxon643 saxon65: saxon643 @echo Saxon 6.5 is compatible with Saxon 6.4.3 +saxon651: saxon643 + @echo Saxon 6.5 is compatible with Saxon 6.4.3 + xalan2: $(MAKE) -C xalan2/.classes -jars: saxon642 saxon643 saxon644 xalan2 +jars: saxon643 saxon644 xalan2 $(MAKE) -C saxon642/.classes jar $(MAKE) -C saxon643/.classes jar cp saxon643.jar saxon644.jar cp saxon643.jar saxon65.jar + cp saxon643.jar saxon651.jar $(MAKE) -C xalan2/.classes jar clean: - $(MAKE) -C saxon642/.classes clean $(MAKE) -C saxon643/.classes clean $(MAKE) -C xalan2/.classes clean diff --git a/xsl/extensions/saxon642/.cvsignore b/xsl/extensions/saxon642/.cvsignore deleted file mode 100644 index 4d3c216f5..000000000 --- a/xsl/extensions/saxon642/.cvsignore +++ /dev/null @@ -1 +0,0 @@ -.classes diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/CVS.java b/xsl/extensions/saxon642/com/nwalsh/saxon/CVS.java deleted file mode 100644 index 529546be7..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/CVS.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.nwalsh.saxon; - -import java.io.*; -import java.util.Calendar; -import java.util.GregorianCalendar; -import java.util.Date; -import java.util.Locale; -import java.util.TimeZone; -import java.text.DateFormat; -import java.text.ParseException; - -/** - *

Saxon extension to convert CVS date strings into local time

- * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides a - * Saxon - * extension to turn the CVS date strings, which are UTC:

- * - *
$Date: 2000/11/09 02:34:20 $
- * - *

into legibly formatted local time:

- * - *
Wed Nov 08 18:34:20 PST 2000
- * - *

(I happened to be in California when I wrote this documentation.)

- - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class CVS { - /** - *

Constructor for CVS

- * - *

All of the methods are static, so the constructor does nothing.

- */ - public CVS() { - } - - /** - *

Convert a CVS date string into local time.

- * - * @param cvsDate The CVS date string. - * - * @return The date, converted to local time and reformatted. - */ - public static String localTime (String cvsDate) { - // A cvsDate has the following form "$Date$" - if (!cvsDate.startsWith("$Date: ")) { - return cvsDate; - } - - String yrS = cvsDate.substring(7,11); - String moS = cvsDate.substring(12,14); - String daS = cvsDate.substring(15,17); - String hrS = cvsDate.substring(18,20); - String miS = cvsDate.substring(21,23); - String seS = cvsDate.substring(24,26); - - TimeZone tz = TimeZone.getTimeZone("GMT+0"); - GregorianCalendar gmtCal = new GregorianCalendar(tz); - - try { - gmtCal.set(Integer.parseInt(yrS), - Integer.parseInt(moS)-1, - Integer.parseInt(daS), - Integer.parseInt(hrS), - Integer.parseInt(miS), - Integer.parseInt(seS)); - } catch (NumberFormatException e) { - // nop - } - - Date d = gmtCal.getTime(); - - return d.toString(); - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/Callout.java b/xsl/extensions/saxon642/com/nwalsh/saxon/Callout.java deleted file mode 100644 index cffa054fe..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/Callout.java +++ /dev/null @@ -1,90 +0,0 @@ -package com.nwalsh.saxon; - -import org.w3c.dom.*; - -/** - *

A class for maintaining information about callouts.

- * - *

To make processing callouts easier, they are parsed out of the - * input structure and stored in a sorted array. (The array is sorted - * according to the order in which the callouts occur.)

- * - *

This class is just the little record - * that we store in the array for each callout.

- */ -public class Callout implements Comparable { - /** The callout number. */ - private int callout = 0; - /** The area Element item that generated this callout. */ - private Element area = null; - /** The line on which this callout occurs. */ - private int line = 0; - /** The column in which this callout appears. */ - private int col = 0; - - /** The constructor; initialize the private data structures. */ - public Callout(int callout, Element area, int line, int col) { - this.callout = callout; - this.area = area; - this.line = line; - this.col = col; - } - - /** - *

The compareTo method compares this Callout with another.

- * - *

Given two Callouts, A and B, A < B if:

- * - *
    - *
  1. A.line < B.line, or
  2. - *
  3. A.line = B.line && A.col < B.col, or
  4. - *
  5. A.line = B.line && A.col = B.col && A.callout < B.callout
  6. - *
  7. Otherwise, they're equal.
  8. - *
- */ - public int compareTo (Object o) { - Callout c = (Callout) o; - - if (line == c.getLine()) { - if (col > c.getColumn()) { - return 1; - } else if (col < c.getColumn()) { - return -1; - } else { - if (callout < c.getCallout()) { - return -1; - } else if (callout > c.getCallout()) { - return 1; - } else { - return 0; - } - } - } else { - if (line > c.getLine()) { - return 1; - } else { - return -1; - } - } - } - - /** Access the Callout's area. */ - public Element getArea() { - return area; - } - - /** Access the Callout's line. */ - public int getLine() { - return line; - } - - /** Access the Callout's column. */ - public int getColumn() { - return col; - } - - /** Access the Callout's callout number. */ - public int getCallout() { - return callout; - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/CalloutEmitter.java b/xsl/extensions/saxon642/com/nwalsh/saxon/CalloutEmitter.java deleted file mode 100644 index 3db87a55c..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/CalloutEmitter.java +++ /dev/null @@ -1,524 +0,0 @@ -package com.nwalsh.saxon; - -import java.util.Stack; -import java.util.StringTokenizer; -import org.xml.sax.*; -import org.w3c.dom.*; -import javax.xml.transform.TransformerException; -import com.icl.saxon.om.NamePool; -import com.icl.saxon.output.Emitter; -import com.icl.saxon.tree.AttributeCollection; - -/** - *

Saxon extension to decorate a result tree fragment with callouts.

- * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides the guts of a - * Saxon 6.* - * implementation of callouts for verbatim environments. (It is used - * by the Verbatim class.)

- * - *

The general design is this: the stylesheets construct a result tree - * fragment for some verbatim environment. The Verbatim class initializes - * a CalloutEmitter with information about the callouts that should be applied - * to the verbatim environment in question. Then the result tree fragment - * is "replayed" through the CalloutEmitter; the CalloutEmitter builds a - * new result tree fragment from this event stream, decorated with callouts, - * and that is returned.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @see Verbatim - * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class CalloutEmitter extends CopyEmitter { - /** A stack for the preserving information about open elements. */ - protected Stack elementStack = null; - - /** A stack for holding information about temporarily closed elements. */ - protected Stack tempStack = null; - - /** Is the next element absolutely the first element in the fragment? */ - protected boolean firstElement = false; - - /** The FO namespace name. */ - protected static String foURI = "http://www.w3.org/1999/XSL/Format"; - - /** The default column for callouts that specify only a line. */ - protected int defaultColumn = 60; - - /** Is the stylesheet currently running an FO stylesheet? */ - protected boolean foStylesheet = false; - - /** The current line number. */ - private static int lineNumber = 0; - - /** The current column number. */ - private static int colNumber = 0; - - /** The (sorted) array of callouts obtained from the areaspec. */ - private static Callout callout[] = null; - - /** The number of callouts in the callout array. */ - private static int calloutCount = 0; - - /** A pointer used to keep track of our position in the callout array. */ - private static int calloutPos = 0; - - /** The FormatCallout object to use for formatting callouts. */ - private static FormatCallout fCallout = null; - - /**

Constructor for the CalloutEmitter.

- * - * @param namePool The name pool to use for constructing elements and attributes. - * @param graphicsPath The path to callout number graphics. - * @param graphicsExt The extension for callout number graphics. - * @param graphicsMax The largest callout number that can be represented as a graphic. - * @param defaultColumn The default column for callouts. - * @param foStylesheet Is this an FO stylesheet? - */ - public CalloutEmitter(NamePool namePool, - int defaultColumn, - boolean foStylesheet, - FormatCallout fCallout) { - super(namePool); - elementStack = new Stack(); - firstElement = true; - - this.defaultColumn = defaultColumn; - this.foStylesheet = foStylesheet; - this.fCallout = fCallout; - } - - /** - *

Examine the areaspec and determine the number and position of - * callouts.

- * - *

The areaspecNodeSet - * is examined and a sorted list of the callouts is constructed.

- * - *

This data structure is used to augment the result tree fragment - * with callout bullets.

- * - * @param areaspecNodeSet The source document <areaspec> element. - * - */ - public void setupCallouts (NodeList areaspecNodeList) { - callout = new Callout[10]; - calloutCount = 0; - calloutPos = 0; - lineNumber = 1; - colNumber = 1; - - // First we walk through the areaspec to calculate the position - // of the callouts - // - // - // - // - // - // - // - // - int pos = 0; - int coNum = 0; - boolean inAreaSet = false; - Node areaspec = areaspecNodeList.item(0); - NodeList children = areaspec.getChildNodes(); - - for (int count = 0; count < children.getLength(); count++) { - Node node = children.item(count); - if (node.getNodeType() == Node.ELEMENT_NODE) { - if (node.getNodeName().equalsIgnoreCase("areaset")) { - coNum++; - NodeList areas = node.getChildNodes(); - for (int acount = 0; acount < areas.getLength(); acount++) { - Node area = areas.item(acount); - if (area.getNodeType() == Node.ELEMENT_NODE) { - if (area.getNodeName().equalsIgnoreCase("area")) { - addCallout(coNum, area, defaultColumn); - } else { - System.out.println("Unexpected element in areaset: " - + area.getNodeName()); - } - } - } - } else if (node.getNodeName().equalsIgnoreCase("area")) { - coNum++; - addCallout(coNum, node, defaultColumn); - } else { - System.out.println("Unexpected element in areaspec: " - + node.getNodeName()); - } - } - } - - // Now sort them - java.util.Arrays.sort(callout, 0, calloutCount); - } - - /** Process characters. */ - public void characters(char[] chars, int start, int len) - throws TransformerException { - - // If we hit characters, then there's no first element... - firstElement = false; - - if (lineNumber == 0) { - // if there are any text nodes, there's at least one line - lineNumber++; - colNumber = 1; - } - - // Walk through the text node looking for callout positions - char[] newChars = new char[len]; - int pos = 0; - for (int count = start; count < start+len; count++) { - if (calloutPos < calloutCount - && callout[calloutPos].getLine() == lineNumber - && callout[calloutPos].getColumn() == colNumber) { - if (pos > 0) { - rtfEmitter.characters(newChars, 0, pos); - pos = 0; - } - - closeOpenElements(rtfEmitter); - - while (calloutPos < calloutCount - && callout[calloutPos].getLine() == lineNumber - && callout[calloutPos].getColumn() == colNumber) { - fCallout.formatCallout(rtfEmitter, callout[calloutPos]); - calloutPos++; - } - - openClosedElements(rtfEmitter); - } - - if (chars[count] == '\n') { - // What if we need to pad this line? - if (calloutPos < calloutCount - && callout[calloutPos].getLine() == lineNumber - && callout[calloutPos].getColumn() > colNumber) { - - if (pos > 0) { - rtfEmitter.characters(newChars, 0, pos); - pos = 0; - } - - closeOpenElements(rtfEmitter); - - while (calloutPos < calloutCount - && callout[calloutPos].getLine() == lineNumber - && callout[calloutPos].getColumn() > colNumber) { - formatPad(callout[calloutPos].getColumn() - colNumber); - colNumber = callout[calloutPos].getColumn(); - while (calloutPos < calloutCount - && callout[calloutPos].getLine() == lineNumber - && callout[calloutPos].getColumn() == colNumber) { - fCallout.formatCallout(rtfEmitter, callout[calloutPos]); - calloutPos++; - } - } - - openClosedElements(rtfEmitter); - } - - lineNumber++; - colNumber = 1; - } else { - colNumber++; - } - newChars[pos++] = chars[count]; - } - - if (pos > 0) { - rtfEmitter.characters(newChars, 0, pos); - } - } - - /** - *

Add blanks to the result tree fragment.

- * - *

This method adds numBlanks to the result tree fragment. - * It's used to pad lines when callouts occur after the last existing - * characater in a line.

- * - * @param numBlanks The number of blanks to add. - */ - protected void formatPad(int numBlanks) { - char chars[] = new char[numBlanks]; - for (int count = 0; count < numBlanks; count++) { - chars[count] = ' '; - } - - try { - rtfEmitter.characters(chars, 0, numBlanks); - } catch (TransformerException e) { - System.out.println("Transformer Exception in formatPad"); - } - } - - /** - *

Add a callout to the global callout array

- * - *

This method examines a callout area and adds it to - * the global callout array if it can be interpreted.

- * - *

Only the linecolumn and linerange units are - * supported. If no unit is specifed, linecolumn is assumed. - * If only a line is specified, the callout decoration appears in - * the defaultColumn.

- * - * @param coNum The callout number. - * @param node The area. - * @param defaultColumn The default column for callouts. - */ - protected void addCallout (int coNum, - Node node, - int defaultColumn) { - - Element area = (Element) node; - String units = null; - String coords = null; - - if (area.hasAttribute("units")) { - units = area.getAttribute("units"); - } - - if (area.hasAttribute("coords")) { - coords = area.getAttribute("coords"); - } - - if (units != null - && !units.equalsIgnoreCase("linecolumn") - && !units.equalsIgnoreCase("linerange")) { - System.out.println("Only linecolumn and linerange units are supported"); - return; - } - - if (coords == null) { - System.out.println("Coords must be specified"); - return; - } - - // Now let's see if we can interpret the coordinates... - StringTokenizer st = new StringTokenizer(coords); - int tokenCount = 0; - int c1 = 0; - int c2 = 0; - while (st.hasMoreTokens()) { - tokenCount++; - if (tokenCount > 2) { - System.out.println("Unparseable coordinates"); - return; - } - try { - String token = st.nextToken(); - int coord = Integer.parseInt(token); - c2 = coord; - if (tokenCount == 1) { - c1 = coord; - } - } catch (NumberFormatException e) { - System.out.println("Unparseable coordinate"); - return; - } - } - - // Make sure we aren't going to blow past the end of our array - if (calloutCount == callout.length) { - Callout bigger[] = new Callout[calloutCount+10]; - for (int count = 0; count < callout.length; count++) { - bigger[count] = callout[count]; - } - callout = bigger; - } - - // Ok, add the callout - if (tokenCount == 2) { - if (units != null && units.equalsIgnoreCase("linerange")) { - for (int count = c1; count <= c2; count++) { - callout[calloutCount++] = new Callout(coNum, area, - count, defaultColumn); - } - } else { - // assume linecolumn - callout[calloutCount++] = new Callout(coNum, area, c1, c2); - } - } else { - // if there's only one number, assume it's the line - callout[calloutCount++] = new Callout(coNum, area, c1, defaultColumn); - } - } - - /** Process end element events. */ - public void endElement(int nameCode) - throws TransformerException { - - if (!elementStack.empty()) { - // if we didn't push the very first element (an fo:block or - // pre or div surrounding the whole block), then the stack will - // be empty when we get to the end of the first element... - elementStack.pop(); - } - rtfEmitter.endElement(nameCode); - } - - /** Process start element events. */ - public void startElement(int nameCode, - org.xml.sax.Attributes attributes, - int[] namespaces, - int nscount) - throws TransformerException { - - if (!skipThisElement(nameCode)) { - StartElementInfo sei = new StartElementInfo(nameCode, attributes, - namespaces, nscount); - elementStack.push(sei); - } - - firstElement = false; - - rtfEmitter.startElement(nameCode, attributes, namespaces, nscount); - } - - /** - *

Protect the outer-most block wrapper.

- * - *

Open elements in the result tree fragment are closed and reopened - * around callouts (so that callouts don't appear inside links or other - * environments). But if the result tree fragment is a single block - * (a div or pre in HTML, an fo:block in FO), that outer-most block is - * treated specially.

- * - *

This method returns true if the element in question is that - * outermost block.

- * - * @param nameCode The name code for the element - * - * @return True if the element is the outer-most block, false otherwise. - */ - protected boolean skipThisElement(int nameCode) { - if (firstElement) { - int thisFingerprint = namePool.getFingerprint(nameCode); - int foBlockFingerprint = namePool.getFingerprint(foURI, "block"); - int htmlPreFingerprint = namePool.getFingerprint("", "pre"); - int htmlDivFingerprint = namePool.getFingerprint("", "div"); - - if ((foStylesheet && thisFingerprint == foBlockFingerprint) - || (!foStylesheet && (thisFingerprint == htmlPreFingerprint - || thisFingerprint == htmlDivFingerprint))) { - // Don't push the outer-most wrapping div, pre, or fo:block - return true; - } - } - - return false; - } - - private void closeOpenElements(Emitter rtfEmitter) - throws TransformerException { - // Close all the open elements... - tempStack = new Stack(); - while (!elementStack.empty()) { - StartElementInfo elem = (StartElementInfo) elementStack.pop(); - rtfEmitter.endElement(elem.getNameCode()); - tempStack.push(elem); - } - } - - private void openClosedElements(Emitter rtfEmitter) - throws TransformerException { - // Now "reopen" the elements that we closed... - while (!tempStack.empty()) { - StartElementInfo elem = (StartElementInfo) tempStack.pop(); - AttributeCollection attr = (AttributeCollection) elem.getAttributes(); - AttributeCollection newAttr = new AttributeCollection(namePool); - - for (int acount = 0; acount < attr.getLength(); acount++) { - String localName = attr.getLocalName(acount); - int nameCode = attr.getNameCode(acount); - String type = attr.getType(acount); - String value = attr.getValue(acount); - String uri = attr.getURI(acount); - String prefix = ""; - - if (localName.indexOf(':') > 0) { - prefix = localName.substring(0, localName.indexOf(':')); - localName = localName.substring(localName.indexOf(':')+1); - } - - if (uri.equals("") - && ((foStylesheet - && localName.equals("id")) - || (!foStylesheet - && (localName.equals("id") - || localName.equals("name"))))) { - // skip this attribute - } else { - newAttr.addAttribute(prefix, uri, localName, type, value); - } - } - - rtfEmitter.startElement(elem.getNameCode(), - newAttr, - elem.getNamespaces(), - elem.getNSCount()); - - elementStack.push(elem); - } - } - - /** - *

A private class for maintaining the information required to call - * the startElement method.

- * - *

In order to close and reopen elements, information about those - * elements has to be maintained. This class is just the little record - * that we push on the stack to keep track of that info.

- */ - private class StartElementInfo { - private int _nameCode; - org.xml.sax.Attributes _attributes; - int[] _namespaces; - int _nscount; - - public StartElementInfo(int nameCode, - org.xml.sax.Attributes attributes, - int[] namespaces, - int nscount) { - _nameCode = nameCode; - _attributes = attributes; - _namespaces = namespaces; - _nscount = nscount; - } - - public int getNameCode() { - return _nameCode; - } - - public org.xml.sax.Attributes getAttributes() { - return _attributes; - } - - public int[] getNamespaces() { - return _namespaces; - } - - public int getNSCount() { - return _nscount; - } - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/ColumnScanEmitter.java b/xsl/extensions/saxon642/com/nwalsh/saxon/ColumnScanEmitter.java deleted file mode 100644 index 0b96f8bed..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/ColumnScanEmitter.java +++ /dev/null @@ -1,165 +0,0 @@ -package com.nwalsh.saxon; - -import org.xml.sax.*; -import javax.xml.transform.TransformerException; -import com.icl.saxon.output.*; -import com.icl.saxon.om.*; -import com.icl.saxon.expr.FragmentValue; - -/** - *

Saxon extension to scan the column widthsin a result tree fragment.

- * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides a - * Saxon 6.* - * implementation to scan the column widths in a result tree - * fragment.

- * - *

The general design is this: the stylesheets construct a result tree - * fragment for some colgroup environment. That result tree fragment - * is "replayed" through the ColumnScanEmitter; the ColumnScanEmitter watches - * the cols go by and extracts the column widths that it sees. These - * widths are then made available.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class ColumnScanEmitter extends com.icl.saxon.output.Emitter { - /** The number of columns seen. */ - protected int numColumns = 0; - protected String width[] = new String[5]; - protected NamePool namePool = null; - - /** The FO namespace name. */ - protected static String foURI = "http://www.w3.org/1999/XSL/Format"; - - /** Construct a new ColumnScanEmitter. */ - public ColumnScanEmitter(NamePool namePool) { - numColumns = 0; - this.namePool = namePool; - } - - /** Return the number of columns. */ - public int columnCount() { - return numColumns; - } - - /** Return the number of columns. */ - public String[] columnWidths() { - return width; - } - - /** Discarded. */ - public void characters(char[] chars, int start, int len) - throws TransformerException { - // nop - } - - /** Discarded. */ - public void comment(char[] chars, int start, int length) - throws TransformerException { - // nop - } - - /** Discarded. */ - public void endDocument() - throws TransformerException { - // nop - } - - /** Discarded. */ - public void endElement(int nameCode) - throws TransformerException { - // nop - } - - /** Discarded. */ - public void processingInstruction(java.lang.String name, - java.lang.String data) - throws TransformerException { - // nop - } - - /** Discarded. */ - public void setDocumentLocator(org.xml.sax.Locator locator) { - // nop - } - - /** Discarded. */ - public void setEscaping(boolean escaping) - throws TransformerException { - // nop - } - - /** Discarded. */ - public void setNamePool(NamePool namePool) { - // nop - } - - /** Discarded. */ - public void setUnparsedEntity(java.lang.String name, java.lang.String uri) - throws TransformerException { - // nop - } - - /** Discarded. */ - public void setWriter(java.io.Writer writer) { - // nop - } - - /** Discarded. */ - public void startDocument() - throws TransformerException { - // nop - } - - /** Examine for column info. */ - public void startElement(int nameCode, - org.xml.sax.Attributes attributes, - int[] namespaces, int nscount) - throws TransformerException { - - int thisFingerprint = namePool.getFingerprint(nameCode); - int colFingerprint = namePool.getFingerprint("", "col"); - int foColFingerprint = namePool.getFingerprint(foURI, "table-column"); - - if (thisFingerprint == colFingerprint - || thisFingerprint == foColFingerprint) { - if (numColumns >= width.length) { - String newWidth[] = new String[width.length+10]; - for (int count = 0; count < width.length; count++) { - newWidth[count] = width[count]; - } - width = newWidth; - } - - if (thisFingerprint == colFingerprint) { - if (attributes.getValue("width") == null) { - width[numColumns++] = "1*"; - } else { - width[numColumns++] = attributes.getValue("width"); - } - } else { - if (attributes.getValue("column-width") == null) { - width[numColumns++] = "1*"; - } else { - width[numColumns++] = attributes.getValue("column-width"); - } - } - } - } -} - - diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/ColumnUpdateEmitter.java b/xsl/extensions/saxon642/com/nwalsh/saxon/ColumnUpdateEmitter.java deleted file mode 100644 index 91290e819..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/ColumnUpdateEmitter.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.nwalsh.saxon; - -import org.xml.sax.*; -import com.icl.saxon.output.*; -import com.icl.saxon.om.*; -import javax.xml.transform.TransformerException; -import com.icl.saxon.expr.FragmentValue; -import com.icl.saxon.tree.AttributeCollection; - -/** - *

Saxon extension to scan the column widthsin a result tree fragment.

- * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides a - * Saxon 6.* - * implementation to scan the column widths in a result tree - * fragment.

- * - *

The general design is this: the stylesheets construct a result tree - * fragment for some colgroup environment. That result tree fragment - * is "replayed" through the ColumnUpdateEmitter; the ColumnUpdateEmitter watches - * the cols go by and extracts the column widths that it sees. These - * widths are then made available.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class ColumnUpdateEmitter extends CopyEmitter { - /** The number of columns seen. */ - protected int numColumns = 0; - protected String width[] = null; - protected NamePool namePool = null; - - /** The FO namespace name. */ - protected static String foURI = "http://www.w3.org/1999/XSL/Format"; - - /** Construct a new ColumnUpdateEmitter. */ - public ColumnUpdateEmitter(NamePool namePool, - String width[]) { - super(namePool); - numColumns = 0; - this.width = width; - this.namePool = namePool; - } - - /** Examine for column info. */ - public void startElement(int nameCode, - org.xml.sax.Attributes attributes, - int[] namespaces, int nscount) - throws TransformerException { - - int thisFingerprint = namePool.getFingerprint(nameCode); - int colFingerprint = namePool.getFingerprint("", "col"); - int foColFingerprint = namePool.getFingerprint(foURI, "table-column"); - - if (thisFingerprint == colFingerprint) { - AttributeCollection attr = new AttributeCollection(namePool, attributes); - int widthFingerprint = namePool.getFingerprint("", "width"); - - if (attr.getValueByFingerprint(widthFingerprint) == null) { - attr.addAttribute(widthFingerprint, "CDATA", width[numColumns++]); - } else { - attr.setAttribute(widthFingerprint, "CDATA", width[numColumns++]); - } - attributes = attr; - } else if (thisFingerprint == foColFingerprint) { - AttributeCollection attr = new AttributeCollection(namePool, attributes); - int widthFingerprint = namePool.getFingerprint("", "column-width"); - - if (attr.getValueByFingerprint(widthFingerprint) == null) { - attr.addAttribute(widthFingerprint, "CDATA", width[numColumns++]); - } else { - attr.setAttribute(widthFingerprint, "CDATA", width[numColumns++]); - } - attributes = attr; - } - - rtfEmitter.startElement(nameCode, attributes, namespaces, nscount); - } -} - - diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/CopyEmitter.java b/xsl/extensions/saxon642/com/nwalsh/saxon/CopyEmitter.java deleted file mode 100644 index 66b30d19a..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/CopyEmitter.java +++ /dev/null @@ -1,148 +0,0 @@ -package com.nwalsh.saxon; - -import java.util.Stack; -import java.util.StringTokenizer; -import org.xml.sax.*; -import org.w3c.dom.*; -import javax.xml.transform.TransformerException; -import com.icl.saxon.Context; -import com.icl.saxon.expr.*; -import com.icl.saxon.functions.Extensions; -import com.icl.saxon.om.*; -import com.icl.saxon.output.*; -import com.icl.saxon.pattern.*; -import com.icl.saxon.tree.*; - -/** - *

A Saxon 6.0 Emitter that clones its input.

- * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides a - * Saxon 6.* - * implementation of an emitter that manufactures a cloned result - * tree fragment.

- * - *

The purpose of this emitter is to provide something for - * CalloutEmitter and NumberLinesEmitter to extend. - * This emitter simply copies all input to a new result tree fragment.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @see CalloutEmitter - * @see NumberLinesEmitter - * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class CopyEmitter extends com.icl.saxon.output.Emitter { - /** The result tree fragment containing the copied fragment. */ - protected FragmentValue rtf = null; - protected Emitter rtfEmitter = null; - - /**

The namePool.

- * - *

Copied from the caller, it should be the runtime name pool.

- */ - protected NamePool namePool = null; - - /**

Constructor for the CopyEmitter.

- * - * @param namePool The name pool to use for constructing elements and attributes. - */ - public CopyEmitter(NamePool namePool) { - rtf = new FragmentValue(); - rtfEmitter = rtf.getEmitter(); - this.namePool = namePool; - } - - /** - *

Return the result tree fragment constructed by replaying events - * through this emitter.

- */ - public FragmentValue getResultTreeFragment() { - return rtf; - } - - /** Copy characters. */ - public void characters(char[] chars, int start, int len) - throws TransformerException { - rtfEmitter.characters(chars, start, len); - } - - /** Copy comments. */ - public void comment(char[] chars, int start, int length) - throws TransformerException { - rtfEmitter.comment(chars, start, length); - } - - /** Copy end document events. */ - public void endDocument() - throws TransformerException { - rtfEmitter.endDocument(); - } - - /** Copy end element events. */ - public void endElement(int nameCode) - throws TransformerException { - rtfEmitter.endElement(nameCode); - } - - /** Copy processing instructions. */ - public void processingInstruction(java.lang.String name, - java.lang.String data) - throws TransformerException { - rtfEmitter.processingInstruction(name, data); - } - - /** Copy set document locator events. */ - public void setDocumentLocator(org.xml.sax.Locator locator) { - rtfEmitter.setDocumentLocator(locator); - } - - /** Copy set escaping events. */ - public void setEscaping(boolean escaping) - throws TransformerException { - rtfEmitter.setEscaping(escaping); - } - - /** Copy set name pool events. */ - public void setNamePool(NamePool namePool) { - rtfEmitter.setNamePool(namePool); - } - - /** Copy set unparsed entity events. */ - public void setUnparsedEntity(java.lang.String name, java.lang.String uri) - throws TransformerException { - rtfEmitter.setUnparsedEntity(name, uri); - } - - /** Copy set writer events. */ - public void setWriter(java.io.Writer writer) { - rtfEmitter.setWriter(writer); - } - - /** Copy start document events. */ - public void startDocument() - throws TransformerException { - rtfEmitter.startDocument(); - } - - /** Copy start element events. */ - public void startElement(int nameCode, - org.xml.sax.Attributes attributes, - int[] namespaces, - int nscount) - throws TransformerException { - rtfEmitter.startElement(nameCode, attributes, namespaces, nscount); - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatCallout.java b/xsl/extensions/saxon642/com/nwalsh/saxon/FormatCallout.java deleted file mode 100644 index 256a3b513..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatCallout.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.nwalsh.saxon; - -import org.xml.sax.SAXException; -import org.w3c.dom.*; - -import javax.xml.transform.TransformerException; - -import com.icl.saxon.om.NamePool; -import com.icl.saxon.output.Emitter; -import com.icl.saxon.tree.AttributeCollection; - -import com.nwalsh.saxon.Callout; - -/** - *

Utility class for the Verbatim extension (ignore this).

- * - *

$Id$

- * - *

Copyright (C) 2000, 2001 Norman Walsh.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @see Verbatim - * - * @version $Id$ - **/ - -public abstract class FormatCallout { - 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 foStylesheet = false; - protected NamePool namePool = null; - - public FormatCallout(NamePool nPool, boolean fo) { - namePool = nPool; - foStylesheet = fo; - } - - public String areaLabel(Element area) { - String label = null; - - if (area.hasAttribute("label")) { - // If this area has a label, use it - label = area.getAttribute("label"); - } else { - // Otherwise, if its parent is an areaset and it has a label, use that - Element parent = (Element) area.getParentNode(); - if (parent != null - && parent.getLocalName().equalsIgnoreCase("areaset") - && parent.hasAttribute("label")) { - label = parent.getAttribute("label"); - } - } - - return label; - } - - public void startSpan(Emitter rtf) - throws TransformerException { - // no point in doing this for FO, right? - if (!foStylesheet && namePool != null) { - int spanName = namePool.allocate("", "", "span"); - AttributeCollection spanAttr = new AttributeCollection(namePool); - int namespaces[] = new int[1]; - spanAttr.addAttribute("", "", "class", "CDATA", "co"); - rtf.startElement(spanName, spanAttr, namespaces, 0); - } - } - - public void endSpan(Emitter rtf) - throws TransformerException { - // no point in doing this for FO, right? - if (!foStylesheet && namePool != null) { - int spanName = namePool.allocate("", "", "span"); - rtf.endElement(spanName); - } - } - - public void formatTextCallout(Emitter rtfEmitter, - Callout callout) { - Element area = callout.getArea(); - int num = callout.getCallout(); - String userLabel = areaLabel(area); - String label = "(" + num + ")"; - - if (userLabel != null) { - label = userLabel; - } - - char chars[] = label.toCharArray(); - - try { - startSpan(rtfEmitter); - rtfEmitter.characters(chars, 0, label.length()); - endSpan(rtfEmitter); - } catch (TransformerException e) { - System.out.println("Transformer Exception in formatTextCallout"); - } - } - - public abstract void formatCallout(Emitter rtfEmitter, - Callout callout); -} - diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatGraphicCallout.java b/xsl/extensions/saxon642/com/nwalsh/saxon/FormatGraphicCallout.java deleted file mode 100644 index 3cb392651..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatGraphicCallout.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.nwalsh.saxon; - -import org.xml.sax.SAXException; -import org.w3c.dom.*; - -import javax.xml.transform.TransformerException; - -import com.icl.saxon.om.NamePool; -import com.icl.saxon.output.Emitter; -import com.icl.saxon.tree.AttributeCollection; - -import com.nwalsh.saxon.Callout; - -/** - *

Utility class for the Verbatim extension (ignore this).

- * - *

$Id$

- * - *

Copyright (C) 2000, 2001 Norman Walsh.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @see Verbatim - * - * @version $Id$ - **/ - -public class FormatGraphicCallout extends FormatCallout { - String graphicsPath = ""; - String graphicsExt = ""; - int graphicsMax = 0; - - public FormatGraphicCallout(NamePool nPool, String path, String ext, int max, boolean fo) { - super(nPool, fo); - graphicsPath = path; - graphicsExt = ext; - graphicsMax = max; - } - - public void formatCallout(Emitter rtfEmitter, - Callout callout) { - Element area = callout.getArea(); - int num = callout.getCallout(); - String userLabel = areaLabel(area); - String label = "(" + num + ")"; - - if (userLabel != null) { - label = userLabel; - } - - try { - if (userLabel == null && num <= graphicsMax) { - int imgName = 0; - AttributeCollection imgAttr = null; - int namespaces[] = new int[1]; - - if (foStylesheet) { - imgName = namePool.allocate("fo", foURI, "external-graphic"); - imgAttr = new AttributeCollection(namePool); - imgAttr.addAttribute("", "", "src", "CDATA", - graphicsPath + num + graphicsExt); - } else { - imgName = namePool.allocate("", "", "img"); - imgAttr = new AttributeCollection(namePool); - imgAttr.addAttribute("", "", "src", "CDATA", - graphicsPath + num + graphicsExt); - imgAttr.addAttribute("", "", "alt", "CDATA", label); - } - - startSpan(rtfEmitter); - rtfEmitter.startElement(imgName, imgAttr, namespaces, 0); - rtfEmitter.endElement(imgName); - endSpan(rtfEmitter); - } else { - formatTextCallout(rtfEmitter, callout); - } - } catch (TransformerException e) { - System.out.println("Transformer Exception in graphic formatCallout"); - } - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatTextCallout.java b/xsl/extensions/saxon642/com/nwalsh/saxon/FormatTextCallout.java deleted file mode 100644 index 6e2d75c1b..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatTextCallout.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.nwalsh.saxon; - -import org.xml.sax.SAXException; -import org.w3c.dom.*; - -import javax.xml.transform.TransformerException; - -import com.icl.saxon.om.NamePool; -import com.icl.saxon.output.Emitter; - -import com.nwalsh.saxon.Callout; - -/** - *

Utility class for the Verbatim extension (ignore this).

- * - *

$Id$

- * - *

Copyright (C) 2000, 2001 Norman Walsh.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @see Verbatim - * - * @version $Id$ - **/ - -public class FormatTextCallout extends FormatCallout { - public FormatTextCallout(NamePool nPool, boolean fo) { - super(nPool, fo); - } - - public void formatCallout(Emitter rtfEmitter, - Callout callout) { - formatTextCallout(rtfEmitter, callout); - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatUnicodeCallout.java b/xsl/extensions/saxon642/com/nwalsh/saxon/FormatUnicodeCallout.java deleted file mode 100644 index e51e1c074..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/FormatUnicodeCallout.java +++ /dev/null @@ -1,98 +0,0 @@ -package com.nwalsh.saxon; - -import org.xml.sax.SAXException; -import org.w3c.dom.*; - -import javax.xml.transform.TransformerException; - -import com.icl.saxon.om.NamePool; -import com.icl.saxon.output.Emitter; -import com.icl.saxon.tree.AttributeCollection; - -import com.nwalsh.saxon.Callout; - -/** - *

Utility class for the Verbatim extension (ignore this).

- * - *

$Id$

- * - *

Copyright (C) 2000, 2001 Norman Walsh.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @see Verbatim - * - * @version $Id$ - **/ - -public class FormatUnicodeCallout extends FormatCallout { - int unicodeMax = 0; - int unicodeStart = 0; - String unicodeFont = ""; - - public FormatUnicodeCallout(NamePool nPool, - String font, - int start, - int max, - boolean fo) { - super(nPool, fo); - unicodeFont = font; - unicodeMax = max; - unicodeStart = start; - } - - public void formatCallout(Emitter rtfEmitter, - Callout callout) { - Element area = callout.getArea(); - int num = callout.getCallout(); - String userLabel = areaLabel(area); - String label = ""; - - if (userLabel != null) { - label = userLabel; - } - - try { - if (userLabel == null && num <= unicodeMax) { - int inName = 0; - AttributeCollection inAttr = null; - int namespaces[] = new int[1]; - - if (!unicodeFont.equals("")) { - if (foStylesheet) { - inName = namePool.allocate("fo", foURI, "inline"); - inAttr = new AttributeCollection(namePool); - inAttr.addAttribute("", "", "font-family", "CDATA", unicodeFont); - } else { - inName = namePool.allocate("", "", "font"); - inAttr = new AttributeCollection(namePool); - inAttr.addAttribute("", "", "face", "CDATA", unicodeFont); - } - - startSpan(rtfEmitter); - rtfEmitter.startElement(inName, inAttr, namespaces, 0); - } - - char chars[] = new char[1]; - chars[0] = (char) (unicodeStart + num - 1); - rtfEmitter.characters(chars, 0, 1); - - if (!unicodeFont.equals("")) { - rtfEmitter.endElement(inName); - endSpan(rtfEmitter); - } - } else { - formatTextCallout(rtfEmitter, callout); - } - } catch (TransformerException e) { - System.out.println("Transformer Exception in graphic formatCallout"); - } - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/LineCountEmitter.java b/xsl/extensions/saxon642/com/nwalsh/saxon/LineCountEmitter.java deleted file mode 100644 index 5febeda3d..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/LineCountEmitter.java +++ /dev/null @@ -1,141 +0,0 @@ -package com.nwalsh.saxon; - -import org.xml.sax.*; -import javax.xml.transform.TransformerException; -import com.icl.saxon.output.*; -import com.icl.saxon.om.*; -import com.icl.saxon.expr.FragmentValue; - -/** - *

Saxon extension to count the lines in a result tree fragment.

- * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides a - * Saxon 6.* - * implementation to count the number of lines in a result tree - * fragment.

- * - *

The general design is this: the stylesheets construct a result tree - * fragment for some verbatim environment. That result tree fragment - * is "replayed" through the LineCountEmitter; the LineCountEmitter watches - * characters go by and counts the number of line feeds that it sees. - * That number is then returned.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @see Verbatim - * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class LineCountEmitter extends com.icl.saxon.output.Emitter { - /** The number of lines seen. */ - protected int numLines = 0; - - /** Construct a new LineCountEmitter. */ - public LineCountEmitter() { - numLines = 0; - } - - /** Reset the number of lines. */ - public void reset() { - numLines = 0; - } - - /** Return the number of lines. */ - public int lineCount() { - return numLines; - } - - /** Process characters. */ - public void characters(char[] chars, int start, int len) - throws javax.xml.transform.TransformerException { - - if (numLines == 0) { - // If there are any characters at all, there's at least one line - numLines++; - } - - for (int count = start; count < start+len; count++) { - if (chars[count] == '\n') { - numLines++; - } - } - } - - /** Discarded. */ - public void comment(char[] chars, int start, int length) - throws javax.xml.transform.TransformerException { - // nop - } - - /** Discarded. */ - public void endDocument() - throws javax.xml.transform.TransformerException { - // nop - } - - /** Discarded. */ - public void endElement(int nameCode) - throws javax.xml.transform.TransformerException { - // nop - } - - /** Discarded. */ - public void processingInstruction(java.lang.String name, - java.lang.String data) - throws javax.xml.transform.TransformerException { - // nop - } - - /** Discarded. */ - public void setDocumentLocator(org.xml.sax.Locator locator) { - // nop - } - - /** Discarded. */ - public void setEscaping(boolean escaping) - throws javax.xml.transform.TransformerException { - // nop - } - - /** Discarded. */ - public void setNamePool(NamePool namePool) { - // nop - } - - /** Discarded. */ - public void setUnparsedEntity(java.lang.String name, java.lang.String uri) - throws javax.xml.transform.TransformerException { - // nop - } - - /** Discarded. */ - public void setWriter(java.io.Writer writer) { - // nop - } - - /** Discarded. */ - public void startDocument() - throws javax.xml.transform.TransformerException { - // nop - } - - /** Discarded. */ - public void startElement(int nameCode, - org.xml.sax.Attributes attributes, - int[] namespaces, int nscount) - throws javax.xml.transform.TransformerException { - // nop - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/NumberLinesEmitter.java b/xsl/extensions/saxon642/com/nwalsh/saxon/NumberLinesEmitter.java deleted file mode 100644 index c1656b1fb..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/NumberLinesEmitter.java +++ /dev/null @@ -1,322 +0,0 @@ -package com.nwalsh.saxon; - -import java.util.Stack; -import java.util.StringTokenizer; -import org.xml.sax.*; -import org.w3c.dom.*; -import javax.xml.transform.TransformerException; -import com.icl.saxon.output.*; -import com.icl.saxon.om.*; -import com.icl.saxon.tree.AttributeCollection; -import com.icl.saxon.expr.FragmentValue; - -/** - *

Saxon extension to decorate a result tree fragment with line numbers.

- * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides the guts of a - * Saxon 6.* - * implementation of line numbering for verbatim environments. (It is used - * by the Verbatim class.)

- * - *

The general design is this: the stylesheets construct a result tree - * fragment for some verbatim environment. The Verbatim class initializes - * a NumberLinesEmitter with information about what lines should be - * numbered and how. Then the result tree fragment - * is "replayed" through the NumberLinesEmitter; the NumberLinesEmitter - * builds a - * new result tree fragment from this event stream, decorated with line - * numbers, - * and that is returned.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @see Verbatim - * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class NumberLinesEmitter extends CopyEmitter { - /** A stack for the preserving information about open elements. */ - protected Stack elementStack = null; - - /** The current line number. */ - protected int lineNumber = 0; - - /** Is the next element absolutely the first element in the fragment? */ - protected boolean firstElement = false; - - /** The FO namespace name. */ - protected static String foURI = "http://www.w3.org/1999/XSL/Format"; - - /** Every modulus line will be numbered. */ - protected int modulus = 5; - - /** Line numbers are width characters wide. */ - protected int width = 3; - - /** Line numbers are separated from the listing by separator. */ - protected String separator = " "; - - /** Is the stylesheet currently running an FO stylesheet? */ - protected boolean foStylesheet = false; - - /**

Constructor for the NumberLinesEmitter.

- * - * @param namePool The name pool to use for constructing elements and attributes. - * @param modulus The modulus to use for this listing. - * @param width The width to use for line numbers in this listing. - * @param separator The separator to use for this listing. - * @param foStylesheet Is this an FO stylesheet? - */ - public NumberLinesEmitter(NamePool namePool, - int modulus, - int width, - String separator, - boolean foStylesheet) { - super(namePool); - elementStack = new Stack(); - firstElement = true; - - this.modulus = modulus; - this.width = width; - this.separator = separator; - this.foStylesheet = foStylesheet; - } - - /** Process characters. */ - public void characters(char[] chars, int start, int len) - throws TransformerException { - - // If we hit characters, then there's no first element... - firstElement = false; - - if (lineNumber == 0) { - // The first line is always numbered - formatLineNumber(++lineNumber); - } - - // Walk through the text node looking for newlines - char[] newChars = new char[len]; - int pos = 0; - for (int count = start; count < start+len; count++) { - if (chars[count] == '\n') { - // This is the tricky bit; if we find a newline, make sure - // it doesn't occur inside any markup. - - if (pos > 0) { - // Output any characters that preceded this newline - rtfEmitter.characters(newChars, 0, pos); - pos = 0; - } - - // Close all the open elements... - Stack tempStack = new Stack(); - while (!elementStack.empty()) { - StartElementInfo elem = (StartElementInfo) elementStack.pop(); - rtfEmitter.endElement(elem.getNameCode()); - tempStack.push(elem); - } - - // Copy the newline to the output - newChars[pos++] = chars[count]; - rtfEmitter.characters(newChars, 0, pos); - pos = 0; - - // Add the line number - formatLineNumber(++lineNumber); - - // Now "reopen" the elements that we closed... - while (!tempStack.empty()) { - StartElementInfo elem = (StartElementInfo) tempStack.pop(); - AttributeCollection attr = (AttributeCollection)elem.getAttributes(); - AttributeCollection newAttr = new AttributeCollection(namePool); - - for (int acount = 0; acount < attr.getLength(); acount++) { - String localName = attr.getLocalName(acount); - int nameCode = attr.getNameCode(acount); - String type = attr.getType(acount); - String value = attr.getValue(acount); - String uri = attr.getURI(acount); - String prefix = ""; - - if (localName.indexOf(':') > 0) { - prefix = localName.substring(0, localName.indexOf(':')); - localName = localName.substring(localName.indexOf(':')+1); - } - - if (uri.equals("") - && ((foStylesheet - && localName.equals("id")) - || (!foStylesheet - && (localName.equals("id") - || localName.equals("name"))))) { - // skip this attribute - } else { - newAttr.addAttribute(prefix, uri, localName, type, value); - } - } - - rtfEmitter.startElement(elem.getNameCode(), - newAttr, - elem.getNamespaces(), - elem.getNSCount()); - - elementStack.push(elem); - } - } else { - newChars[pos++] = chars[count]; - } - } - - if (pos > 0) { - rtfEmitter.characters(newChars, 0, pos); - pos = 0; - } - } - - /** - *

Add a formatted line number to the result tree fragment.

- * - * @param lineNumber The number of the current line. - */ - protected void formatLineNumber(int lineNumber) - throws TransformerException { - - char ch = 160; //   - - String lno = ""; - if (lineNumber == 1 - || (modulus >= 1 && (lineNumber % modulus == 0))) { - lno = "" + lineNumber; - } - - while (lno.length() < width) { - lno = ch + lno; - } - - lno += separator; - - char chars[] = new char[lno.length()]; - for (int count = 0; count < lno.length(); count++) { - chars[count] = lno.charAt(count); - } - - characters(chars, 0, lno.length()); - } - - /** Process end element events. */ - public void endElement(int nameCode) - throws TransformerException { - if (!elementStack.empty()) { - // if we didn't push the very first element (an fo:block or - // pre or div surrounding the whole block), then the stack will - // be empty when we get to the end of the first element... - elementStack.pop(); - } - rtfEmitter.endElement(nameCode); - } - - /** Process start element events. */ - public void startElement(int nameCode, - org.xml.sax.Attributes attributes, - int[] namespaces, - int nscount) - throws TransformerException { - - if (!skipThisElement(nameCode)) { - StartElementInfo sei = new StartElementInfo(nameCode, attributes, - namespaces, nscount); - elementStack.push(sei); - } - - firstElement = false; - - rtfEmitter.startElement(nameCode, attributes, namespaces, nscount); - } - - /** - *

Protect the outer-most block wrapper.

- * - *

Open elements in the result tree fragment are closed and reopened - * around callouts (so that callouts don't appear inside links or other - * environments). But if the result tree fragment is a single block - * (a div or pre in HTML, an fo:block in FO), that outer-most block is - * treated specially.

- * - *

This method returns true if the element in question is that - * outermost block.

- * - * @param nameCode The name code for the element - * - * @return True if the element is the outer-most block, false otherwise. - */ - protected boolean skipThisElement(int nameCode) { - if (firstElement) { - int thisFingerprint = namePool.getFingerprint(nameCode); - int foBlockFingerprint = namePool.getFingerprint(foURI, "block"); - int htmlPreFingerprint = namePool.getFingerprint("", "pre"); - int htmlDivFingerprint = namePool.getFingerprint("", "div"); - - if ((foStylesheet && thisFingerprint == foBlockFingerprint) - || (!foStylesheet && (thisFingerprint == htmlPreFingerprint - || thisFingerprint == htmlDivFingerprint))) { - // Don't push the outer-most wrapping div, pre, or fo:block - return true; - } - } - - return false; - } - - /** - *

A private class for maintaining the information required to call - * the startElement method.

- * - *

In order to close and reopen elements, information about those - * elements has to be maintained. This class is just the little record - * that we push on the stack to keep track of that info.

- */ - private class StartElementInfo { - private int _nameCode; - org.xml.sax.Attributes _attributes; - int[] _namespaces; - int _nscount; - - public StartElementInfo(int nameCode, - org.xml.sax.Attributes attributes, - int[] namespaces, - int nscount) { - _nameCode = nameCode; - _attributes = attributes; - _namespaces = namespaces; - _nscount = nscount; - } - - public int getNameCode() { - return _nameCode; - } - - public org.xml.sax.Attributes getAttributes() { - return _attributes; - } - - public int[] getNamespaces() { - return _namespaces; - } - - public int getNSCount() { - return _nscount; - } - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/Table.java b/xsl/extensions/saxon642/com/nwalsh/saxon/Table.java deleted file mode 100644 index eccdee181..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/Table.java +++ /dev/null @@ -1,431 +0,0 @@ -// Verbatim.java - Saxon extensions supporting DocBook verbatim environments - -package com.nwalsh.saxon; - -import java.util.Hashtable; -import org.xml.sax.*; -import org.w3c.dom.*; -import javax.xml.transform.TransformerException; -import com.icl.saxon.expr.*; -import com.icl.saxon.om.*; -import com.icl.saxon.pattern.*; -import com.icl.saxon.Context; -import com.icl.saxon.tree.*; -import com.icl.saxon.functions.Extensions; - -/** - *

Saxon extensions supporting Tables

- * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides a - * Saxon - * implementation of some code to adjust CALS Tables to HTML - * Tables.

- * - *

Column Widths

- *

The adjustColumnWidths method takes a result tree - * fragment (assumed to contain the colgroup of an HTML Table) - * and returns the result tree fragment with the column widths - * adjusted to HTML terms.

- * - *

Convert Lengths

- *

The convertLength method takes a length specification - * of the form 9999.99xx (where "xx" is a unit) and returns that length - * as an integral number of pixels. For convenience, percentage lengths - * are returned unchanged.

- *

The recognized units are: inches (in), centimeters (cm), - * millimeters (mm), picas (pc, 1pc=12pt), points (pt), and pixels (px). - * A number with no units is assumed to be pixels.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class Table { - /** The number of pixels per inch */ - private static int pixelsPerInch = 96; - - /** The nominal table width (6in by default). */ - private static int nominalWidth = 6 * pixelsPerInch; - - /** The default table width (100% by default). */ - private static String tableWidth = "100%"; - - /** Is this an FO stylesheet? */ - private static boolean foStylesheet = false; - - /** The hash used to associate units with a length in pixels. */ - protected static Hashtable unitHash = null; - - /** - *

Constructor for Verbatim

- * - *

All of the methods are static, so the constructor does nothing.

- */ - public Table() { - } - - /** Initialize the internal hash table with proper values. */ - protected static void initializeHash() { - unitHash = new Hashtable(); - unitHash.put("in", new Float(pixelsPerInch)); - unitHash.put("cm", new Float(pixelsPerInch / 2.54)); - unitHash.put("mm", new Float(pixelsPerInch / 25.4)); - unitHash.put("pc", new Float((pixelsPerInch / 72) * 12)); - unitHash.put("pt", new Float(pixelsPerInch / 72)); - unitHash.put("px", new Float(1)); - } - - /** Set the pixels-per-inch value. Only positive values are legal. */ - public static void setPixelsPerInch(int value) { - if (value > 0) { - pixelsPerInch = value; - initializeHash(); - } - } - - /** Return the current pixels-per-inch value. */ - public int getPixelsPerInch() { - return pixelsPerInch; - } - - /** - *

Convert a length specification to a number of pixels.

- * - *

The specified length should be of the form [+/-]999.99xx, - * where xx is a valid unit.

- */ - public static int convertLength(String length) { - // The format of length should be 999.999xx - int sign = 1; - String digits = ""; - String units = ""; - char lench[] = length.toCharArray(); - float flength = 0; - boolean done = false; - int pos = 0; - float factor = 1; - int pixels = 0; - - if (unitHash == null) { - initializeHash(); - } - - if (lench[pos] == '+' || lench[pos] == '-') { - if (lench[pos] == '-') { - sign = -1; - } - pos++; - } - - while (!done) { - if (pos >= lench.length) { - done = true; - } else { - if ((lench[pos] > '9' || lench[pos] < '0') && lench[pos] != '.') { - done = true; - units = length.substring(pos); - } else { - digits += lench[pos++]; - } - } - } - - try { - flength = Float.parseFloat(digits); - } catch (NumberFormatException e) { - System.out.println(digits + " is not a number; 1 used instead."); - flength = 1; - } - - Float f = null; - - if (!units.equals("")) { - f = (Float) unitHash.get(units); - if (f == null) { - System.out.println(units + " is not a known unit; 1 used instead."); - factor = 1; - } else { - factor = f.floatValue(); - } - } else { - factor = 1; - } - - f = new Float(flength * factor); - - pixels = f.intValue() * sign; - - return pixels; - } - - /** - *

Find the string value of a stylesheet variable or parameter

- * - *

Returns the string value of varName in the current - * context. Returns the empty string if the variable is - * not defined.

- * - * @param context The current stylesheet context - * @param varName The name of the variable (without the dollar sign) - * - * @return The string value of the variable - */ - protected static String getVariable(Context context, String varName) - throws TransformerException { - Value variable = null; - String varString = null; - - try { - variable = Extensions.evaluate(context, "$" + varName); - varString = variable.asString(); - return varString; - } catch (IllegalArgumentException e) { - System.out.println("Undefined variable: " + varName); - return ""; - } - } - - /** - *

Setup the parameters associated with column width calculations

- * - *

This method queries the stylesheet for the variables - * associated with table column widths. It is called automatically before - * column widths are adjusted. The context is used to retrieve the values, - * this allows templates to redefine these variables.

- * - *

The following variables are queried. If the variables do not - * exist, builtin defaults will be used (but you may also get a bunch - * of messages from the Java interpreter).

- * - *
- *
nominal.table.width
- *
The "normal" width for tables. This must be an absolute length.
- *
table.width
- *
The width for tables. This may be either an absolute - * length or a percentage.
- *
- * - * @param context The current stylesheet context - * - */ - private static void setupColumnWidths(Context context) { - // Hardcoded defaults - nominalWidth = 6 * pixelsPerInch; - tableWidth = "100%"; - - String varString = null; - - try { - // Get the stylesheet type - varString = getVariable(context, "stylesheet.result.type"); - foStylesheet = varString.equals("fo"); - - // Get the nominal table width - varString = getVariable(context, "nominal.table.width"); - nominalWidth = convertLength(varString); - - // Get the table width - varString = getVariable(context, "table.width"); - tableWidth = varString; - } catch (TransformerException e) { - //nop, can't happen - } - } - - /** - *

Adjust column widths in an HTML table.

- * - *

The specification of column widths in CALS (a relative width - * plus an optional absolute width) are incompatible with HTML column - * widths. This method adjusts CALS column width specifiers in an - * attempt to produce equivalent HTML specifiers.

- * - *

In order for this method to work, the CALS width specifications - * should be placed in the "width" attribute of the <col>s within - * a <colgroup>. Then the colgroup result tree fragment is passed - * to this method.

- * - *

This method makes use of two parameters from the XSL stylesheet - * that calls it: nominal.table.width and - * table.width. The value of nominal.table.width - * must be an absolute distance. The value of table.width - * can be either absolute or relative.

- * - *

Presented with a mixture of relative and - * absolute lengths, the table width is used to calculate - * appropriate values. If the table.width is relative, - * the nominal width is used for this calculation.

- * - *

There are three possible combinations of values:

- * - *
    - *
  1. There are no relative widths; in this case the absolute widths - * are used in the HTML table.
  2. - *
  3. There are no absolute widths; in this case the relative widths - * are used in the HTML table.
  4. - *
  5. There are a mixture of absolute and relative widths: - *
      - *
    1. If the table width is absolute, all widths become absolute.
    2. - *
    3. If the table width is relative, make all the widths absolute - * relative to the nominal table width then turn them all - * back into relative widths.
    4. - *
    - *
  6. - *
- * - * @param context The stylesheet context; supplied automatically by Saxon - * @param rtf The result tree fragment containing the colgroup. - * - * @return The result tree fragment containing the adjusted colgroup. - * - */ - public static NodeSetValue adjustColumnWidths (Context context, - NodeSetValue rtf_ns) { - - FragmentValue rtf = (FragmentValue) rtf_ns; - - setupColumnWidths(context); - - try { - NamePool namePool = context.getController().getNamePool(); - - ColumnScanEmitter csEmitter = new ColumnScanEmitter(namePool); - rtf.replay(csEmitter); - - int numColumns = csEmitter.columnCount(); - String widths[] = csEmitter.columnWidths(); - - float relTotal = 0; - float relParts[] = new float[numColumns]; - - float absTotal = 0; - float absParts[] = new float[numColumns]; - - for (int count = 0; count < numColumns; count++) { - String width = widths[count]; - - int pos = width.indexOf("*"); - if (pos >= 0) { - String relPart = width.substring(0, pos); - String absPart = width.substring(pos+1); - - try { - float rel = Float.parseFloat(relPart); - relTotal += rel; - relParts[count] = rel; - } catch (NumberFormatException e) { - System.out.println(relPart + " is not a valid relative unit."); - } - - int pixels = 0; - if (absPart != null && !absPart.equals("")) { - pixels = convertLength(absPart); - } - - absTotal += pixels; - absParts[count] = pixels; - } else { - relParts[count] = 0; - - int pixels = 0; - if (width != null && !width.equals("")) { - pixels = convertLength(width); - } - - absTotal += pixels; - absParts[count] = pixels; - } - } - - // Ok, now we have the relative widths and absolute widths in - // two parallel arrays. - // - // - If there are no relative widths, output the absolute widths - // - If there are no absolute widths, output the relative widths - // - If there are a mixture of relative and absolute widths, - // - If the table width is absolute, turn these all into absolute - // widths. - // - If the table width is relative, turn these all into absolute - // widths in the nominalWidth and then turn them back into - // percentages. - - if (relTotal == 0) { - for (int count = 0; count < numColumns; count++) { - Float f = new Float(absParts[count]); - if (foStylesheet) { - int pixels = f.intValue(); - float inches = (float) pixels / pixelsPerInch; - widths[count] = inches + "in"; - } else { - widths[count] = Integer.toString(f.intValue()); - } - } - } else if (absTotal == 0) { - for (int count = 0; count < numColumns; count++) { - float rel = relParts[count] / relTotal * 100; - Float f = new Float(rel); - widths[count] = Integer.toString(f.intValue()) + "%"; - } - } else { - int pixelWidth = nominalWidth; - - if (tableWidth.indexOf("%") <= 0) { - pixelWidth = convertLength(tableWidth); - } - - if (pixelWidth <= absTotal) { - System.out.println("Table is wider than table width."); - } else { - pixelWidth -= absTotal; - } - - absTotal = 0; - for (int count = 0; count < numColumns; count++) { - float rel = relParts[count] / relTotal * pixelWidth; - relParts[count] = rel + absParts[count]; - absTotal += rel + absParts[count]; - } - - if (tableWidth.indexOf("%") <= 0) { - for (int count = 0; count < numColumns; count++) { - Float f = new Float(relParts[count]); - if (foStylesheet) { - int pixels = f.intValue(); - float inches = (float) pixels / pixelsPerInch; - widths[count] = inches + "in"; - } else { - widths[count] = Integer.toString(f.intValue()); - } - } - } else { - for (int count = 0; count < numColumns; count++) { - float rel = relParts[count] / absTotal * 100; - Float f = new Float(rel); - widths[count] = Integer.toString(f.intValue()) + "%"; - } - } - } - - ColumnUpdateEmitter cuEmitter = new ColumnUpdateEmitter(namePool, - widths); - rtf.replay(cuEmitter); - return cuEmitter.getResultTreeFragment(); - } catch (TransformerException e) { - // This "can't" happen. - System.out.println("Transformer Exception in adjustColumnWidths"); - return rtf; - } - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/Text.java b/xsl/extensions/saxon642/com/nwalsh/saxon/Text.java deleted file mode 100644 index f5a95d7ff..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/Text.java +++ /dev/null @@ -1,132 +0,0 @@ -// Text - Saxon extension element for inserting text - -package com.nwalsh.saxon; - -import java.io.BufferedReader; -import java.io.InputStreamReader; -import java.io.InputStream; -import java.io.IOException; -import java.io.FileNotFoundException; -import java.net.URL; -import java.net.MalformedURLException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerConfigurationException; -import com.icl.saxon.*; -import com.icl.saxon.style.*; -import com.icl.saxon.expr.*; -import com.icl.saxon.output.*; -import org.xml.sax.AttributeList; - -/** - *

Saxon extension element for inserting text - * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides a - * Saxon - * extension element for inserting text into a result tree.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class Text extends StyleElement { - /** - *

Constructor for Text

- * - *

Does nothing.

- */ - public Text() { - } - - /** - *

Is this element an instruction?

- * - *

Yes, it is.

- * - * @return true - */ - public boolean isInstruction() { - return true; - } - - /** - *

Can this element contain a template-body?

- * - *

Yes, it can, but only so that it can contain xsl:fallback.

- * - * @return true - */ - public boolean mayContainTemplateBody() { - return true; - } - - /** - *

Validate the arguments

- * - *

The element must have an href attribute.

- */ - public void prepareAttributes() throws TransformerConfigurationException { - // Get mandatory href attribute - String fnAtt = getAttribute("href"); - if (fnAtt == null) { - reportAbsence("href"); - } - } - - /** Validate that the element occurs in a reasonable place. */ - public void validate() throws TransformerConfigurationException { - checkWithinTemplate(); - } - - /** - *

Insert the text of the file into the result tree

- * - *

Processing this element inserts the contents of the URL named - * by the href attribute into the result tree as plain text.

- * - */ - public void process( Context context ) throws TransformerException { - Outputter out = context.getOutputter(); - - String hrefAtt = getAttribute("href"); - Expression hrefExpr = makeAttributeValueTemplate(hrefAtt); - String href = hrefExpr.evaluateAsString(context); - URL fileURL = null; - - try { - try { - fileURL = new URL(href); - } catch (MalformedURLException e1) { - try { - fileURL = new URL("file:" + href); - } catch (MalformedURLException e2) { - System.out.println("Cannot open " + href); - return; - } - } - - InputStreamReader isr = new InputStreamReader(fileURL.openStream()); - BufferedReader is = new BufferedReader(isr); - - char chars[] = new char[4096]; - int len = 0; - while ((len = is.read(chars)) > 0) { - out.writeContent(chars, 0, len); - } - is.close(); - } catch (Exception e) { - System.out.println("Cannot read " + href); - } - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/TextFactory.java b/xsl/extensions/saxon642/com/nwalsh/saxon/TextFactory.java deleted file mode 100644 index ccf5001c0..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/TextFactory.java +++ /dev/null @@ -1,67 +0,0 @@ -// TextFactory - Saxon extension element factory - -package com.nwalsh.saxon; - -import com.icl.saxon.style.ExtensionElementFactory; -import org.xml.sax.SAXException; - -/** - *

Saxon extension element factory - * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides a - * Saxon - * extension element factory for the Text extension element - * family.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - * @see Text - * - */ -public class TextFactory implements ExtensionElementFactory { - /** - *

Constructor for TextFactory

- * - *

Does nothing.

- */ - public TextFactory() { - } - - /** - *

Return the class that implements a particular extension element.

- * - * @param localname The local name of the extension element. - * - * @return The class that handles that extension element. - * - * @exception SAXException("Unknown Text extension element") - */ - public Class getExtensionClass(String localname) { - if (localname.equals("insertfile")) { - try { - return Class.forName("com.nwalsh.saxon.Text"); - } catch (ClassNotFoundException e) { - return null; - } - } - return null; - } -} - - - - - diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/Verbatim.java b/xsl/extensions/saxon642/com/nwalsh/saxon/Verbatim.java deleted file mode 100644 index b2fae63b4..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/Verbatim.java +++ /dev/null @@ -1,471 +0,0 @@ -// Verbatim.java - Saxon extensions supporting DocBook verbatim environments - -package com.nwalsh.saxon; - -import java.util.Stack; -import java.util.StringTokenizer; -import org.xml.sax.*; -import org.w3c.dom.*; -import javax.xml.transform.TransformerException; -import com.icl.saxon.expr.*; -import com.icl.saxon.om.*; -import com.icl.saxon.pattern.*; -import com.icl.saxon.Context; -import com.icl.saxon.tree.*; -import com.icl.saxon.functions.Extensions; -import com.nwalsh.saxon.NumberLinesEmitter; -import com.nwalsh.saxon.CalloutEmitter; - -/** - *

Saxon extensions supporting DocBook verbatim environments

- * - *

$Id$

- * - *

Copyright (C) 2000 Norman Walsh.

- * - *

This class provides a - * Saxon - * implementation of two features that would be impractical to - * implement directly in XSLT: line numbering and callouts.

- * - *

Line Numbering

- *

The numberLines method takes a result tree - * fragment (assumed to contain the contents of a formatted verbatim - * element in DocBook: programlisting, screen, address, literallayout, - * or synopsis) and returns a result tree fragment decorated with - * line numbers.

- * - *

Callouts

- *

The insertCallouts method takes an - * areaspec and a result tree fragment - * (assumed to contain the contents of a formatted verbatim - * element in DocBook: programlisting, screen, address, literallayout, - * or synopsis) and returns a result tree fragment decorated with - * callouts.

- * - *

Change Log:

- *
- *
1.0
- *

Initial release.

- *
- * - * @author Norman Walsh - * ndw@nwalsh.com - * - * @version $Id$ - * - */ -public class Verbatim { - /** True if the stylesheet is producing formatting objects */ - private static boolean foStylesheet = false; - /** The modulus for line numbering (every 'modulus' line is numbered). */ - private static int modulus = 0; - /** The width (in characters) of line numbers (for padding). */ - private static int width = 0; - /** The separator between the line number and the verbatim text. */ - private static String separator = ""; - - /** True if callouts have been setup */ - private static boolean calloutsSetup = false; - /** The default column for callouts that have only a line or line range */ - private static int defaultColumn = 60; - /** The path to use for graphical callout decorations. */ - private static String graphicsPath = null; - /** The extension to use for graphical callout decorations. */ - private static String graphicsExt = null; - /** The largest callout number that can be represented graphically. */ - private static int graphicsMax = 10; - - /** The FormatCallout object to use for formatting callouts. */ - private static FormatCallout fCallout = null; - - /** - *

Constructor for Verbatim

- * - *

All of the methods are static, so the constructor does nothing.

- */ - public Verbatim() { - } - - /** - *

Find the string value of a stylesheet variable or parameter

- * - *

Returns the string value of varName in the current - * context. Returns the empty string if the variable is - * not defined.

- * - * @param context The current stylesheet context - * @param varName The name of the variable (without the dollar sign) - * - * @return The string value of the variable - */ - protected static String getVariable(Context context, String varName) { - Value variable = null; - String varString = null; - - try { - variable = Extensions.evaluate(context, "$" + varName); - varString = variable.asString(); - return varString; - } catch (TransformerException te) { - System.out.println("Undefined variable: " + varName); - return ""; - } catch (IllegalArgumentException iae) { - System.out.println("Undefined variable: " + varName); - return ""; - } - } - - /** - *

Setup the parameters associated with line numbering

- * - *

This method queries the stylesheet for the variables - * associated with line numbering. It is called automatically before - * lines are numbered. The context is used to retrieve the values, - * this allows templates to redefine these variables.

- * - *

The following variables are queried. If the variables do not - * exist, builtin defaults will be used (but you may also get a bunch - * of messages from the Java interpreter).

- * - *
- *
linenumbering.everyNth
- *
Specifies the lines that will be numbered. The first line is - * always numbered. (builtin default: 5).
- *
linenumbering.width
- *
Specifies the width of the numbers. If the specified width is too - * narrow for the largest number needed, it will automatically be made - * wider. (builtin default: 3).
- *
linenumbering.separator
- *
Specifies the string that separates line numbers from lines - * in the program listing. (builtin default: " ").
- *
stylesheet.result.type
- *
Specifies the stylesheet result type. The value is either 'fo' - * (for XSL Formatting Objects) or it isn't. (builtin default: html).
- *
- * - * @param context The current stylesheet context - * - */ - private static void setupLineNumbering(Context context) { - // Hardcoded defaults - modulus = 5; - width = 3; - separator = " "; - foStylesheet = false; - - String varString = null; - - // Get the modulus - varString = getVariable(context, "linenumbering.everyNth"); - try { - modulus = Integer.parseInt(varString); - } catch (NumberFormatException nfe) { - System.out.println("$linenumbering.everyNth is not a number: " + varString); - } - - // Get the width - varString = getVariable(context, "linenumbering.width"); - try { - width = Integer.parseInt(varString); - } catch (NumberFormatException nfe) { - System.out.println("$linenumbering.width is not a number: " + varString); - } - - // Get the separator - varString = getVariable(context, "linenumbering.separator"); - separator = varString; - - // Get the stylesheet type - varString = getVariable(context, "stylesheet.result.type"); - foStylesheet = (varString.equals("fo")); - } - - /** - *

Number lines in a verbatim environment

- * - *

The extension function expects the following variables to be - * available in the calling context: $linenumbering.everyNth, - * $linenumbering.width, $linenumbering.separator, and - * $stylesheet.result.type.

- * - *

This method adds line numbers to a result tree fragment. Each - * newline that occurs in a text node is assumed to start a new line. - * The first line is always numbered, every subsequent 'everyNth' line - * is numbered (so if everyNth=5, lines 1, 5, 10, 15, etc. will be - * numbered. If there are fewer than everyNth lines in the environment, - * every line is numbered.

- * - *

Every line number will be right justified in a string 'width' - * characters long. If the line number of the last line in the - * environment is too long to fit in the specified width, the width - * is automatically increased to the smallest value that can hold the - * number of the last line. (In other words, if you specify the value 2 - * and attempt to enumerate the lines of an environment that is 100 lines - * long, the value 3 will automatically be used for every line in the - * environment.)

- * - *

The 'separator' string is inserted between the line - * number and the original program listing. Lines that aren't numbered - * are preceded by a 'width' blank string and the separator.

- * - *

If inline markup extends across line breaks, markup changes are - * required. All the open elements are closed before the line break and - * "reopened" afterwards. The reopened elements will have the same - * attributes as the originals, except that 'name' and 'id' attributes - * are not duplicated if the stylesheet.result.type is "html" and - * 'id' attributes will not be duplicated if the result type is "fo".

- * - * @param rtf The result tree fragment of the verbatim environment. - * - * @return The modified result tree fragment. - */ - public static NodeSetValue numberLines (Context context, - NodeSetValue rtf_ns) { - - FragmentValue rtf = (FragmentValue) rtf_ns; - - setupLineNumbering(context); - - try { - LineCountEmitter lcEmitter = new LineCountEmitter(); - rtf.replay(lcEmitter); - int numLines = lcEmitter.lineCount(); - - int listingModulus = numLines < modulus ? 1 : modulus; - - double log10numLines = Math.log(numLines) / Math.log(10); - - int listingWidth = width < log10numLines+1 - ? (int) Math.floor(log10numLines + 1) - : width; - - NamePool namePool = context.getController().getNamePool(); - NumberLinesEmitter nlEmitter = new NumberLinesEmitter(namePool, - listingModulus, - listingWidth, - separator, - foStylesheet); - rtf.replay(nlEmitter); - return nlEmitter.getResultTreeFragment(); - } catch (TransformerException e) { - // This "can't" happen. - System.out.println("Transformer Exception in numberLines"); - return rtf; - } - } - - /** - *

Setup the parameters associated with callouts

- * - *

This method queries the stylesheet for the variables - * associated with line numbering. It is called automatically before - * callouts are processed. The context is used to retrieve the values, - * this allows templates to redefine these variables.

- * - *

The following variables are queried. If the variables do not - * exist, builtin defaults will be used (but you may also get a bunch - * of messages from the Java interpreter).

- * - *
- *
callout.graphics
- *
Are we using callout graphics? A value of 0 or "" is false, - * any other value is true. If callout graphics are not used, the - * parameters related to graphis are not queried.
- *
callout.graphics.path
- *
Specifies the path to callout graphics.
- *
callout.graphics.extension
- *
Specifies the extension ot use for callout graphics.
- *
callout.graphics.number.limit
- *
Identifies the largest number that can be represented as a - * graphic. Larger callout numbers will be represented using text.
- *
callout.defaultcolumn
- *
Specifies the default column for callout bullets that do not - * specify a column.
- *
stylesheet.result.type
- *
Specifies the stylesheet result type. The value is either 'fo' - * (for XSL Formatting Objects) or it isn't. (builtin default: html).
- *
- * - * @param context The current stylesheet context - * - */ - private static void setupCallouts(Context context) { - NamePool namePool = context.getController().getNamePool(); - - boolean useGraphics = false; - boolean useUnicode = false; - - int unicodeStart = 49; - int unicodeMax = 0; - - String unicodeFont = ""; - - // Hardcoded defaults - defaultColumn = 60; - graphicsPath = null; - graphicsExt = null; - graphicsMax = 0; - foStylesheet = false; - calloutsSetup = true; - - Value variable = null; - String varString = null; - - // Get the stylesheet type - varString = getVariable(context, "stylesheet.result.type"); - foStylesheet = (varString.equals("fo")); - - // Get the default column - varString = getVariable(context, "callout.defaultcolumn"); - try { - defaultColumn = Integer.parseInt(varString); - } catch (NumberFormatException nfe) { - System.out.println("$callout.defaultcolumn is not a number: " - + varString); - } - - // Use graphics at all? - varString = getVariable(context, "callout.graphics"); - useGraphics = !(varString.equals("0") || varString.equals("")); - - // Use unicode at all? - varString = getVariable(context, "callout.unicode"); - useUnicode = !(varString.equals("0") || varString.equals("")); - - if (useGraphics) { - // Get the graphics path - varString = getVariable(context, "callout.graphics.path"); - graphicsPath = varString; - - // Get the graphics extension - varString = getVariable(context, "callout.graphics.extension"); - graphicsExt = varString; - - // Get the number limit - varString = getVariable(context, "callout.graphics.number.limit"); - try { - graphicsMax = Integer.parseInt(varString); - } catch (NumberFormatException nfe) { - System.out.println("$callout.graphics.number.limit is not a number: " - + varString); - graphicsMax = 0; - } - - fCallout = new FormatGraphicCallout(namePool, - graphicsPath, - graphicsExt, - graphicsMax, - foStylesheet); - } else if (useUnicode) { - // Get the starting character - varString = getVariable(context, "callout.unicode.start.character"); - try { - unicodeStart = Integer.parseInt(varString); - } catch (NumberFormatException nfe) { - System.out.println("$callout.unicode.start.character is not a number: " - + varString); - unicodeStart = 48; - } - - // Get the number limit - varString = getVariable(context, "callout.unicode.number.limit"); - try { - unicodeMax = Integer.parseInt(varString); - } catch (NumberFormatException nfe) { - System.out.println("$callout.unicode.number.limit is not a number: " - + varString); - unicodeStart = 0; - } - - // Get the font - unicodeFont = getVariable(context, "callout.unicode.font"); - if (unicodeFont == null) { - unicodeFont = ""; - } - - fCallout = new FormatUnicodeCallout(namePool, - unicodeFont, - unicodeStart, - unicodeMax, - foStylesheet); - } else { - fCallout = new FormatTextCallout(namePool, foStylesheet); - } - } - - /** - *

Insert text callouts into a verbatim environment.

- * - *

This method examines the areaset and area elements - * in the supplied areaspec and decorates the supplied - * result tree fragment with appropriate callout markers.

- * - *

If a label attribute is supplied on an area, - * its content will be used for the label, otherwise the callout - * number will be used, surrounded by parenthesis. Callout numbers may - * also be represented as graphics. Callouts are - * numbered in document order. All of the areas in an - * areaset get the same number.

- * - *

Only the linecolumn and linerange units are - * supported. If no unit is specifed, linecolumn is assumed. - * If only a line is specified, the callout decoration appears in - * the defaultColumn. Lines will be padded with blanks to reach the - * necessary column, but callouts that are located beyond the last - * line of the verbatim environment will be ignored.

- * - *

Callouts are inserted before the character at the line/column - * where they are to occur.

- * - *

If graphical callouts are used, and the callout number is less - * than or equal to the $callout.graphics.number.limit, the following image - * will be generated for HTML: - * - *

-   * <img src="$callout.graphics.path/999$callout.graphics.ext"
-   *         alt="conumber">
-   * 
- * - * If the $stylesheet.result.type is 'fo', the following image will - * be generated: - * - *
-   * <fo:external-graphic src="$callout.graphics.path/999$callout.graphics.ext"/>
-   * 
- * - *

If the callout number exceeds $callout.graphics.number.limit, - * the callout will be the callout number surrounded by - * parenthesis.

- * - * @param context The stylesheet context. - * @param areaspecNodeSet The source node set that contains the areaspec. - * @param rtf The result tree fragment of the verbatim environment. - * - * @return The modified result tree fragment. - */ - - public static NodeSetValue insertCallouts (Context context, - NodeList areaspecNodeList, - NodeSetValue rtf_ns) { - - FragmentValue rtf = (FragmentValue) rtf_ns; - - setupCallouts(context); - - try { - NamePool namePool = context.getController().getNamePool(); - CalloutEmitter cEmitter = new CalloutEmitter(namePool, - defaultColumn, - foStylesheet, - fCallout); - cEmitter.setupCallouts(areaspecNodeList); - rtf.replay(cEmitter); - return cEmitter.getResultTreeFragment(); - } catch (TransformerException e) { - // This "can't" happen. - System.out.println("Transformer Exception in insertCallouts"); - return rtf; - } - } -} diff --git a/xsl/extensions/saxon642/com/nwalsh/saxon/package.html b/xsl/extensions/saxon642/com/nwalsh/saxon/package.html deleted file mode 100644 index b05a46709..000000000 --- a/xsl/extensions/saxon642/com/nwalsh/saxon/package.html +++ /dev/null @@ -1,48 +0,0 @@ - - -Norman Walsh's Saxon Extensions Package - - -

Norman Walsh's Saxon Extensions Package for Saxon 6.*

- -

This package implements Saxon extensions for XSLT.

- -

Copyright (C) 2000 Norman Walsh

-

Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions:

- -

The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software.

- -

Except as contained in this notice, the names of individuals -credited with contribution to this software shall not be used in -advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from the -individuals in question.

- -

Anything derived from this Software that is publically -distributed will be identified with a different name and the -version strings in any derived Software will be changed so that no -possibility of confusion between the derived package and this -Software will exist.

- - -
-

Warranty

-

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER -CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE.

-
- - - diff --git a/xsl/extensions/saxon642/prj.el b/xsl/extensions/saxon642/prj.el deleted file mode 100644 index f60e46246..000000000 --- a/xsl/extensions/saxon642/prj.el +++ /dev/null @@ -1,218 +0,0 @@ - - - - - - - - - - -(jde-set-project-name "saxon") -(jde-set-variables - '(jde-gen-session-bean-template (quote ("(jde-import-insert-imports-into-buffer (list \"javax.ejb.*\" -\"java.rmi.RemoteException\"))" "(jde-wiz-update-implements-clause \"SessionBean\")" "'> \"public void ejbActivate() throws RemoteException {\"'>'n \"}\"'>'n -'>'n" "'> \"public void ejbPassivate() throws RemoteException {\"'>'n \"}\"'>'n -'>'n" "'> \"public void ejbRemove() throws RemoteException {\"'>'n \"}\"'>'n '>'n" "'> \"public void setSessionContext(SessionContext ctx) throws -RemoteException {\"" "'>'n \"}\"'>'n '>'n" "'> \"public void unsetSessionContext() throws RemoteException {\"'>'n -\"}\"'>'n '>'n'>"))) - '(jde-gen-beep (quote ("(end-of-line) '&" "\"Toolkit.getDefaultToolkit().beep();\"'>'n'>"))) - '(jde-which-method-format (quote ("[" jde-which-method-current "]"))) - '(jde-run-classic-mode-vm nil) - '(jde-javadoc-gen-nodeprecatedlist nil) - '(jde-which-method-max-length 20) - '(jde-imenu-include-classdef t) - '(jde-javadoc-gen-link-online nil) - '(jde-gen-code-templates (quote (("Get Set Pair" . jde-gen-get-set) ("toString method" . jde-gen-to-string-method) ("Action Listener" . jde-gen-action-listener) ("Window Listener" . jde-gen-window-listener) ("Mouse Listener" . jde-gen-mouse-listener) ("Mouse Motion Listener" . jde-gen-mouse-motion-listener) ("Inner Class" . jde-gen-inner-class) ("println" . jde-gen-println) ("beep" . jde-gen-beep) ("property change support" . jde-gen-property-change-support) ("EJB Entity Bean" . jde-gen-entity-bean) ("EJB Session Bean" . jde-gen-session-bean)))) - '(jde-gen-cflow-else (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l \"else\")" "'(l '> \"else \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"} // end of else\"'>'n'>)" ")"))) - '(jde-make-args "") - '(jde-javadoc-gen-destination-directory "JavaDoc") - '(jde-mode-line-format (quote ("-" mode-line-mule-info mode-line-modified mode-line-frame-identification mode-line-buffer-identification " " global-mode-string " %[(" mode-name mode-line-process minor-mode-alist "%n" ")%]--" (line-number-mode "L%l--") (column-number-mode "C%c--") (-3 . "%p") (jde-which-method-mode ("--" jde-which-method-format "--")) "-%-"))) - '(jde-mode-abbreviations (quote (("ab" . "abstract") ("bo" . "boolean") ("br" . "break") ("by" . "byte") ("byv" . "byvalue") ("cas" . "cast") ("ca" . "catch") ("ch" . "char") ("cl" . "class") ("co" . "const") ("con" . "continue") ("de" . "default") ("dou" . "double") ("el" . "else") ("ex" . "extends") ("fa" . "false") ("fi" . "final") ("fin" . "finally") ("fl" . "float") ("fo" . "for") ("fu" . "future") ("ge" . "generic") ("go" . "goto") ("impl" . "implements") ("impo" . "import") ("ins" . "instanceof") ("in" . "int") ("inte" . "interface") ("lo" . "long") ("na" . "native") ("ne" . "new") ("nu" . "null") ("pa" . "package") ("pri" . "private") ("pro" . "protected") ("pu" . "public") ("re" . "return") ("sh" . "short") ("st" . "static") ("su" . "super") ("sw" . "switch") ("sy" . "synchronized") ("th" . "this") ("thr" . "throw") ("throw" . "throws") ("tra" . "transient") ("tr" . "true") ("vo" . "void") ("vol" . "volatile") ("wh" . "while")))) - '(jde-imenu-enable t) - '(jde-compile-option-verbose nil) - '(jde-db-option-heap-size (quote ((1 . "megabytes") (16 . "megabytes")))) - '(jde-bug-debugger-host-address "localhost" t) - '(jde-make-working-directory "") - '(jde-bug-breakpoint-marker-colors (quote ("red" . "yellow"))) - '(jde-javadoc-gen-use nil) - '(jde-gen-buffer-boilerplate nil) - '(jde-bug-raise-frame-p t) - '(jde-db-option-application-args (quote ("-IN" "/share/xsl/docbook/test/exttest.xml" "-XSL " "/share/xsl/docbook/test/exttest.xsl")) t) - '(jde-javadoc-gen-nonavbar nil) - '(jde-javadoc-gen-nohelp nil) - '(jde-bug-vm-includes-jpda-p nil) - '(jde-gen-jfc-app-buffer-template (quote ("(funcall jde-gen-boilerplate-function) '>'n" "\"import java.awt.Dimension;\" '>'n" "\"import java.awt.Graphics;\" '>'n" "\"import java.awt.Graphics2D;\" '>'n" "\"import java.awt.Color;\" '>'n" "\"import java.awt.geom.Ellipse2D;\" '>'n" "\"import java.awt.event.WindowAdapter;\" '>'n" "\"import java.awt.event.WindowEvent;\" '>'n" "\"import javax.swing.JFrame;\" '>'n" "\"import javax.swing.JPanel;\" '>'n" "\"import javax.swing.JScrollPane;\" '>'n" "\"import javax.swing.JMenuBar;\" '>'n" "\"import javax.swing.JMenu;\" '>'n" "\"import java.awt.event.ActionEvent;\" '>'n" "\"import javax.swing.AbstractAction;\" '>'n '>'n" "\"/**\" '>'n" "\" * \"" "(file-name-nondirectory buffer-file-name) '>'n" "\" *\" '>'n" "\" *\" '>'n" "\" * Created: \" (current-time-string) '>'n" "\" *\" '>'n" "\" * @author \"'>'n" "\" * @version\" '>'n" "\" */\" '>'n" "'>'n" "\"public class \"" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "\" extends JFrame\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"class Canvas extends JPanel\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"public Canvas () \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"setSize(getPreferredSize());\" '>'n" "\"Canvas.this.setBackground(Color.white);\" '>'n" "\"}\"'>'n '>'n" "\"public Dimension getPreferredSize() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"return new Dimension(600, 600);\" '>'n" "\"}\"'>'n '>'n" "\"public void paintComponent(Graphics g) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"super.paintComponent(g);\" '>'n" "\"Graphics2D g2d = (Graphics2D) g;\" '>'n" "\"Ellipse2D circle = new Ellipse2D.Double(0d, 0d, 100d, 100d);\" '>'n" "\"g2d.setColor(Color.red);\" '>'n" "\"g2d.translate(10, 10);\" '>'n" "\"g2d.draw(circle);\" '>'n" "\"g2d.fill(circle);\" '>'n" "\"}\"'>'n " "\"}\"'>'n '>'n" "\"public \"" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "\"()\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"super(\\\"\" (P \"Enter app title: \") \"\\\");\" '>'n" "\"setSize(300, 300);\" '>'n" "\"addWindowListener(new WindowAdapter() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"public void windowClosing(WindowEvent e) {System.exit(0);}\" '>'n" "\"public void windowOpened(WindowEvent e) {}\" '>'n" "\"});\"'>'n" "\"setJMenuBar(createMenu());\" '>'n" "\"getContentPane().add(new JScrollPane(new Canvas()));\" '>'n" "\"}\"'>'n" "'>'n" "\"public static void main(String[] args) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'n" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "\" f = new \"" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "\"();\" '>'n" "\"f.show();\" '>'n" "\"}\"'>'n '>'n" "\"protected JMenuBar createMenu() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"JMenuBar mb = new JMenuBar();\" '>'n" "\"JMenu menu = new JMenu(\\\"File\\\");\" '>'n" "\"menu.add(new AbstractAction(\\\"Exit\\\") \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"public void actionPerformed(ActionEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"System.exit(0);\" '>'n" "\"}\" '>'n" "\"});\" '>'n" "\"mb.add(menu);\" '>'n" "\"return mb;\" '>'n" "\"}\"'>'n " "\"} // \"'>" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "'>'n"))) - '(jde-bug-key-bindings (quote (("[? ? ?]" . jde-bug-step-over) ("[? ? ?]" . jde-bug-step-into) ("[? ? ?]" . jde-bug-step-into-all) ("[? ? ?]" . jde-bug-step-out) ("[? ? ?]" . jde-bug-continue) ("[? ? ?]" . jde-bug-toggle-breakpoint)))) - '(jde-compile-finish-hook (quote (jde-compile-finish-refresh-speedbar jde-compile-finish-flush-completion-cache))) - '(jde-compile-option-nowarn nil) - '(jde-setnu-mode-threshold 20000) - '(jde-run-java-vm-w "javaw") - '(jde-compile-option-encoding nil) - '(jde-run-option-java-profile (quote (nil . "./java.prof"))) - '(jde-bug-jpda-directory "/usr/local/jdk1.2.2" t) - '(jde-read-compile-args nil) - '(jde-run-java-vm "java") - '(jde-db-option-verbose (quote (nil nil nil))) - '(jde-which-method-class-min-length 4) - '(jde-db-read-app-args nil) - '(jde-javadoc-gen-nodeprecated nil) - '(jde-run-option-heap-profile (quote (nil "./java.hprof" 5 20 "Allocation objects"))) - '(jde-gen-println (quote ("(end-of-line) '&" "\"System.out.println(\" (P \"Print out: \") \");\" '>'n'>"))) - '(jde-enable-abbrev-mode nil) - '(jde-auto-parse-max-buffer-size 50000) - '(jde-gen-cflow-main (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l \"main\")" "'(l '> \"public static void main (String[] args) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"} // end of main ()\"'>'n'>)" ")"))) - '(jde-javadoc-exception-tag-template "\"* @exception \" type \" if an error occurs\"") - '(jde-global-classpath nil t) - '(jde-gen-window-listener-template (quote ("(end-of-line) '& (P \"Window name: \")" "\".addWindowListener(new WindowAdapter() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'> \"public void windowActivated(WindowEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"" "'>'n \"public void windowClosed(WindowEvent e)\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'n \"}\"" "'>'n \"public void windowClosing(WindowEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'n \"System.exit(0);\" '>'n \"}\"" "'>'n \"public void windowDeactivated(WindowEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'n \"}\"" "'>'n \"public void windowDeiconified(WindowEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'n \"}\"" "'>'n \"public void windowIconified(WindowEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'n \"}\"" "'>'n \"public void windowOpened(WindowEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'n \"}\"" "'>'n \"});\" '>'n'>"))) - '(jde-run-working-directory "/share/xsl/docbook/extensions" t) - '(jde-gen-property-change-support (quote ("(end-of-line) '&" "\"protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);\" '>'n '>'n" "\"/**\" '>'n" "\"* Adds a PropertyChangeListener to the listener list.\" '>'n" "\"* The listener is registered for all properties.\" '>'n" "\"*\" '>'n" "\"* @param listener The PropertyChangeListener to be added\" '>'n" "\"*/\" '>'n" "\"public void addPropertyChangeListener(PropertyChangeListener listener) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"pcs.addPropertyChangeListener(listener);\" '>'n \"}\" '>'n '>'n" "\"/**\" '>'n" "\"* Removes a PropertyChangeListener from the listener list.\" '>'n" "\"* This removes a PropertyChangeListener that was registered for all properties.\" '>'n" "\"*\" '>'n " "\"* @param listener The PropertyChangeListener to be removed\" '>'n" "\"*/\" '>'n" "\"public void removePropertyChangeListener(PropertyChangeListener listener) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>\"pcs.removePropertyChangeListener(listener);\" '>'n \"}\" '>'n '>'n" "\"/**\" '>'n\"* Adds a PropertyChangeListener for a specific property.\" '>'n" "\"* The listener will be invoked only when a call on firePropertyChange\" '>'n" "\"* names that specific property.\" '>'n" "\"*\" '>'n \"* @param propertyName The name of the property to listen on\" '>'n" "\"* @param listener The PropertyChangeListener to be added\" '>'n \"*/\" '>'n" "\"public void addPropertyChangeListener(String propertyName,\" '>'n" "\"PropertyChangeListener listener) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'> \"pcs.addPropertyChangeListener(propertyName, listener);\" '>'n \"}\" '>'n '>'n" "\"/**\" '>'n\"* Removes a PropertyChangeListener for a specific property.\" '>'n" "\"*\" '>'n \"* @param propertyName The name of the property that was listened on\" '>'n" "\"* @param listener The PropertyChangeListener to be removed\" '>'n \"*/\" '>'n" "\"public void removePropertyChangeListener(String propertyName,\" '>'n" "\"PropertyChangeListener listener) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'> \"pcs.removePropertyChangeListener(propertyName, listener);\" '>'n \"}\" '>'n '>'n" "\"/**\" '>'n\"* Reports a bound property update to any registered listeners. \" '>'n" "\"* No event is fired if old and new are equal and non-null.\" '>'n" "\"*\" '>'n \"* @param propertyName The programmatic name of the property that was changed\" '>'n" "\"* @param oldValue The old value of the property\" '>'n" "\"* @param newValue The new value of the property.\" '>'n \"*/\" '>'n" "\"public void firePropertyChange(String propertyName, Object oldValue, Object newValue) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'> \"pcs.firePropertyChange(propertyName, oldValue, newValue);\" '>'n \"}\" '>'n '>'n" "\"/**\" '>'n\"* Reports a bound property update to any registered listeners. \" '>'n" "\"* No event is fired if old and new are equal and non-null.\" '>'n" "\"* This is merely a convenience wrapper around the more general\" '>'n" "\"* firePropertyChange method that takes Object values.\" '>'n" "\"* No event is fired if old and new are equal and non-null.\" '>'n" "\"*\" '>'n \"* @param propertyName The programmatic name of the property that was changed\" '>'n" "\"* @param oldValue The old value of the property\" '>'n" "\"* @param newValue The new value of the property.\" '>'n \"*/\" '>'n" "\"public void firePropertyChange(String propertyName, int oldValue, int newValue) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'> \"pcs.firePropertyChange(propertyName, oldValue, newValue);\" '>'n \"}\" '>'n '>'n" "\"/**\" '>'n\"* Reports a bound property update to any registered listeners. \" '>'n" "\"* No event is fired if old and new are equal and non-null.\" '>'n" "\"* This is merely a convenience wrapper around the more general\" '>'n" "\"* firePropertyChange method that takes Object values.\" '>'n" "\"* No event is fired if old and new are equal and non-null.\" '>'n" "\"*\" '>'n \"* @param propertyName The programmatic name of the property that was changed\" '>'n" "\"* @param oldValue The old value of the property\" '>'n" "\"* @param newValue The new value of the property.\" '>'n \"*/\" '>'n" "\"public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'> \"pcs.firePropertyChange(propertyName, oldValue, newValue);\" '>'n \"}\" '>'n '>'n" "\"/**\" '>'n\"* Fires an existing PropertyChangeEvent to any registered listeners.\" '>'n" "\"* No event is fired if the given event's old and new values are equal and non-null. \" '>'n" "\"*\" '>'n \"* @param evt The PropertyChangeEvent object.\" '>'n\"*/\" '>'n" "\"public void firePropertyChange(PropertyChangeEvent evt) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'> \"pcs.firePropertyChange(evt);\" '>'n \"}\" '>'n '>'n" "\"/**\" '>'n\"* Checks if there are any listeners for a specific property.\" '>'n" "\"*\" '>'n \"* @param evt The PropertyChangeEvent object.\" '>'n" "\"* @return trueif there are one or more listeners for the given property\" '>'n" "\"*/\" '>'n" "\"public boolean hasListeners(String propertyName) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'> \"return pcs.hasListeners(propertyName);\" '>'n \"}\" '>'n '>'n'>"))) - '(jde-javadoc-describe-interface-template "\"* Describe interface \" (jde-javadoc-code name) \" here.\"") - '(jde-imenu-include-signature t) - '(jde-db-marker-regexp "^.*: thread=.*, \\(\\(.*[.]\\)*\\)\\([^$]*\\)\\($.*\\)*[.].+(), line=\\([0-9]*\\),") - '(jde-gen-mouse-motion-listener-template (quote ("(end-of-line) '& (P \"Component name: \")" "\".addMouseMotionListener(new MouseMotionAdapter() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>" "'>'n \"public void mouseDragged(MouseEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>" "'>'n \"public void mouseMoved(MouseEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>" "'>'n \"});\"'>'n'>"))) - '(jde-key-bindings (quote (("[? ? ?]" . jde-run-menu-run-applet) ("[? ? ?]" . jde-build) ("[? ? ?]" . jde-compile) ("[? ? ?]" . jde-debug) ("[? ? ?]" . jde-wiz-implement-interface) ("[? ? ?j]" . jde-javadoc-generate-javadoc-template) ("[? ? ? ]" . bsh) ("[? ? ? ]" . jde-gen-println) ("[? ? ?]" . jde-browse-jdk-doc) ("[? ? ?]" . jde-save-project) ("[? ? ?]" . jde-wiz-update-class-list) ("[? ? ?]" . jde-run) ("[? ? ?]" . speedbar-frame-mode) ("[? ? ?]" . jde-db-menu-debug-applet) ("[? ? ?]" . jde-help-symbol) ("[? ? ?]" . jde-show-class-source) ("[? ? ?]" . jde-import-find-and-import) ("[(control c) (control v) (control ?.)]" . jde-complete-at-point-menu) ("[(control c) (control v) ?.]" . jde-complete-at-point)))) - '(jde-gen-cflow-for-i (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l \"fori\")" "'(l '> \"for (int \" (p \"variable: \" var) \" = 0; \"" "(s var)" "\" < \"(p \"upper bound: \" ub)\"; \" (s var) \"++) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"} // end of for (int \" (s var) \" = 0; \"" "(s var) \" < \" (s ub) \"; \" (s var) \"++)\"'>'n'>)" ")"))) - '(jde-run-option-classpath (quote ("/share/xsl/docbook/extensions/xalan2/.classes" "/projects/apache/xml-xalan/java/build/classes" "/projects/apache/xml-xalan/java/bin/bsf.jar" "/projects/apache/xml-xalan/java/bin/xerces.jar" "/projects/sun/resolver/.classes" "/projects/apache/xml-xerces/java/build/classes" "/home/ndw/java")) t) - '(jde-javadoc-gen-detail-switch (quote ("-protected"))) - '(jde-bug-sio-connect-delay 1) - '(jde-javadoc-param-tag-template "\"* @param \" name \" \" (jde-javadoc-a type) - \" \" (jde-javadoc-code type) \" value\"") - '(jde-compile-option-verbose-path nil) - '(jde-javadoc-display-doc t) - '(jde-imenu-modifier-abbrev-alist (quote (("public" . 43) ("protected" . 177) ("private" . 172) ("static" . 2215) ("transient" . 35) ("volatile" . 126) ("abstract" . 170) ("final" . 182) ("native" . 36) ("synchronized" . 64) ("strictfp" . 37)))) - '(jde-db-debugger (quote ("JDEbug" "/usr/local/jdk1.2.2/lib/i386" . "Executable")) t) - '(jde-jdk-doc-url "http://www.javasoft.com/products/jdk/1.1/docs/index.html") - '(jde-gen-cflow-enable t) - '(jde-compiler "javac") - '(jde-javadoc-gen-verbose nil) - '(jde-javadoc-describe-method-template "\"* Describe \" (jde-javadoc-code name) \" method here.\"") - '(jde-gen-class-buffer-template (quote ("(funcall jde-gen-boilerplate-function) '>'n" "\"/**\" '>'n" "\" * \"" "(file-name-nondirectory buffer-file-name) '>'n" "\" *\" '>'n" "\" *\" '>'n" "\" * Created: \" (current-time-string) '>'n" "\" *\" '>'n" "\" * @author \"'>'n" "\" * @version\" '>'n" "\" */\" '>'n'" "'>'n" "\"public class \"" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "\" \" (jde-gen-get-super-class)" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"public \"" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "\" ()\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'p'n" "\"}\">" "'>'n" "\"}\">" "\"// \"" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "'>'n"))) - '(jde-javadoc-checker-level (quote protected)) - '(jde-appletviewer-option-vm-args nil) - '(jde-run-executable-args nil) - '(jde-db-option-garbage-collection (quote (t t))) - '(jde-javadoc-gen-stylesheetfile "") - '(jde-use-font-lock t) - '(jde-compile-option-bootclasspath nil) - '(jde-make-program "make") - '(jde-javadoc-gen-group nil) - '(jde-javadoc-gen-link-offline nil) - '(jde-entering-java-buffer-hook (quote (jde-reload-project-file jde-which-method-update-on-entering-buffer))) - '(jde-javadoc-gen-doc-title "") - '(jde-javadoc-gen-header "") - '(jde-run-option-vm-args nil) - '(jde-javadoc-gen-window-title "") - '(jde-compile-option-directory "/sourceforge/docbook/xsl/extensions/saxon64/.classes" t) - '(jde-imenu-create-index-function (quote semantic-create-imenu-index)) - '(jde-gen-console-buffer-template (quote ("(funcall jde-gen-boilerplate-function) '>'n" "\"/**\" '>'n" "\" * \"" "(file-name-nondirectory buffer-file-name) '>'n" "\" *\" '>'n" "\" *\" '>'n" "\" * Created: \" (current-time-string) '>'n" "\" *\" '>'n" "\" * @author \"'>'n" "\" * @version\" '>'n" "\" */\" '>'n" "'>'n" "\"public class \"" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"public \"" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "\" ()\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'n" "\"}\"'>'n" "'>'n" "\"public static void main(String[] args)\"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "'>'p'n" "\"}\"'>'n" "\"} // \"'>" "(file-name-sans-extension (file-name-nondirectory buffer-file-name))" "'>'n"))) - '(jde-read-make-args nil) - '(jde-javadoc-gen-noindex nil) - '(jde-gen-mouse-listener-template (quote ("(end-of-line) '& (P \"Component name: \")" "\".addMouseListener(new MouseAdapter() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'> " "'>'n \"public void mouseClicked(MouseEvent e) \" " "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\" '>" "'>'n \"public void mouseEntered(MouseEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\" '>" "'>'n \"public void mouseExited(MouseEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>" "'>'n \"public void mousePressed(MouseEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\" '>" "'>'n \"public void mouseReleased(MouseEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>" "'>'n \"});\"'>'n'>"))) - '(jde-run-option-application-args (quote ("-IN" "test.xml" "-XSL" "test.xsl")) t) - '(jde-bug-vm-executable (quote ("java"))) - '(jde-db-set-initial-breakpoint t) - '(jde-bug-debugger-command-timeout 10) - '(jde-db-option-stack-size (quote ((128 . "kilobytes") (400 . "kilobytes")))) - '(jde-db-option-properties nil t) - '(jde-db-source-directories (quote ("/share/xsl/docbook/extensions/xalan2/" "/projects/apache/xml-xalan/java/src/" "/projects/apache/xml-xerces/java/build/src/" "/projects/sun/resolver/" "/home/ndw/java/")) t) - '(jde-run-read-app-args nil) - '(jde-gen-to-string-method-template (quote ("(end-of-line) '&" "\"public String toString() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n'>"))) - '(jde-quote-classpath t) - '(jde-bug-window-message nil) - '(jde-build-use-make nil) - '(jde-javadoc-author-tag-template "\"* @author \" user-full-name \"\"") - '(jde-javadoc-describe-field-template "\"* Describe \" (jde-javadoc-field-type modifiers) - \" \" (jde-javadoc-code name) \" here.\"") - '(jde-javadoc-gen-link-URL nil) - '(jde-compile-option-classpath (quote ("/sourceforge/docbook/xsl/extensions/saxon64/.classes" "/usr/local/java/saxon-6.4.2/saxon.jar" "/usr/local/jaxp-1.1/jaxp.jar" "/usr/local/jaxp-1.1/crimson.jar")) t) - '(jde-bug-jdk-directory "/usr/local/jdk1.2.2" t) - '(jde-gen-boilerplate-function (quote jde-gen-create-buffer-boilerplate)) - '(jde-gen-entity-bean-template (quote ("(jde-import-insert-imports-into-buffer (list \"javax.ejb.*\" -\"java.rmi.RemoteException\"))" "'> \"public void ejbActivate() throws RemoteException \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n '>'n" "'> \"public void ejbPassivate() throws RemoteException \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n '>'n" "'> \"public void ejbLoad() throws RemoteException \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n '>'n" "'> \"public void ejbStore() throws RemoteException \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n '>'n" "'> \"public void ejbRemove() throws RemoteException \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n '>'n" "'> \"public void setEntityContext(EntityContext ctx) throws RemoteException \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n '>'n" "'> \"public void unsetEntityContext() throws RemoteException \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n '>'n'>"))) - '(jde-javadoc-describe-constructor-template "\"* Creates a new \" (jde-javadoc-code name) \" instance.\"") - '(jde-bug-server-shmem-name (quote (t . "JDEbug"))) - '(jde-db-startup-commands nil) - '(jde-javadoc-gen-docletpath nil) - '(jde-javadoc-gen-split-index nil) - '(jde-compile-option-deprecation nil t) - '(jde-import-group-of-rules (quote (("^javax?\\.")))) - '(jde-which-method-mode t) - '(jde-gen-k&r t) - '(jde-javadoc-gen-bottom "") - '(jde-javadoc-gen-footer "") - '(jde-db-option-classpath (quote ("/share/xsl/docbook/extensions/xalan2/.classes" "/projects/apache/xml-xalan/java/build/classes" "/projects/apache/xml-xalan/java/bin/bsf.jar" "/projects/apache/xml-xalan/java/bin/xerces.jar" "/projects/sun/resolver/.classes" "/projects/apache/xml-xerces/java/build/classes" "/home/ndw/java")) t) - '(jde-gen-cflow-for (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l \"for\")" "'(l '> \"for (\" (p \"for-clause: \" clause) \") \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"} // end of for (\" (s clause) \")\"'>'n'>)" ")"))) - '(jde-run-mode-hook nil) - '(jde-db-option-verify (quote (nil t))) - '(jde-compile-option-extdirs nil) - '(jde-imenu-sort nil) - '(jde-gen-get-set-var-template (quote ("(end-of-line) '&" "(P \"Variable type: \" type) \" \"" "(P \"Variable name: \" name) \";\" '>'n '>'n" "\"/**\" '>'n" "\"* Get the value of \" (s name) \".\" '>'n" "\"* @return value of \" (s name) \".\" '>'n" "\"*/\" '>'n" "'>'\"public \" (s type)" "(if (string= \"boolean\" (jde-gen-lookup-named 'type) ) " "\" is\" " "\" get\" ) " "(jde-gen-init-cap (jde-gen-lookup-named 'name))" "\"() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\" '>'n" "\"return \" (s name) \";\" '>'n \"}\"" "'>'n '>'n" "\"/**\" '>'n" "\"* Set the value of \" (s name) \".\" '>'n" "\"* @param v Value to assign to \" (s name) \".\" '>'n" "\"*/\" '>'n" "'>'\"public void set\" (jde-gen-init-cap (jde-gen-lookup-named 'name))" "\"(\" (s type) \" v) \" " "(if jde-gen-k&r " "()" "'>'n)" "\"{\" '>'n" "'>'\"this.\" (s name) \" = v;\" '>'n \"}\" '>'n'>"))) - '(jde-bug-saved-breakpoints nil) - '(jde-compile-option-sourcepath (quote ("/share/xsl/docbook/extensions/xalan2" "/projects/apache/xml-xalan/java/build/src" "/projects/apache/xml-xerces/java/build/src" "/projects/sun/resolver")) t) - '(jde-gen-cflow-if (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l \"if\")" "'(l '> \"if (\" (p \"if-clause: \" clause) \") \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"} // end of if (\" (s clause) \")\"'>'n'>)" ")"))) - '(jde-db-option-java-profile (quote (nil . "./java.prof"))) - '(jde-javadoc-gen-author t) - '(jde-compile-option-depend-switch (quote ("-Xdepend"))) - '(jde-setnu-mode-enable nil) - '(jde-run-applet-doc "") - '(jde-compile-option-vm-args nil) - '(jde-javadoc-gen-overview "") - '(jde-javadoc-gen-notree nil) - '(jde-run-option-garbage-collection (quote (t t))) - '(jde-db-mode-hook nil) - '(jde-javadoc-command-path "javadoc") - '(jde-db-option-heap-profile (quote (nil "./java.hprof" 5 20 "Allocation objects"))) - '(jde-import-group-function (quote jde-import-group-of)) - '(jde-db-read-vm-args nil) - '(jde-bug-debug nil) - '(jde-javadoc-end-block-template nil) - '(jde-javadoc-gen-packages nil) - '(jde-gen-cflow-if-else (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l \"ife\")" "'(l '> \"if (\" (p \"if-clause: \" clause) \") \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"} // end of if (\" (s clause) \")\"'> n" "'> \"else \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"} // end of if (\" (s clause) \")else\"'>'n'>)" ")"))) - '(jde-gen-cflow-while (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l \"while\")" "'(l '> \"while (\" (p \"while-clause: \" clause) \") \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'>'r'n" "\"} // end of while (\" (s clause) \")\"'>'n'>)" ")"))) - '(jde-bug-server-socket (quote (t . "2112"))) - '(jde-imenu-include-modifiers nil) - '(jde-appletviewer-option-encoding "") - '(jde-bug-breakpoint-cursor-colors (quote ("cyan" . "brown"))) - '(jde-compile-option-target (quote ("1.1"))) - '(jde-run-executable "") - '(jde-run-option-heap-size (quote ((1 . "megabytes") (16 . "megabytes")))) - '(jde-gen-cflow-switch (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l \"switch\")" "'(l '> \"switch (\" (p \"switch-condition: \" clause) \") \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n'" "\"case \" (p \"first value: \") \":\"'>'n'>'p'n" "\"break;\"'>'n'>'p'n" "\"default:\"'>'n'>'p'n" "\"break;\"'>'n" "\"} // end of switch (\" (s clause) \")\"'>'n'>)" ")"))) - '(jde-which-method-abbrev-symbol "~") - '(jde-db-option-vm-args nil) - '(jde-run-application-class "org.apache.xalan.xslt.Process" t) - '(jde-javadoc-gen-doclet "") - '(jde-import-auto-sort nil) - '(jde-run-option-verbose (quote (nil nil nil))) - '(jde-project-file-name "prj.el") - '(jde-compile-option-debug (quote ("selected" (t nil nil))) t) - '(jde-bug-jre-home "") - '(jde-import-sorted-groups nil) - '(jde-run-applet-viewer "") - '(jde-javadoc-return-tag-template "\"* @return \" (jde-javadoc-a type) - \" \" (jde-javadoc-code type) \" value\"") - '(jde-javadoc-gen-version t) - '(jde-javadoc-gen-helpfile "") - '(jde-import-excluded-packages (quote ("bsh.*"))) - '(jde-run-read-vm-args nil) - '(jde-help-docsets nil) - '(jde-gen-inner-class-template (quote ("(end-of-line) '& \"class \" (P \"Class name: \" class)" "(P \"Superclass: \" super t)" "(let ((parent (jde-gen-lookup-named 'super)))" "(if (not (string= parent \"\"))" "(concat \" extends \" parent ))) " "(if jde-gen-k&r " "()" "'>'n)" "\"{\" '>'n" "\"public \" (s class) \"() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n" "\"}\" '>'n'>"))) - '(jde-auto-parse-buffer-interval 180) - '(jde-run-option-verify (quote (nil t))) - '(jde-import-reverse-sort-group nil) - '(jde-compile-option-optimize nil) - '(jde-gen-cflow-case (quote ("(if (jde-parse-comment-or-quoted-p)" "'(l \"case\")" "'(l 'n \"case \" (p \"value: \") \":\"'>'n'>'p'n" "\"break;\"'>'n'>'p)" ")"))) - '(jde-compile-option-depend nil) - '(jde-javadoc-describe-class-template "\"* Describe class \" (jde-javadoc-code name) \" here.\"") - '(jde-javadoc-gen-serialwarn nil) - '(jde-gen-action-listener-template (quote ("'& (P \"Component name: \")" "\".addActionListener(new ActionListener() \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"public void actionPerformed(ActionEvent e) \"" "(if jde-gen-k&r " "()" "'>'n)" "\"{\"'>'n" "\"}\"'>'n \"});\"'>'n'>"))) - '(jde-auto-parse-enable t) - '(jde-compile-option-command-line-args "") - '(jde-gen-buffer-templates (quote (("Class" . jde-gen-class) ("Console" . jde-gen-console) ("Swing App" . jde-gen-jfc-app)))) - '(jde-project-context-switching-enabled-p t) - '(jde-javadoc-gen-args nil) - '(jde-run-option-stack-size (quote ((128 . "kilobytes") (400 . "kilobytes")))) - '(jde-run-option-properties nil t)) - - -- 2.40.0