tags:

views:

228

answers:

1
xsltCopyText: text allocation failed
runtime error: element value-of
xsltValueOf: text copy failed

Got this error when parsing XML (wikipedia dump, actually) w/ XMLStarlet. I can get page titles and ids, but when it comes to page texts, it fails.

Expression used:

xml sel -N xmlns=http://www.mediawiki.org/xml/export-0.3/ -T -t -m "//xmlns:revision" -v "xmlns:text" -n d:\wiki\translated.wiki.xml

P.S. I'm doing it on Windows.

+2  A: 

What's the content of translated.wiki.xml? Just check the first few lines, it may have been corrupted somewhere.

Can you reproduce the problem on a small subset of translated.wiki.xml? Wikipedia dumps are huge and often crash tools which allocate memory too greedily.

bortzmeyer
I validated translated.wiki.xml w/ XMLStarlet, and it's consistent.Yes, it works correctly on small subset. Must be memory issues. Stupid, stupid me :)
Kuroki Kaze
Okay, problem solved using Xalan (with XSLT generated by XML Starlet).
Kuroki Kaze