2017-06-08  Per Bothner  <per@bothner.com>

	* XMLFilter.java: Update for new source position model.

2016-10-29  Per Bothner  <per@bothner.com>

	* XMLPrinter.java:  Partly revert previous changes, for compatibility.
	(HtmlEmptyTags): Add 'command'.

2016-10-27  Per Bothner  <per@bothner.com>

	* XMLPrinter.java: Change empty-element handling in default style to
	HTML-compatible "polyglot" style

2016-08-12  Per Bothner  <per@bothner.com>

	* XMLPrinter.java: Change to extend PrintConsumer rather than OutPort.

2014-05-21  Per Bothner  <per@bothner.com>

	* XMLFilter.java (startAttribute): Fix error check - we do allow
	attribute at document level - if we're stringizing.
	Also fix typo in error message.

2014-02-23  Per Bothner  <per@bothner.com>

	* XMLParser.java (XMLStreamReader): Majorly simplify since
	BinaryInPort makes reading encoding declaration easier now.

2014-01-09  Per Bothner  <per@bothner.com>

	* XMLParser.java: Update to use BinaryInPort.
	Add (non-enabled) hook for requiring an XML declaration.

2014-01-05  Per Bothner  <per@bothner.com>

	* Makefile.am: Merge into ../../gnu/Makefile.am and remove.

2014-01-04  Per Bothner  <per@bothner.com>

	* XMLParser.java: Fixed a number of little bugs found when
	processing a huge file.  Also improve error robustness.
	Fixed convention for 'start' variable, since before we couldn't
	distinguish it from being unset vs set at end of buffer.
	* XMLFilter.java (writeJoiner): Make more robust.

2013-11-28  Matthieu Vachon <matthieu.o.vachon@gmail.com>

	* XMLFilter.java, XMLPrinter.java: Don't use @Override for a method
	implementing an interface - Java 5 doesn't like it.

2013-11-03  Per Bothner  <per@bothner.com>

	* TextUtils.java (stringValue): Optimize to avoid a getValues call.

	* TextUtils.java (stringValue): Rewrite to avoid Values
	dependency on TreeList internals.

2013-11-01  Per Bothner  <per@bothner.com>

	* XMLFilter.java (consume): Rename to writePosition.
	* XMLPrinter.java: Likewise.

2013-02-23  Per Bothner  <per@bothner.com>

	* TextUtils.java (stingValue): Special handling for gnu.text.Char
	and java.lang.Character.

2013-01-23  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (startAttribute): Check for null type.

	* XMLFilter.java (startAttribute): Require type to be a Symbol.

2013-01-15  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (startElement): Check that type isn't null.

2012-10-21  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (writeObject): Remove never-true instanceof test.

	* XMLFilter.java (closeStartTag): Better error if start tag is not
	a symbol.

2012-10-03  Per Bothner  <per@bothner.com>

	* XMLFilter.java (writeObject): Fix buggy handling of attribute
	implicitly specified by a Keyword, as when called from MakeElement.

2012-09-20  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (indentLoc): Add generic parameters.

2010-11-26  Per Bothner  <per@bothner.com>

	* XName.java: Update, since Symbol constructor is now protected.

2010-11-21  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (writeDoctypeIfDefined, writeDoctype): New methods.
	(startElement): Use writeDoctypeIfDefined.

2010-08-02  Per Bothner  <per@bothner.com>

	* XMLFilter.java (writeObject): Treat a java.util.List as
	multiple value - just iterate and write each element.

2010-07-05  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (isHtmlOrXhtml): New flag.
	(getHtmlTag): New method.
	(endElement): Re-do logic for handle "empty-elements".

2010-07-01  Per Bothner  <per@bothner.com>

	* XMLPrinter.java: Add space after xml-declaration, if needed.

2007-12-30  Per Bothner  <per@bothner.com>

	* XMLParser.java: Add support for XML 'standalone' declaration.

2007-01-20  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (setStyle): If html, pre-establish html namespace.

2007-01-16  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (mustHexEscape): New method.
	(write(int)): Use it.
	(write(String,int,int), write(char[],int,int)): Likewise.

	* XMLPrinter.java (write): Always escape U+00x85 and U+2028
	not just in attributes.

2007-01-14  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (script): New flag.
	(error): New method.
	(startAttribute): Call error if string and ! inStartTag.

	* XMLPrinter.java (write): Also escape U+00x85 and U+2028 in attributes.

	* XName.java (isNameStart): Use Character.isUnicodeIdentifierStart.
	(checkName): New static method.
	(isNmToken, isName(String), isNCName): New methods.
	(isName(String,boolean)): Remove method.
	* XMLFilter.java (writeProcessingInstruction): Update to use isNCName.

	* XMLFilter.java (writeProcessingInstruction): Collapse whitespace
	in target.

2007-01-11  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (startElement): Check for undeclare-namespaces
	in node's namespaceBindings, and ignore if undeclareNamespaces.

2007-01-04  Per Bothner  <per@bothner.com>

	* NodeTree.java (baseUriOfPos): Change return type to Path.
	Use Path methods rather than URI_utils.
	Swap local variable names base and uri to be less confusing.

2007-01-02  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (<init>): Update to take Path.
	* XMLParser.java: Update to use gnu.text.Path.

2006-12-29  Per Bothner  <per@bothner.com>

	* XMLParser.java: Change handling of encoding detection.
	Use new LineInputStreamReader class.
	Fully parse xml declaration, checking version, and making use
	of encoding specifier.

	* XMLFilter.java Fix case when SAX2 is not PreProcess-selected.
	De-tabify so PreProcess doesn't get confused.
	(write): Remove duplicate when PreProcess to not use CharSequence.

2006-12-16  Per Bothner  <per@bothner.com>

	* XMLParser.java (XMLStreamReader): New static method.
	(parse): Use it.

	* XMLParser.java (parse): Call incrLineNumber immediately at each
	line, rather than deferring it.

2006-12-15  Per Bothner  <per@bothner.com>

	* XMLFilter.java (closeStartTag): If out is a ContentConsumer, call
	endStartTag so it happens earlier, with correct line position.

2006-12-14  Per Bothner  <per@bothner.com>

	* XMLParser.java.in: Removed.  Replaced by ...
	* XMLParser.java: New file.  Based on XMLParser.java.in, but with
	byte variant removed.  Handwire using XMLFIlter and LineBufferedReader.
	Do line-ending handling here.
	Also handle encoding declaration.
	(parse): New static method.
	* Makefile.am: Update ccordingly.
	* XMLFilter.java: Also implement SourceLocator.
	(setSourceLocator): New method.
	(setLocator): Remove redundant method.
	(textFromParser): Simplify - line-ending handling now done in XMLParser.
	(SAW_CR): Removed constant - no longer needed.
	(linefeedFromParser): New method.

	* XMLFilter.java (inElement): New method.
	(emitEndElement, processingInstructionFromParser): Use it.

	* XMLFilter.java (emitEndAttributes): Do closeStartTag().

	* XMLFilter.java: Implement DocumentHandler, ContentHandler if SAX2.
	(setDocumentLocator, startElement*2, endElement*2, characters,
	ignorableWhitespace, processingInstruction, skippedEntity):
	Moved methods from ConsumeSAXHandler.
	(startPrefixMapping, endPrefixMapping): Ditto, but with implementation.

2006-12-06  Per Bothner  <per@bothner.com>

	* XMLParser.java.in: Update for renamed Consumer methods.
	* NamedChildrenFilter.java: Likewise.
	* XMLPrinter.java: Likewise.
	* NodeTree.java: Likewise.
	* XMLFilter.java: Likewise.

	* XMLFilter.java (textFromParser): Fix test for nesting.

2006-11-25  Per Bothner  <per@bothner.com>

	* TextUtils.java: New file, moved from gnu.kawa.xml.StringValue.
	(textValue): Moved from MakeText and renamed from text$C.
	(replaceWhitespace): Moved from XDataType.
	* Makefile.am: Update accordingly.
	* XMLFiliter.java: Update.  Now need 3 fewer imports.

2006-11-24  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (write(int)): Fix typo in surrogates support.
	* XName.java (isNameStart, isNamePart): Change parameter to int
	so we can handle non-base-plane characters.
	(isName): Handle surrogates.

2006-11-22  Per Bothner  <per@bothner.com>

	Partially revert changes from 11-17 and 11-18.
	* XMLFilter.java: Rename Consumer methods append->write.
	* XMLPrinter.java: Likewise.
	Write to bout rather than super - avoids cycle and more efficient.
	(write(String,int,int)): New method.

	* XMLFilter.java (endGroup): Set previous in all cases.

2006-11-18  Per Bothner  <per@bothner.com>

	* XMLPrinter.java: Update writeChars -> append.
	* XMLFilter.java: Likewise.

	* XMLPrinter.java (append): Change return type if JAVA5.
	* XMLFilter.java: Add append methods.

	* NodeTree.java (baseUriOfPos): Remove throws clause.
	Catch and wrap URISyntaxException.

2006-11-17  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (savedHighSurrogate): New field,
	(writeChar): Rename to append.  Combine surrogates if escaping.
	* XMLFIlter.java: Update writeChar -> append.
	(emitCharacterReference): Handle non-base-plane character values.

	* XMLFilter.java (beginGroup): Fix logic for inherited namespace:
	it should only inherit from outermost element, if there is one.

	* XMLPrinter.java (writeChar):
	* XMLFilter.java (textFromParserf): New method that performs
	line-ending normalization.
	* XMLParser.java.in (parse): Call XMLFilter's textFromParser.

2006-11-16  Per Bothner  <per@bothner.com>

	* XMLFilter.java: Slightly more complicated rules to check for when to
	stringize, when to ignore, and when to add space.
	(ignoringLevel): New field.  Check it when we should ignore all output.
	(stringizingElementLevel): Replace by stringizingElementNesting.
	Slighty different value.

	* XMLFilter.java (writePosition): Write word spaces if stringizing.

	* XMLFilter.java: Allocates qname and type fields in MappingInfo
	lazily, as needed.  As a side effect, this fixes a crash.

2006-11-15  Per Bothner  <per@bothner.com>

	* XMLFilter.java: (Re)implement normalization of xml:id attributes.
	(endAttribute): Do the normalization here.
	(endAttribute): Fix error in call to stringValue.
	(attrLocalName, attrPrefix): New fields.
	(inAttribute): Remove fields - used attrLocalName!=null instead.

	* XMLPrinter.java (write): Attribute character < ' ' must be escaped.

	* XMLFilter.java (beginGroupCommon, endGroup): When stringizing
	element, may need to add space before/after.

	* XMLFilter.java (beginAttributeCommon): Move endAttribute call to
	emitBeginAttribute, since we may have nested stringized attributes
	when called from XQuery element/attribute constructors.

	* XMLFilter.java (beginAttribute): Add (restore) some error checks.
	(beginDocument): Make sure "start tag" is null so above
	test for in a document is reliable.
	(closeStartTag, endGroup, endDocument): Clear popped workStack
	elements to possibly improve GC.

2006-11-14  Per Bothner  <per@bothner.com>

	* XMLFilter.java (checkValidComment): New method.
	(writeComment): Rename to commentFromParser.
	(writeComment): Also do checkValidComment.
	(emitProcessingInstruction): Rename to processingInstructionFromParser.
	(processingInstructionCommon): New method.
	(writeProcessingInstruction): Add error checks.
	* XMLParser.java.in: Update method calls.

	* XMLFilter.java: Merge in "filtering" functionality from NodeTree.
	Primarily namespace-copying and error checking.
	* NodeTree.java: All event-handling fields and methods (such as
	writeObject) moved to XMLFilter.
	* XMLParser.java.in: Update for some XMLFilter method renaming.
	Make abstract, so we can make error method abstract.
	Handle "invalid character reference" by calling error directly.
	(open): Remove static method.
	* NamespaceBinding.java (merge, mergeHelper): Remove methods.
	Their functionality has been moved to XMLFilter.

2006-11-13  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (XMLPrinter):  Now uses writeWordStart.
	(endNumber): New override.
	(writeObject): Use new writeWordStart/writeWordEnd to maybe add spaces.

2006-11-09  Per Bothner  <per@bothner.com>

	* XMLPrinter.java: Update for Consumer changes,
	* NodeTree.java: Likewise.
	* XMLFilter,java: Likewise.

2006-11-08  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java: Renamed to ...
	* XMLFilter.java:  New file.
	Belatedly remove 'extends ParsedXMLHandler'.
	(error): Move methods that were accidentally placed in MethodInfo.
	* Makefile.am: Update accordingly.

2006-11-05  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java (stringValue): Remove field.  Store
	namespace atribute value in the tlist itself.

2006-11-01  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java: Merged in ParsedXMLHandler.java.in
	functionality - i.e. javadoc comments and the error methods.
	* ParsedXMLHandler.java.in: Removed, since never used directly.
	* Makefile.am: Update accordingly and simplify.  Remove never-used
	and questionable support for byte parsing and handling.	

2006-10-30  Per Bothner  <per@bothner.com>

	* NodeTree.java: Add support for a tble of ID mappings,
	though until we do validation only xml:id attributes are recognized.
	(idNames, idOffsets, idCount): New fields.
	(makeIDtableIfNeeded, lookupID, enterID): New methods.

2006-10-29  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java: "Hash-cons" NamespaceBindings, to speed
	up parsing of XML file with lots of identical namespace declaration
	attributes - such as XQTS's XQTSCatalog.xml.
	(currentNamespacePrefix): New field.
	(stringValue): Pre-allocate rather than allocating one each time.
	(emitBeginAttribute)): Update accordingly.
	(endAttribute): Search for or allocate NamespaceBinding.
	(closeStartTag): Don't reverse NamespaceBinding list.
	(writeChar etc): Check currentNamespacePrefix rather than stringValue -
	which now never null.
	(MappingInfo.match(StringBuffer)): New method.
	* XName.java: Specify that namespace bindings are in inverse
	document/parsing order, since that makes parsing easier.
	* NamespaceBinding.java (nconc): New static helper method.
	* XMLPrinter.java (beginGroup): Print/sort bindings in reverse order.

