[XML-SIG] xml.dom.esis_builder -- "e" events

Fred L. Drake Fred L. Drake, Jr." <fdrake@acm.org
Fri, 20 Nov 1998 11:01:43 -0500 (EST)


  nsgmls can output "e" events if the next element has a declared
content type of EMPTY when given the "-oempty" option.  This is really
only interesting if we're generating an SGML output document, but I
found it useful to generate them from a LaTeX->ESIS conversion tool
I've been playing with.  Feeding them to EsisBuilder should not cause
an exception; they can be safely ignored.
  The patch below implements this.
  Andrew, please merge this with the CVS tree.


  -Fred

--
Fred L. Drake, Jr.	     <fdrake@acm.org>
Corporation for National Research Initiatives
1895 Preston White Dr.	    Reston, VA  20191


Index: esis_builder.py
===================================================================
RCS file: /projects/cvsroot/xml/dom/esis_builder.py,v
retrieving revision 1.2
diff -c -c -r1.2 esis_builder.py
*** esis_builder.py	1998/11/18 23:57:12	1.2
--- esis_builder.py	1998/11/20 15:53:51
***************
*** 60,67 ****
  			elif event == 'C':
  				return
  
  			else:
! 				sys.stderr.write('Unknow event: ' + `line` + '\n')
  
  
  backslash = r"\\"
--- 60,73 ----
  			elif event == 'C':
  				return
  
+ 			elif event == 'e':
+ 				# Indicates that this is an empty element;
+ 				# only produced by nsgmls for -oempty.  We
+ 				# can safely ignore it.
+ 				pass
+ 
  			else:
! 				sys.stderr.write('Unknown event: ' + `line` + '\n')
  
  
  backslash = r"\\"