from xml.sax.handler import feature_namespaces
import re
+import sys
def is_attr_true( attrs, name ):
"""Read a name value from an element's attributes.
supplied SAX callback, which should be derived from
FilterGLAPISpecBase.
"""
+
parser = make_parser()
parser.setFeature(feature_namespaces, 1)
parser.setContentHandler( handler )
handler.printHeader()
- parser.parse( file_name )
+
+ if not file_name or file_name == "-":
+ parser.parse( sys.stdin )
+ else:
+ parser.parse( file_name )
handler.printFooter()
return