Well, I wouldn't have expected your approach to work because: How would IE know that the stylesheet processing instruction is to be handed to ASV? And there doesn't seem to be a way to do this.
I tried placing the stylesheet in an svg:style element inside the svg:svg element. I thought if this would work then using an external stylesheet might be possible by using external entities or something like that. But I didn't even get an internal stylesheet to work. And to my astonishment, even the use of the style attribute directly at svg: elements did not work in IE+ASV. So all I can say is that CSS for inline SVG in IE is even more of a problem than I had expected. But I'm using IE 6. Maybe some of the problems are resolved in version 7, although I rather don't think so. But you can give it a try with internal stylesheet. In case that works, you could try external entities or XSLT to include an external stylesheet. Otherwise, maybe there is some way to make IE hand on a processing instruction to ASV or maybe there is some way to set a stylesheet for ASV with a param element inside the object node in the head. There is quite a lot of things which can be done in IE but are not well known. But I wouldn't know where to start searching for such hacks, if there really are. Regarding your question: What are you doing wrong? My answer would be: You're using the wrong browser. Your code looks fine. But I'm not sure if it's even possible to make it work in IE. If you really need to support IE then I would suggest either to embed external SVG files by reference or to use XSL. Client side XSLT even has the advantage that you don't need a browser switch to deliver the document as text/html for IE, the content type would be application/ xml for any browser. --- In svg-developers@yahoogroups.com, "panic4217" <[EMAIL PROTECTED]> wrote: > > I am having a problem getting Internet Explorer 7 to use an > external style sheet (CSS) for styling SVG in an XHTML document. > > This is my XHTML document, served as text/html to satisfy IE7: > > <?xml version="1.0"?> > <?xml-stylesheet type="text/css" href="/test.css" ?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" > "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:svg="http://www.w3.org/2000/svg" > xmlns:xlink="http://www.w3.org/1999/xlink" > xml:lang="en"> > <head> > <object id="AdobeSVG" > classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object> > <?import namespace="svg" implementation="#AdobeSVG"?> > </head> > <body> > <svg:svg width="45" height="40" version="1.1" > xmlns="http://www.w3.org/2000/svg"> > <svg:rect class="c" x="5" y="10" width="40" height="30" /> > </svg:svg> > </body> > </html> > > And this is test.css: > > rect { stroke: red; fill: blue } > > Can anyone tell me what I am doing wrong? > ----- To unsubscribe send a message to: [EMAIL PROTECTED] -or- visit http://groups.yahoo.com/group/svg-developers and click "edit my membership" ---- Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/svg-developers/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/