
I'm pretty sure the answer is "no", but I'm wondering if there's any way to use XQuery update via Saxon to update an attribute value such that the resulting value has literal newline characters in it. In the context of the DITA 1.3 RNG stuff, I've written a little XQuery transform that updates the default value of the @domains attribute as declared in a document type shell's grammar doc. The value of the a:defaultValue attribute as I've coded it is formatted like so: <attribute name="domains" a:defaultValue=" (topic topic) (topic hazard-d) (topic hi-d) (topic indexing-d) (topic ut-d) (topic hazard-d) a(props deliveryTarget) "/> Which is consistent with the general DITA coding practice of putting each thing on its own line for each of updating and so on. However, the XQuery update will not emit literal newlines using any method I've tried. This is consistent with the fact that newlines in XML attributes are treated as space characters when the XML is parsed. That is, if I do: let $domains := string-join(local:getDomainsContributions($e), ' ') Then what I get in the updated document is: a:defaultValue="(topic abbrev-d) (topic equation-d) (topic hazard-d) (topic hi-d) (topic indexing-d) (topic mathml-d) (topic pr-d) (topic relmgmt-d)" Which is technically correct per the XML spec but not what I wanted. Is there any solution here other than simply doing a global search and replace on (which is OK but not as automatic as I had hoped I could do). Thanks, Eliot ————— Eliot Kimber, Owner Contrext, LLC http://contrext.com