Jon Ison wrote: > I am evaluating XMLMind Pro (v4.1) and have a question. > > I have a document with entity references. When I try to convert the document > to > Office Open XML (M$ Word 2007) it > fails, complaining that: > > Command execution has failed > javax.xml.transform.TransformerException: Failure reading > file:/tmp/xxe53772/__doc.xml > > The full diagnostic is at the end of this email. > This is strange as I can convert all of the documents that are referenced > with no > problems, just not the parent document. > My question is, how do I transform a document with entity references to e.g. > Word > 2007 ?
If you can open a document in XMLmind XML Editor (whatever the version), then, in principle, you should be able to convert it using "Convert Document". > I guess I could use XMLMind 3.8.0 - exploiting an issue with that version of > the > software - to save the parent > document, which would then give me a version of the document with all the > entity > references replaced with the actual > XML, which I could then convert using v4.1, but that seems a bit of a hack! I don't think this would work. See below. > Any advice and / or a fix much appreciated ! XMLmind XML Editor (whatever the version) always passes a *flat* (that is, reference to entities and XIncludes being expanded) copy of the XML document (__doc.xml) to the XSLT engine. This copy is generated in a temporary directory (/tmp/xxe53772/). Therefore in principle, the XSLT engine shouldn't see any reference to an entity (internal or external). My guess is that your problems come from the contents of the internal DTD subset of your master document. You almost certainly have one: your master document seem to be a DocBook 5 -- RELAX NG-based, DTD-less -- document. If you could send us (mailto:hussein at xmlmind.com) your master document, I think we could give you an accurate diagnostic just by reading its XML source.

