473,473 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

image/svg+xml

i am trying to create dynamic svg-images by using asp. i dont use any doctype.
first lines of my asp-file are

Response.ContentType = "image/svg+xml".
Call Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")

after these lines i wrote the svg-code. this doesn't work using internet
explorer but in firefox it works. so i thried to use php. first lines in php
are

header("Content-Type: image/svg+xml");
echo '<?xml version="1.0" encoding="UTF-8"?>';

after these lines i wrote the svg-code. this works using both browsers. so i
need someone who is able to show me how to get this run on both browsers using
asp.

Dec 20 '07 #1
2 3320
Markus wrote on Thu, 20 Dec 2007 06:20:23 +0100:
i am trying to create dynamic svg-images by using asp. i dont use any
doctype.
first lines of my asp-file are
Response.ContentType = "image/svg+xml".
Call Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")
after these lines i wrote the svg-code. this doesn't work using
internet explorer but in firefox it works. so i thried to use php.
first lines in php are
header("Content-Type: image/svg+xml");
echo '<?xml version="1.0" encoding="UTF-8"?>';
after these lines i wrote the svg-code. this works using both browsers.
so i need someone who is able to show me how to get this run on both
browsers using asp.
Is there anything before those lines in your ASP code? IE is dependent upon
having no empty space before the XML, eg.
<%
'do some ASP stuff here
%>
<%
Response.ContentType = "image/svg+xml".
Call Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")
%>

will result in a blank line appearing before the XML header. What you need
to do is strip out any whitespace above where you start outputting the XML,
eg.

<%
'do some ASP stuff here
%><%
Response.ContentType = "image/svg+xml".
Call Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")
%>

the simple removal of that blank line makes a big difference.

If you provide all the ASP page content up to where you write out the first
XML line then it might make it easier to see where the issue is.

--
Dan
Dec 21 '07 #2
"Daniel Crichton" <ms****@worldofspack.comwrote in message
news:Ou**************@TK2MSFTNGP05.phx.gbl...
Markus wrote on Thu, 20 Dec 2007 06:20:23 +0100:
i am trying to create dynamic svg-images by using asp. i dont use any
doctype.
first lines of my asp-file are
Response.ContentType = "image/svg+xml".
Call Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")
after these lines i wrote the svg-code. this doesn't work using
internet explorer but in firefox it works. so i thried to use php.
first lines in php are
header("Content-Type: image/svg+xml");
echo '<?xml version="1.0" encoding="UTF-8"?>';
after these lines i wrote the svg-code. this works using both browsers.
so i need someone who is able to show me how to get this run on both
browsers using asp.

Is there anything before those lines in your ASP code? IE is dependent
upon
having no empty space before the XML, eg.
<%
'do some ASP stuff here
%>
<%
Response.ContentType = "image/svg+xml".
Call Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")
%>

will result in a blank line appearing before the XML header. What you need
to do is strip out any whitespace above where you start outputting the
XML,
eg.

<%
'do some ASP stuff here
%><%
Response.ContentType = "image/svg+xml".
Call Response.Write("<?xml version=""1.0"" encoding=""UTF-8""?>")
%>

the simple removal of that blank line makes a big difference.

If you provide all the ASP page content up to where you write out the
first
XML line then it might make it easier to see where the issue is.
My testing with FF3 shows it to be equally sensitive to any preceeding
whitespace, which is reasonable since that would be a breach of the spec.

I suggest using fiddler to determine exactly what is being sent by PHP and
comparing that with the ASP version. This could be a character encoding
problem.
--
Anthony Jones - MVP ASP/ASP.NET
Dec 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Karthik | last post by:
Hi, I am just curious if there is any existing API in PHP for rendering SVG (Scalable Vector Graphics). A quick search in Google pointed to me a place in zend.com -...
0
by: kevin gordon | last post by:
Attn: .NET, XML and SVG (Scalable Vector Graphics) Developers.... MOBIFORM Software Ltd. has now made beta copies of its SVG Browser and SVGViewPlus component available for download. The...
3
by: Tripredacus-X | last post by:
I am trying to implement an HTML free website design. I have the XM part working fine, but I am having difficulty trying to figure out ho to use SVG with it. I would like one of two things: ...
27
by: Mark | last post by:
I'm curious to get feedback regarding the potential SVG has in performing the same functionality as PDF for fixing documents. Thanks. Mark
7
by: mjarends | last post by:
I'm using JAXP for XSLT - I'm using the examples from http://www.w3.org/TR/xslt#section-Examples. I'm using the following XML file: <?xml version="1.0" encoding="UTF-8"?> <sales> <division...
1
by: Zhang Weiwu | last post by:
Hello. On one webpage I just worked out, I use svg (by using <object>) for browser that supports svg (firefox), and give an <imginside of <objectas a fallback for IE. ...
4
by: Glenn | last post by:
Hi folks, My problem is this... I am having an issue with whitespace between XML tags that occurs when I transform the XSL output to the browser via ASP.NET leaving me with unexpected...
13
by: NickName | last post by:
"For the vision impaired, SVG offers tremendous potential for interactive Internet mapping applications as discussed by Gardner and Bulatov (2001).". Now, here's an SVG file with fair/medium...
1
by: dariophoenix | last post by:
Greetings, We are making a rendering program. It receives an XML document which specifies how to do so, following the SVG format. The problem is: We need to underrstand the metrics used in that...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.