xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olaf Schnabel <schna...@karto.baug.ethz.ch>
Subject Re: Batik and printNode command
Date Thu, 21 Apr 2005 13:09:40 GMT
Thomas, thanks for the hint.

Regards
Olaf

Thomas DeWeese wrote:
> Hi Olaf,
> 
> Olaf Schnabel wrote:
> 
>> I use the printNode command in my webproject (SVG + ECMAScript) and 
>> want to write out a part of the SVG-code (tags + content).
>>
>> Example of SVG code:
>>
>> <svg>
>>     <defs id="def">
>>         <circle cx="20" cy="20" r="10"/>
>>     </defs>
>> </svg>
>>
>> In the Adobe SVG Viewers the following ECMAScript code works without 
>> problems:
>>
>> var x = document.getElementById("def");
>> var y = printNode(x);
>>
>> In Batik  I get an error message "printNode is not defined."
>>
>> Do you have any ideas for a workaround?
> 
> 
>    One option is to use the 'import' facilities of Rhino to
> pull in one of the DOM serializers from Batik (like
> org.apache.batik.dom.util.DOMUtilities), and use that
> to serialize the document.
> 
>    It is also pretty easy to write a simple DOM serializer
> in ECMAScript.  It wouldn't surprise me if you could find
> one floating around on the net (from comments on
> svg-developers I suspect that people doing real
> serialization of the DOM write there own).
> 
>>
>> Thanks for your answer.
>>
>> Regards
>> Olaf
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org
> 

-- 
Olaf Schnabel
Department of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg, CH-8093  Zurich, Switzerland
phone: ++41 44 633 3031
e-mail: schnabel@karto.baug.ethz.ch
www: http://www.ika.ethz.ch/schnabel

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


Mime
View raw message