We build the DDX dynamically based on a list of PDF files to be assembled. For each file we want to add a bookmark title based on the file content's title. This title may contain characters like " (quot), & (amp), ' (apos). E.g. this is an extract from a DDX:<br /><PDF source="rapportbok_49" bookmarkTitle=""Background levels": More text"><br /></PDF><br />This will cause assembling to fail (naturly). In this case we could have enclosed the title text with apostroph instead of quotation. But what do we do if the title contains both characters? <br />We tried to rewrite the DDX to (this would have solved the problem with quot and apos):<br /><PDF source="rapportbok_49"><br /> <bookmarkTitle>"Background levels": More text</bookmarkTitle><br /></PDF><br />However, this is not a legal DDX syntax.<br />We tried to substitute " with ", resulting in " in the output.<br />We tried to escape " with \", giving syntax failure.<br /><br />Does anyone have a suggestion to how to solve our problem?