2006-10-26  Per Bothner  <per@bothner.com>

	* NodeTree.java (typeValue): Convert to UntypedAtomic for nodes
	types that require it.

	* NodeTree.java: Support "in-line" stringizing of nodes in
	attribute and similar contexts.
	(stringizingLevel, stringizingElementLevel): New field.
	(writeXxx): Check stringizingLevel.

	* NodeTree.java (endAttribute): If name is 'xml:id' normalize value.

	Re-write, mainly to correctly set in-scope namespaces of element.
	* NodeTree.java (groupLevel, groupNamespaces, gapStartTag, attrIndexes,
	workStack, attrCount, inAttribute, copyNamespacesMode): New fields.
	(COPY_NAMESPACES_PRESERVE, COPY_NAMESPACES_INHERIT): New fields.
	(writeObject): When converting Keyword as attribute, convert to Symbol.
	(closeTag): New method, called a number of places.
	(beginGroup*2, setGroupName, endGroup, rememberGroup, beginDocument,
	endDocument, setAttributeName, checkAttributeSymbol, beginDocument,
	ensureSpaceInWorkStack, rememberAttribute, beginAttribute*2, writeChar,
	checkWriteAtomic, write, writeBoolean,	writeFloat, writeDouble,
	writeInt, writeLong, writeDocumentUri, error, checkValidComment,
	writeComment, checkProcessingInstruction): New methods.
	(endAttribute): Major change.
	* ParsedXMLToConsumer.java (closeStartTag): New new TreeList constants.
	If tlist is a NodeTree, calls its closeTag in turn.

2006-10-25  Per Bothner  <per@bothner.com>

	* NamespaceBinding.java:(setNext): Also set depth field.
	(<init>): Use setNext.

2006-10-22  Per Bothner  <per@bothner.com>

	* NodeTree.jave (baseUriOfPos): Need to update pos variable to parent.

	* XMLPrinter.java (beginEntity, endEntity): New methods, for XCosumer.
	* NodeTree.java (baseUriOfPos): New method, moved from TreeList.

	* NodeTree.java (writeObject): Handle UnescapedData.

2006-10-21  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (writeChar): Converting space to writeSpaceFill
	seems like a bad idea.

	* XMLPrinter.java (beginGroup): Only sort namespace declarations
	if canonicalize is true.

2006-10-19  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (printIndent): Make public.
	(<init>): Default is without pretty-printing.

	* XMLPrinter.java (indentAttributes): New field - for now always false.
	Old behavior was equivalent to true.
	(beginGroup, endGroup, closetag): Don't add extra pretty-printing
	block for attributes, unless indentAttributes.

	* XMLPrinter.java (beginGroup): By default sort namespace declarations.

	* XMLPrinter.java (writeChar): Escape control characters in attributes,
	since otherwise they get normalized to plain space.

	* XMLPrinter.java (writeChar): Uppercase hex character escapes.

2006-10-17  Per Bothner  <per@bothner.com>

	* NamespaceBinding.java (merge, mergeHelper): New method.

2006-10-11  Per Bothner  <per@bothner.com>

	* NodeTree.java (posLookupNamespaceURI): Simplify.  No need to search
	up the document hierarchy since each element has NamespaceBindings.

	* XName.java (isNameStart, isNamePart): New functions,
	moved from XQParser.java.
	(isName): New method.

2006-09-28  Per Bothner  <per@bothner.com>

	* NodeTree.java (ancestorAttribute): New method.

2006-09-26  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (htmlCompat): Replace field by ...
	(useEmptyElementTag):: ... new field.
	(setStyle, endGroup): Update appropriately.

	* XMLPrinter.java (writeChar): Use hex for character references.

	* XMLPrinter.java (beginGroup): If canonicalizing sort namespace
	declarations by prefix.

	* ParsedXMLToConsumer.java (closeStartTag): Use new TreeList methods
	setGroupAnd and setAttributeName instead of calling setIntN directly.

	* NodeTree.java: (duplicateAttributeMessage): New static method.

2006-09-19  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (canonicalizeCDATA) New option field.
	(writeCDATA): Call plain write if canonicalizeCDATA.

2006-09-14  Per Bothner  <per@bothner.com>

	* NodeTree.java (getAttribute, getAttributeI): New methods.

2006-09-13  Per Bothner  <per@bothner.com>

	* XMLPrinter.java: Change to extend OutPort rather than PrintConsumer.
	Simpler pretty-printing - just use super's methods rather than
	casting out field to OutPort.
	(<init>, make): Change constructors and factory method appropriately.
	(setPrintXMLdecl): New setter.
	(inDocument): New field.
	(isWordChar): Remove method - use method inherited from OutPort.
	(setIndentMode): New helper method, using code moved from beginGroup.
	(beginGroup, beginDocument): Call setIndentMode.
	(beginGrouop): Move startLogicalBlock before namespace output.

	* XMLPrinter.java (endDocument): Invoke freshLine on OutPort.

2006-09-01  Per Bothner  <per@bothner.com>

	* XMLPrinter.java: Improved comments handling.
	(inComment): New field.
	(COMMENT): New constant.
	(writeChar): Put space between consequitive '-' in comment.
	(write): Check for '-' in comment.
	(beginComment, endCOmment): New methods.
	(writeComments): Re-implement using above methods.

