[XML-SIG] Support for Validating Parsers

David Niergarth jdnier@execpc.com
Thu, 19 Nov 1998 11:03:42 -0600

Lars Marius Garshol:
>What I want is for them to appear interleaved in the normal ESIS
>stream as they do when nsgmls is run from the command line. However,
>os.popen fails to accomplish this, instead the errors are still
>printed to the console, while everything else is forwarded to my SAX

I couldn't get the interleaved behavior seen when running from the command
line but the following prepends the error messages to the esis: (Usefull?
Not sure if you'll get same behavior in W95/98.)

>>> s = os.popen("nsgmls -wxml com_err.xml 2>>&1", "r")
>>> print s.read()[0:300]
nsgmls:com_sm.xml:6:17:E: end tag for element "PP" which is not open
nsgmls:com_sm.xml:7:5:E: end tag for "P" omitted, but OMITTAG NO was
nsgmls:com_sm.xml:6:2: start tag was here
?xml version="1.0"
-The Comedy of Errors
-FM Text.\n\012\011

Fred Drake:
> You should be able to use 2>NUL to send errors to the equivalent of
> /dev/null.  Haven't test, though: that would require at least a 90
> degree chair rotation!  ;-)

No need to get up; it works as advertized. (Wow, never knew you could do

--David Niergarth