[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's<br><br><div class="gmail_quote">On Thu, May 20, 2010 at 11:40 AM, \
<span dir="ltr"><<a \
href="mailto:thomas.deweese@kodak.com">thomas.deweese@kodak.com</a>></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 <<a href="mailto:dao.hodac@gmail.com" \
target="_blank">dao.hodac@gmail.com</a>> wrote on 05/17/2010 10:02:50 AM:<br>
<br>
> adding a fragment of SVG to a document [...]</font></tt>
<br><div class="im"><tt><font size="2">> I have a canvas with a loaded document \
(ALWAYS_DYNAMIC)<br> </font></tt>
<br></div><div class="im"><tt><font size="2">> I want to add this piece of SVG \
(value of the text variable):<br>
> <text id="fooText" ...>FOO</text><br>
> <br>
> but then, the returned node is null (createDocument fails). I <br>
> suppose <text> 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">> Then, I surrounded the text tag with a \
<!DOCTYPE..><svg>
... </svg> <br>
> and it works well.</font></tt>
<br>
<br></div><tt><font size="2"> BTW you should
only need the <svg>...</svg>.</font></tt>
<br><div class="im">
<br><tt><font size="2">> But when I look to my SVG document, it contains
<br>
> 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">> How can I have this:?</font></tt>
<br>
<br></div><tt><font size="2"> Use the Dom's
methods to get the 'firstChild' </font></tt>
<br><tt><font size="2">of the returned document'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