2006-06-28  Per Bothner  <per@bothner.com>

	* SName.java: Remove file.
	* Makefile.am: Update accordingly.
	* XName.java: Extends Symbol rather than SName.
	* XMLPrinter.java: Update SName -> Symbol.
	* ParsedXMLToConsumer.java (closeStartTag): Create Symbol with prefix.

2006-06-16  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (endAttribute): Ignore unmatched endAttribute.
	(writeObject): Interpret a Key as a beginAttribure.
	* NodeTree.java: Likewise.

2006-06-04  Per Bothner  <per@bothner.com>

	* NodeTree.java (gapStartLastAtomic): New field.
	(writeObject): Add space between consequitive atomic values.
	(writeJoiner): New method - reset gapStartLastAtomic.
	* XMLPrinter.java (writeChars, write): Ensure prev!=WORD, even if
	empty string.

2006-03-26  Per Bothner  <per@bothner.com>

	* NamespaceBinding.java (XML_NAMESPACE): New constant.
	(predefinedXML): Use new constant.

2006-03-20  Per Bothner  <per@bothner.com>

	* XMLPrinter.java: Fix printing of tag by endGroup so it matches
	beginGroup, specifically when type is an SName.
	(groupNameStack): New field.
	(writeQName): New protected helper method.
	(beginGroup, endGroup): Use it.

2006-03-14  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (escapeNonAscii): New option.
	(beginGroup): If type is an SName, get and print prefix from it.
	(writeDouble, writeFloat): New methods.
	(formatDouble, formatFloat, formatDecimal): New static helper methods.
	(print): New method, to print accoring to XQuery specification.
	(writeObject): Default to calling print rather than writeChars.
	(writeChars): Do nothing, not even closeTag(), if zero chars.

2006-03-03  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java (emit): Ignore whitespace not in an element.

	* ParsedXMLToConsumer.java (emitProcessingInstruction): Ignore
	XML declaration.

2006-01-04  Per Bothner  <per@bothner.com>

	* XMLParser.java.in (<init>): New constructor taking InputStream,
	even when 'CHAR is char'.
	(<init>): Simplify constructior taking URL.
	(open): New static method using URI_utils.getInputStream.

2005-12-03  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (startWord): Don't print inter-word space
	if column is zero.

2005-11-14  thomas kirk  <tk@research.att.com>

	* NodeTree.java (toString): Close CharArrayOutPort.

2005-11-03  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (consume): Provide implementation.
	(write): Only call closeTag if we actually write something.

2005-10-06  Per Bothner  <per@bothner.com>

	* NodeTree.java (writeObject): Atomize plain values with
	MakeText.text$C.

	* XMLPrinter.java (writeObject): Disable intra-sequence space
	for SeqPosition - i.e. nodes - and UnescapedData.

2005-08-16  Per Bothner  <per@bothner.com>

	* NodeTree.java (typedValue): New method.

	* NodeTree.java (writePosition): Update to return void.
	* XMLPrinter.java (consume, writePosition): Likewise.

2005-07-27  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (writeChar): Fix bug that suppressed soem spaces.

2005-07-21  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (doctypeSystem, doctypePublic, indentLoc): New fields.
	(beginGroup): Use new fields to control output.

2005-04-03  Per Bothner  <per@bothner.com>

	* NamespaceBinding.java: Fix typo in javadoc.
	* SName.java: Fix javadoc problem parsingof  first line.

2005-01-07  Per Bothner  <per@bothner.com>

	* SName.java: Remove some TABs so PreProcess code looks better.
	* XName.java: Likewise.

2005-01-03  Per Bothner  <per@bothner.com>

	* XMLPrinter.java: Get the pretty-printer support more-or-less working.
	(printIndent): Convert boolean to tri-state int.

2004-12-22  Per Bothner  <per@bothner.com>

	* SName.java: New class.
	* Makefile.am: Update accordingly.
	* XName.java: Modify to extends SName.
	* ParsedXMLToConsumer.java (closeTag): Pass prefix to new XName.
	* NodeTree.java (posLocalName): Update a getLocalName to getLocalPart.

2004-11-06  Per Bothner  <per@bothner.com>

	* XName.java (<init>): New constructor.
	(lookupPrefix): Rename to lookupNamespaceURI for consistency with DOM3.
	* ParsedXMLToConsumer.java (closeStartTag): Use new XName constructor.
	* NodeTree.java (posIsDefaultNamespace, posLookupNamespaceURI,
	posLookupPrefix): New methods.
	(posLocalName): Fall back to getNextTypeName.

2004-05-20  Per Bothner  <per@bothner.com>

	* NodeTree.java (posTarget):  New method.

2004-05-18  Per Bothner  <per@bothner.com>

	* XMLPrinter.java:  Add pretty-printing support.

2004-05-05  Per Bothner  <per@bothner.com>

	* ParsedXMLHandler.java.in (emitCDATA):  New method.
 	* ParsedXMLToConsumer.java (emitCDATA):  New method.
	* XMLParser.java.in (parse):  Call emitCDATA if we saw CDATA.
	* XMLPrinter.java (writeCDATA):  New method.

