cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Sparkes <pe...@didm.co.uk>
Subject Re: CForms Samples - saveDocument() function
Date Tue, 11 Apr 2006 13:52:51 GMT
Hi Jeroen,

Thanks, following up your advice and after looking at 
http://java.sun.com/j2se/1.5.0/docs/api/javax/xml/transform/OutputKeys.html
I tried
transformer.setOutputProperty(Packages.javax.xml.transform.OutputKeys.DOCTYPE_SYSTEM, 
"marker.dtd");

However it does not insert the document type declaration in the saved 
document.

Regards

Peter

> Hi Peter,
>
> I'm not completely sure but I guess you can change the function to 
> ouput the document type?
> You can probably do this by adding an OutputProperty to the 
> TransformerFactory.
>
> I guess it should look something like:
>
> transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, "doctype");
>
> I hope this helps.
>
> Regards,
>
> Reijn
>
> Peter Sparkes wrote:
>
>> Hi,
>>
>> I am using both loadDocument(uri) and saveDocument(document, uri) 
>> functions from the CForm samples in webapp\samples\blocks\forms\flow. 
>> The loadDocument(uri) functions loads xml documents together with 
>> their document type declarations, however the saveDocument(document, 
>> uri) function saves the documents without their document type 
>> declarations.
>>
>> Does anyone, please, have a javascript function which will save xml 
>> documents (DOM) with their document type declarations.
>>
>> Thank you
>>
>> Peter Sparkes
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message