I've been trying to preprocess xincludes in my DocBook 5 build with xom, using the incantation in Bob Stayton's "Complete Guide":

$ java -cp "xom-1.2.1.jar:xom-samples.jar"
nu.xom.samples.XIncludeDriver source.xml > serialized.xml

The xincludes resolve just fine, but the serialized doc's encoding comes out as ISO-8859-1, so xom complains about UTF-8 characters in the source. The output doc ends, incomplete, with a cascase of xom Serializer errors.

According to the XOM api doc, it should be possible to specify the encoding as UTF-8, but I haven't found how to do it from the command line. Anybody know how (or if there's a better solution)? I'm assuming the failure is on account of the encoding problem, since the document seems to process normally otherwise.

I tried adding a DOCTYPE declaration, in case that might make a difference -- it didn't:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book >
<book xmlns="http://docbook.org/ns/docbook"; xmlns:xi="http://www.w3.org/2001/XInclude"; version="5.0">





---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscr...@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-h...@lists.oasis-open.org

Reply via email to