XML: SAX and XInclude

L

Laurent Pointal

[python 2.5, Linux Mandriva 2007.1]

Hello,

does anybody know about an XML parser usable with the sax API (xml.sax)
and with XInclude feature support (directly or via hacks).

With specifying nothing (default parser), it simply transmit xinclude
elements (i tried to call parser on included file but it seem to be
waiting for a complete document with root element).

I tried libxml2, but failed with error (cf at the end).

I tried xmlproc, but it simply transmit xinclude elements too.

Thanks (its for PQRC - I've a first xhtml production which is not bad,
when it'll be ok I will work on OpenDocument XML production - and would
like to split PQRC xml source into several files).


A+

Laurent.



Problem with libxml2:
[laurent@litchi qrccompiler]$ python compiler.py
processing
Traceback (most recent call last):
File "compiler.py", line 573, in <module>
sys.exit(main(*sys.argv[1:]))
File "compiler.py", line 569, in main
handler.process_source()
File "compiler.py", line 465, in process_source
self.saxparser = make_parser(["libxml2"])
File "/usr/lib/python2.5/site-packages/_xmlplus/sax/sax2exts.py",
line 37,
in make_parser
return XMLParserFactory.make_parser(parser_list)
File "/usr/lib/python2.5/site-packages/_xmlplus/sax/saxexts.py", line 64,
in make_parser
return self._create_parser(parser_name)
File "/usr/lib/python2.5/site-packages/_xmlplus/sax/saxexts.py", line 43,
in _create_parser
return drv_module.create_parser()
AttributeError: 'module' object has no attribute 'create_parser'
 
L

Laurent Pointal

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top