eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'XML::SAXBuilder':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: SAXBuilder (in XML)


Inheritance:

   Object
   |
   +--XML::XMLNodeBuilder
      |
      +--XML::NodeBuilder
         |
         +--XML::SAXBuilder

Package:
stx:goodies/xml/vw
Category:
XML-VW-SAX
Version:
rev: 1.8 date: 2014/11/04 12:24:03
user: sr
file: SAXBuilder.st directory: goodies/xml/vw
module: stx stc-classLibrary: vw

Description:


Author: Roger Whitney whitney@cs.sdsu.edu
Version: 1.0  
Date: 4/2/2000

ORSAXBuilder is a bridge between an VWXMLXMLParser and an VWXMLSAXDriver. It intercepts calls from the parser 
and sends the proper message to the SAXDriver. 

Implementation notes: The XML parser uses the builder in building a tree structure for a document.
The final tree structure is not used by ORSAXBuilder because the final tree does not contain the
processing instructions. So the ORSAXBuilder intercepts build calls to infer the document structure. 
It must cache attribute calls and the current tag as the Parser provides the separately, while the SAXDrvier
wants the tag will all the attributes in one call. The hard part of ths class is determing when we have all the attributes
for the current tag.

Instance Variables:
	attributes      <Collection>    builds up list of attribures for the current tag
	pendingTag      <VWXMLNodeTag>  The current we are collecting the attributes for. nil value indicates
											that we are between tags.
	saxDriver       <VWXMLSAXDriver> 


Class protocol:

instance creation
o  driver: aVWXMLSAXDriver source: aStream


Instance protocol:

accessing
o  driver

o  pushTag: tag whileDoing: aBlock
Starting a new tag. aBlock may call this method

building
o  attribute: name value: value
Accumulate all attributes for a single start tag

o  comment: text
Handle the comment of a tag

o  externalGeneralEntity: nameString id: arrayIDs ndata: ndata uri: anURI

o  externalParameterEntity: nameString id: arrayIDs

o  makeText: text
Handle the text content of a tag

o  notation: name value: val

o  pi: nm text: text

initialization
o  initializeDriver: aVWXMLSAXDriver source: aStream

private
o  char: aChar startsSkipableWhiteSpaceIn: aStream
used to determine if whitespace is skipable

o  collectTextIn: aStream
collects text from current position upto ignorable whitespace

o  collectWhitespaceIn: aStream
collects contigous whitespace from current position

o  notifyClientEndElement: currentTag

o  notifyClientStartElement: currentTag

o  separateIgnorableWhitespaceAndText: aString

queries
o  isTreeBuilding
answer true, if our builder wants the XML parser to build
a tree of elements.
We do not need the tree, so answer false



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 14 Nov 2019 01:57:32 GMT