2004-04-18  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java (emitComment, emitProcessingInstruction):
	Pass on if base is XConsumer.
	* XMLPrinter.java:  Implement XConsumer.
	(writeBaseUri, writeComment, writeProcessingInstruction):  New methods.

	* XMLPrinter.java (needXMLdecl):  New field.
	(beinDocument):  Don't emit XML decl yet, include it comes later
	as a processing instruction.  Instead set needXMLdecl.
	(closeTag):  Emit XML declaration if needXMLdecl is set.

	* NamespaceBinding.java (resolve):  New method.
	* XMLPrinter.java (beginGroup):  Check we haven't emitted namespace
	declaration yet in this beginGroup.

2004-01-12  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (beginDocument):  New method - print XML declaration.

2004-01-04  Per Bothner  <per@bothner.com>

	* NodeTree (getIteratorAtPos):  New method.
	(posNamespaceURI, posPrefix, posLocalName, posFirstChild,
	posHasAttributes):  New DOM-like methods.

2003-12-24  Per Bothner  <per@bothner.com>

	* XName.java:  Implement Externalizable.
	(writeExternal, readExternal):  New methods.
	(setQName, getNamespaceNodes, setNamespaceNodes):  New methods.
	* NamespaceBinding.java:  Implement Externalizable.
	(writeExternal, readExternal):  New methods.
	(getPrefix, getUri, getNext, setPrefix, setUri, setNext):  New methods.
	(count, maybeAdd, toStringAll):  New methods.

2003-11-09  Per Bothner  <per@bothner.com>

	* NodeTree.java (toString):  New method.

2003-11-02  Per Bothner  <per@bothner.com>

	* XMLParser.java.in (<init>):  Remove unneeded throws specifications.

2003-10-30  Per Bothner  <per@bothner.com>

	* NamespaceBinding.java (toString):  New method.

	* ParsedXMLToConsumer.java (closeStartTag):  Fix thinko.

2003-10-29  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java:  Re-implement namespaces to preserve
	namespace info using a chain of NamespaceBindings.
	* ParsedXMLToConsumer.java (emitEndElement):  Don't allocate a
	String for the end tag.
	* XMLPrinter.java:  Print out namespace declarations.

2003-10-28  Per Bothner  <per@bothner.com>

	* NamespaceBinding.java:  New class.
	* XName.java:  New class.
	* Makefile.am (java_sources): Update accordingly.

2003-10-28  Per Bothner  <per@bothner.com>

	* Makefile.am (DONE_EDIT_SUBS):  Move from ../../Make-rules.
	Simplify to not insert extra line.  This matches build.xml and more
	importantly avoids a GNU sed feature (missing in Mac OSX Panther sed).

2003-09-09  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java (<init>):  Only use output TreeList
	directly if it's a NodeList - not if it's a SortedNodes, say.

2003-08-03  Per Bothner  <per@bothner.com>

	* NodeTree.java (nextPos):  New method.  Allows client simplification.

2003-08-01  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (setStyle):  Default htmlCompat to false.

2003-07-23  Per Bothner  <per@bothner.com>

	* NodeTree.java (stableCompare): New method.
	(getId):  New method.
	(id, counter):  New fields used by getId.

2003-07-10  Per Bothner  <per@bothner.com>

	* NodeTree.java:  New class, extends TreeList.
	* Makefile.am (java_sources):  Add NodeTree.java.

	* XMLPrinter.java (writeObject):  Don't call closeTag if parameter
	is SeqPosition or Consumable and not UnescapedData.

2003-06-27  Per Bothner  <per@bothner.com>

	* NamespaceResolver.java:  Removed - functionality merged with
	ParsedXMLToConsumer.java.
	* Makefile.am (java_sources):  Update accordingly.
	* ParsedXMLToConsumer.java:  Merge in NamespaceResolver functionality,
	but hopefully more efficient.  This is a major re-write.
	(class MappingInfo):  New helper class.

2003-05-30  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (toString):  New utility function.

2003-05-02  Per Bothner  <per@bothner.com>

	* NamespaceResolver.java (parser, mismatchReported):  New field.
	(setParser):  New method.
	(endGroup):  Call parser's error if mismatch.
	* ParsedXMLToConsumer.java (emitEndElement):  Add sanity check.

	* XMLParser.java.in (parse):  Set this.pos before calling
	emitBeginElement and emitEndElement, for better error reporting.

2003-04-12  Per Bothner  <per@bothner.com>

	* XMLParser.java.in (parse):  Handle Names according to XML 1.1
	candidate, allowing many other characters.

2003-01-28  Per Bothner  <per@bothner.com>

	* VariableProvider.java:  Removed - superceded more-or-less by XQuery.

2003-01-24  Per Bothner  <per@bothner.com>

	* NamespaceResolver.java (beginAttribute):  Fix off-by-one error
	reported 1/22 by Robert Yokota <ryokota@modeln.com>.

