Project

Profile

Help

calling Saxon in os.system() in Python

Added by Anonymous over 17 years ago

Legacy ID: #4099875 Legacy Poster: gertone (gertone)

All, I have a good reason for calling Saxon (XSLT2.0) as a system call from Python 2.5. I have a strange issue with doing that. If I call the command from the windows command line all runs fine and I get the desired result. If I construct the command line in the Python script, and call os.system() I get an SXXP0003 error claiming the source document is not wellformed (which is not correct), reporting an end tag is missing. regardless of what I do with the input, the error happens on the last line, column 256 I have similar issues with popen() The files are about 5 MegaByte in size Saxon 8.8B, j on a windows XP Professional, Centrino Duo processor with 2GigaByte RAM I tried the old java -jar way, the java net.sf... and I even compiled the stylesheet always the same error, I also have been playing with the heapsize with no obvious effect Would this be a memory limitation of what python offers for the system call? So far I tried to work on the cosmetics... heap size, compiling,... I did not try to reproduce the problem with a small stylesheet and simpler files yet Anyone a clue on this? cheers geert


Replies (2)

RE: calling Saxon in os.system() in Python - Added by Anonymous over 17 years ago

Legacy ID: #4099953 Legacy Poster: Michael Kay (mhkay)

I'm afraid I can't offer much help with this. Partly because I know nothing about Python; more particularly, because it's clearly some kind of configuration or integration problem where the components aren't working together properly, and it's very hard to solve those problems remotely. I know you've tried to supply the relevant information, but frankly, the fact that it's running on a Centrino Duo is unlikely to be relevant, whereas there's some other critical bit of information that's likely to be crucial, but it's hard to know what it is. I would go for simplifying the problem and dividing it up, varying one aspect of the problem at a time. Does it happen with a trivially small XML document containing only ASCII characters? Does it happen if you take Saxon out of the equation (call the XML parser directly)? Does it happen if you substitute a different XML parser?

RE: calling Saxon in os.system() in Python - Added by Anonymous over 17 years ago

Legacy ID: #4100703 Legacy Poster: gertone (gertone)

Mr. Kay, thank you very much for your attention and your answer. I tried some stuff and then dumped the question here, just in case someone would recognise this from a past experience. I will now put some more effort in myself, to see if I can isolate the problem. I will bear your suggestions in mind and will keep the forum posted if I find something worthwhile to share. Thanks again, geert

    (1-2/2)

    Please register to reply