xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bishop, Michael W. CONTR J9C880" <Michael.Bis...@je.jfcom.mil>
Subject RE: Creating attributes in a different namespace?
Date Tue, 13 Dec 2005 15:03:31 GMT
Right.  I'd originally had the xmlns tag in every element that used it, but I ended up moving
it to the SVG tag like your example below.
Michael Bishop


From: G. Wade Johnson [mailto:gwadej@anomaly.org]
Sent: Tue 12/13/2005 8:00 AM
To: batik-users@xmlgraphics.apache.org
Subject: Re: Creating attributes in a different namespace?

On Tue, 13 Dec 2005 00:27:58 -0500
"Bishop, Michael W. CONTR J9C880" <Michael.Bishop@je.jfcom.mil> wrote:

> Yeah, it was reading back blank values because I was using
> Element.getAttributeNS(...) wrong.  Instead of appending the xmlns to every
> element, I did put it in the root SVG element to save on document size.
> Amazingly, all this stuff finally works right.  Thanks for the suggestions
> and help; I now have scaling, translating, and rotating all working
> together.

Maybe I'm misunderstanding you, but you should be able to put the xmlns item
in the root svg tag and use the appropriate prefix anywhere in the document.
For example,

<svg width="1040" height="1090"

   <mine:specialtag>Does something</mine>
   <rect x="10" y="10" width="100" height="50"
         mine:property="a special property"/>

G. Wade
If there's no solution, there's no problem.         -- Rick Hoselton

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

View raw message