2003-01-09  Per Bothner  <per@bothner.com>

	* NamedChildrenFilter.java:  Update for gnu.lists changes.
	* NamespaceResolver.java:  Likewise.
	* XMLPrinter.java:  Likewise.
	
	* XMLPrinter.java (<init>):  Add 5 new constructors.
	(setStyle):  New method.
	(make):  Use setStyle.

2003-01-05  Per Bothner  <per@bothner.com>

	* XPath.java:  Removed - superceded more-or-less by XQuery.
	* XPathConstants.java:  Likewise.
	* XPathContext.java:  Likewise.
	* XPathFunction.java:  Likewise.
	* XPathParser.java:  Likewise.
	* XPathVariable.java:  Likewise.
	* Makefile.am:  Update acordingly.

2002-11-16  Per Bothner  <per@bothner.com>

	* QName.java.in:  Removed - now uses gnu.mapping.Symbol.
	* Makefile.am, NamedChildrenFilter.java, NamespaceResolver.java:
	Update accordingly.

2002-07-25  Per Bothner  <per@bothner.com>

	* NamedChildrenFilter.java (writeObject):  Check if val is Consumable.

2002-07-02  Per Bothner  <per@bothner.com>

	* XMLPrinter.java:  Replace all calls of writeRaw to super.write.
	This avoids a JDK1.1 problem with super.out not being accessible.
	(writeRaw):  Remove no-longer-used methods.

2002-06-26  Per Bothner  <per@bothner.com>

	* XMLParser.java.in (parse):  Fix setting of 'start' after 'fill'.

2002-06-24  Per Bothner  <per@bothner.com>

	* Makefile.am:  Renamed generated XMLParser class to XMLParserChar.

	* ParsedXMLToConsumer.java (parse):  Remove static helper method.
	Replaced by new Document.parse methods.

2002-06-19  Per Bothner  <per@bothner.com>

	* XMLParser.java.in:  Set up for more useful inheritance.
	(buffer, pos, limit, in):  Make protected.
	(parse):  Initiaze start safely even if buffer is null.
	(error):  Take extra serverity parameter.
	(parse):  Chaneg calls to error apropriately.
	(fill):  Handle copying saved data here, rather than in parse.
	(parse):  More specific error message if expecting attribute name.

2002-05-06  Per Bothner  <per@bothner.com>

	* NamespaceResolver.java (getIndex):  Fix logic error.

	* XMLParser.java.in:  New constructor.

	* QName.java.in (toString):  Print a null namespaceURI as '*'.

2002-04-07  Per Bothner  <per@bothner.com>

	* XPath.java:  Mark as deprecated.
	* XPathConstants.java:  Likewise.
	* XPathContext.java:  Likewise.
	* XPathParser.java:  Likewise.

2002-03-24  Per Bothner  <per@bothner.com>

	* QName.java.in (hashCode):  Allow localname to be null.

2002-03-02  Per Bothner  <per@bothner.com>

	* Makefile.am (SED_REFERENCES_SUBS): Moved to Make-rules.

2002-02-15  Per Bothner  <per@bothner.com>

	* Makefile.am (EXTRA_DIST):  Leave out redundant $(java_sources).
	Add package.html.

2002-02-14  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (writeObject):  Check for gnu.text.Char.

2002-02-13  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java (emitEntityReference):  New method.

	* XMLPrinter.java (writeChar): Fix output of character references.
	(write):  If a char is >= 127, pass it to writeChar.

	* Makefile.am (java_sources):  Remove QName.java - it is in java_BUILT.

	* Makefile.am (DONT_EDIT_SUBS):  Moved to ../../Make-rules.

2002-02-11  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (writeChar):  Use character entity if non-ascii.

2002-02-05  Per Bothner  <per@bothner.com>

	* XMLParser.java.in (parse):  Handle space after attribute name.

2002-01-29  Per Bothner  <per@bothner.com>

	* NamespaceResolver.java (beginGroup):  Call closeStartTag.

	* XMLPrinter.java (escapeText):  Make public.
	(<init>):  New constructors.

2002-01-23  Per Bothner  <per@bothner.com>

	* XMLPrinter.java:  Re-write to inherit from PrintConsumer.

2002-01-21  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java (parse):  Use NamespaceResolver.
	Add calls to out.beginDocument/endDocument.

	* XMLPrinter.java (writeObject):  Check for UnescapedData.

2002-01-13  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (style):  New field.
	(make): Static method - takes a style parameter.

2002-01-07  Per Bothner  <per@bothner.com>

	* NamedChildrenFilter.java:  New class, extends FilterConsumer.
	* Makefile.am (java_sources):  Add NamedChildrenFilter.java.

	* NamespaceResolver.java (endAttributes):  Fix range bug.

	* XMLPrinter.java (beginDocument, endDocument):  New methods.

2002-01-02  Per Bothner  <per@bothner.com>

	* XMLParser.java.in:  No longer read entire file into buffer.
	This allows handling very large input files, but required lots of
	changes here and there.
	* ParsedXMLHandler.java.in (emitComment):  Update API comment.

