263 """Initialise the RELAX NG validator.
264 Launches RVP as a parallel process.
265 schema_filename should be the name of a file containing the RELAX NG schema, in compact syntax.
266 """
267 self._ws = re.compile('[^\t\n\r ]')
268 schema_filename = schemaBase + '.rnc'
269
270 try:
271 self._rvp_pipe = subprocess.Popen(['rvp', schema_filename],
272 stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True)
273 except OSError, e:
274 raise self.RvpProtocolError("Failed to run rvp for CellML syntax validation: " + str(e))
275
276 self._rvpin, self._rvpout = self._rvp_pipe.stdin.fileno(), self._rvp_pipe.stdout.fileno()
277
278 import xml.parsers.expat
279 self.expat = xml.parsers.expat
280