I wanted to do this, but I was ignoring to how to do this.
Alberto gave me the solution. Problem solved...
Thanks.

Franck.

-----Original Message-----
From: Jones, Monte J CTR USAF AFSPC SMC/SLWE
[mailto:[email protected]] 
Sent: Friday, January 07, 2011 9:08 AM
To: [email protected]
Subject: RE: SVG file

Have you tried replacing "svg" with "http://www.w3.org/2000/svg";?

MJJ

-----Original Message-----
From: Franck Leclerc [mailto:[email protected]] 
Sent: Thursday, January 06, 2011 3:26 PM
To: [email protected]
Cc: [email protected]
Subject: RE: SVG file

Thanks.

I already look at http://jwatt.org/svg/authoring/

My problem is when I create svg document with DOM (Xerces-C++ 2.8.0),
attribute "xmlns" is created with default value ("svg") and I have not
found the way to change this value ("xmlns" seem to be a special
attribute).

 

If xmlns should have the value http://www.w3.org/2000/svg
(xmlns=http://www.w3.org/2000/svg), my SVG file will be correct.
Could you tell me how to change value for this special attribute?

 

Code used to create SVG document:

DOMImplementation *pImpl = DOMImplementation::getImplementation();

DOMDocumentType* pDoctype = pImpl->createDocumentType(
XercesString("svg"), NULL, NULL );

pSVG = pImpl->createDocument(XercesString("svg"), XercesString("svg"),
pDoctype);

 

Thanks again.

lecf

 

-----Original Message-----
From: [email protected] [mailto:[email protected]] 
Sent: Thursday, January 06, 2011 4:39 PM
To: [email protected]
Subject: Re: SVG file

 

It looks like your SVG is broken. xmlns needs a namespace URI, and
people

also recommend to not use a DOCTYPE declaration.

 

Have a look at this:

 

http://jwatt.org/svg/authoring/

 

Cheers,

 

Uwe

 

On Fri, Jan 7, 2011 at 3:26 AM, Franck Leclerc

Franck.Leclerc-at-adacel.com|xerces-c developer mailing lis/Example

Allow|

<[email protected]> wrote:

 

> Can I use Xerces-C++ (DOM) to generate SVG file?

>

>

>

> I tried but attribute "xmlns" have a value ("svg") not recognized by
SVG

> viewer (Explorer, Mozilla, Inkscape)

>

> I used Xerces 2.8.0. See below the generated file.

>

> I tried to change attribute value of "xmlns" without success (also I
can

> not remove it).

>

>

>

> <?xml version="1.0" encoding="UTF-8" standalone="no" ?>

>

> <!DOCTYPE svg>

>

> <svg xmlns="svg" height="200" width="320">

>

>  <g style="font-size:14">

>

>    <rect height="20" style="stroke:node; fill:red" width="29" x="100"

> y="20"/>

>

>    <text x="20" y="35">North</text>

>

>  </g>

>

> </svg>

>

>

>

> Thanks.

>

> lecf

>

>

 

 

______________________________________________________________________

This email has been scanned by the MessageLabs Email Security System.

For more information please visit http://www.messagelabs.com/email 

______________________________________________________________________


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

Reply via email to