2001-12-24  Per Bothner  <per@bothner.com>

	* XMLParser.java.in (parse):  Fix comment reading to handle --->.

	* XMLPrinter.java (htmlCompat):  New field.
	(endGroup):  If htmlCompat, don't call closeTag.

	* XMLPrinter.java (writeObject):  Handle null.
	Don't startWord if value is String or CharSeq.

	* NamespaceResolver.java (endGroup, writeChar, writeBoolean,
	writeFloat):  Add missing calls to closeStartTag.

2001-11-24  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (writeObject):  Handle null argument.

2001-11-16  Jim White  <jim@pagesmiths.com>

	* QName.java.in:  Fix syntax errors in WITHOUT REFERENCES case.

2001-11-12  Per Bothner  <per@bothner.com>

	* QName.java.in (make):  LocalName can be null (for XQuery '*').

	* NamespaceResolver.java (endAttributes);  Fix off-by-one bug.

	* NamespaceResolver.java (resolve):  Return "" if no namespace.

2001-11-05  Per Bothner  <per@bothner.com>

	* XMLPrinter.java (out):  Changed form PrintWriter to Consumer.
	Chaneg most method bodies to match.

	* XPath.java (main):  Comment out.

2001-10-17  Per Bothner  <per@bothner.com>

	* QName.java:  Moved to QName.java.in.
	* QName.java.in:  New file.  Add code to using references to reclaim
	unused QNames.  Make it conditional on --with-java-references.
	* Makefile.am:  Update accordingly.

	* QName.java:  Make it implement Externalizable.
	(writeExternal, readExternal, readResolve):  New methods.

	* QName.java (getNamespaceURI, getLocalName):  Make final.

2001-09-24  Per Bothner  <per@bothner.com>

	* QName.java:  New class.
	* ElementContext.java:  Removed; subsumed by QName.
	* ElementType.java:  Removed; subsumed by QName.
	* Makefile.am (java_sources):  Update accordingly.
	* NamespaceResolver.java:  Use QName instead of ElementContext.

2001-08-16  Per Bothner  <per@bothner.com>

	* XMLPrinter.java:  Implement positionConsumer.
	(writePosition):  New methods.
	(writeObject):  Handle SeqPosition.

2001-07-17  Per Bothner  <per@bothner.com>

	* package.html:  Belated initial check-in.

	* XPathContext.java (writePosition):  New method.

	* ParsedXMLToConsumer.java: Handle that Consumer now uses endAttribute
	rather than endAttributes (which used to signal end of start tag).
	* XMLPrinter.java:  Likewise.
	* NamespaceResolver.java:  Likewise.

2001-05-09  Per Bothner  <per@bothner.com>

	* XPath.java: Numerous small cleanups.
	(matchPath):  Fix logic.
	(matchSingleStep):  Convert more of the code for old Node-based.

2001-04-24  Per Bothner  <per@bothner.com>

	* Xpath.java:  Use new Convert.parseDouble method.
	* XPathParser.java:  Likewise.

2001-04-09  Per Bothner  <per@bothner.com>

	New package gnu.xml, moved/renamed from ../gnu/kawa/xml.
	* ParsedXMLHandler.java.in:  Moved from gnu.kawa.xml.
	* XMLParser.java.in:  Moved from gnu.kawa.xml.
	* XMLPrinter.java:  Moved from gnu.kawa.xml.
	* ParsedXMLToConsumer.java:  Moved from gnu.kawa.xml.
	* ElementContext.java:  New class.
	* ElementType.java:  New class.
	* NamespaceResolver.java:  New class, extends gnu.util.FilterConsumer.
	* VariableProvider.java:  New interface.
	* XPath.java:  New class.
	* XPathConstants.java:  New interface.
	* XPathContext.java:  New class.
	* XPathFunction.java:  New class.
	* XPathParser.java:  New class.
	* XPathVariable.java:  New abstract class.
	* Makefile.am:  Moved from ../gnu/kawa/xml.  Added new classes.
	Renamed some macros.
	* COPYING:  New file.

2001-03-23  Per Bothner  <per@bothner.com>

	* Makefile.am:  The automake Java support does not handle "built"
	Java sources, so roll our own.

2001-03-08  Per Bothner  <per@bothner.com>

	* ParsedXMLToConsumer.java:  Import gnu.lists instead of gnu.kawa.util.
	* XMLPrinter.java:  Likewise.
	(writeObject):  If Consumable, consume it.
	(write):  Fixes - forgotten what.

2001-02-16  Per Bothner  <per@bothner.com>

	New package.
	* ParsedXMLHandler.java.in:  New to-be-preprocess-Java file.
	* gnu/kawa/xml/XMLParser.java.in:  Likewise.
	* gnu/kawa/xml/ParsedXMLToConsumer.java:  New class.
	* XMLPrinter.java:  New class.  Implements Consumer.

