[prev in list] [next in list] [prev in thread] [next in thread] 

List:       batik-users
Subject:    Re: adding a fragment of SVG to a document
From:       dao <dao.hodac () gmail ! com>
Date:       2010-05-22 12:48:16
Message-ID: AANLkTikNHowGA63BQTfcsvPC4QVoWWK6QHkI1ekbCA5D () mail ! gmail ! com
[Download RAW message or body]

OK, thank's

On Thu, May 20, 2010 at 11:40 AM, <thomas.deweese@kodak.com> wrote:

> Hi Dao,
>
> dao <dao.hodac@gmail.com> wrote on 05/17/2010 10:02:50 AM:
>
> > adding a fragment of SVG to a document [...]
> > I have a canvas with a loaded document (ALWAYS_DYNAMIC)
>
> > I want to add this piece of SVG (value of the text variable):
> > <text id="fooText" ...>FOO</text>
> >
> > but then, the returned node is null (createDocument fails). I
> > suppose <text> is not enought, I have to specify it is SVG.
>
>         Correct.
>
> > Then, I surrounded the text tag with a <!DOCTYPE..><svg> ... </svg>
> > and it works well.
>
>         BTW you should only need the <svg>...</svg>.
>
> > But when I look to my SVG document, it contains
> > the SVG tag.
>
>         Well it was there in the input.
>
> > How can I have this:?
>
>         Use the Dom's methods to get the 'firstChild'
> of the returned document's root element, and append that.
>



-- 
Dao Hodac

[Attachment #3 (text/html)]

OK, thank&#39;s<br><br><div class="gmail_quote">On Thu, May 20, 2010 at 11:40 AM,  \
<span dir="ltr">&lt;<a \
href="mailto:thomas.deweese@kodak.com">thomas.deweese@kodak.com</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"> <font size="2" face="sans-serif">Hi Dao,</font>
<br>
<br><tt><font size="2">dao &lt;<a href="mailto:dao.hodac@gmail.com" \
target="_blank">dao.hodac@gmail.com</a>&gt; wrote on 05/17/2010 10:02:50 AM:<br>
<br>
&gt; adding a fragment of SVG to a document [...]</font></tt>
<br><div class="im"><tt><font size="2">&gt; I have a canvas with a loaded document \
(ALWAYS_DYNAMIC)<br> </font></tt>
<br></div><div class="im"><tt><font size="2">&gt; I want to add this piece of SVG \
(value of the text variable):<br>
&gt; &lt;text id=&quot;fooText&quot; ...&gt;FOO&lt;/text&gt;<br>
&gt; <br>
&gt; but then, the returned node is null (createDocument fails). I <br>
&gt; suppose &lt;text&gt; is not enought, I have to specify it is SVG.<br>
</font></tt>
<br></div><tt><font size="2">        Correct.</font></tt>
<br><div class="im">
<br><tt><font size="2">&gt; Then, I surrounded the text tag with a \
                &lt;!DOCTYPE..&gt;&lt;svg&gt;
... &lt;/svg&gt; <br>
&gt; and it works well.</font></tt>
<br>
<br></div><tt><font size="2">        BTW you should
only need the &lt;svg&gt;...&lt;/svg&gt;.</font></tt>
<br><div class="im">
<br><tt><font size="2">&gt; But when I look to my SVG document, it contains
<br>
&gt; the SVG tag.</font></tt>
<br>
<br></div><tt><font size="2">        Well it was there
in the input.</font></tt>
<br><div class="im">
<br><tt><font size="2">&gt; How can I have this:?</font></tt>
<br>
<br></div><tt><font size="2">        Use the Dom&#39;s
methods to get the &#39;firstChild&#39; </font></tt>
<br><tt><font size="2">of the returned document&#39;s root element, and append
that.</font></tt><font size="2" face="sans-serif"><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Dao Hodac<br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic