Search the web
Sign In
New User? Sign Up
svg-developers · SVG Developers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
HTML BASE tag impacting SVG   Message List  
Reply | Forward Message #63012 of 63168 |
Re: HTML BASE tag impacting SVG

Hi Larry,


> I have defined some gradients inside a DEFS tag and use them in
> styles as fill:url(#gradientname1) This works great until someone
> adds a BASE HREF to the enclosing page that does not match the page
> as loaded from the server.

Humm... I haven't double check the whole SVG specification for sure regarding
this, but I assume you are creating inline SVG into HTML and therefore the
potential undefined behavior.

Whenever one experiences unexpected behavior, stating in which
implementation/environment is usually helpful: it could be an
implementation-specific bug. Also providing a test case and/or link where this
can be seen is also helpful [1]. ;-)


> How can I prevent this issue?

Without testing, I'd say you can use "xml:base" [2] in you top-level SVG
document to override HTML's "base". If that doesn't work, I'd say it's a bug!
:-)

Nevertheless, even if it works in a quick test, I'd advise you to test in more
than one implementation, as I have a slight feeling this may not work
cross-implementation. Just a tip...


> It should be noted that my SVG code is part of a javascript package
> that can be loaded into any folder within the web application's
> hierarchy (ie no hard code path info is possible).

Yes, that's a reasonable use-case.


> TIA,
> Larry

Hope this helps,
Helder


[1] http://www.chiark.greenend.org.uk/~sgtatham/bugs.html
[2] http://www.w3.org/TR/SVG/struct.html#Core.attrib




Thu Nov 5, 2009 4:20 pm

heldermagalhaes
Offline Offline
Send Email Send Email

Forward
Message #63012 of 63168 |
Expand Messages Author Sort by Date

I have defined some gradients inside a DEFS tag and use them in styles as fill:url(#gradientname1) This works great until someone adds a BASE HREF to the...
lpmlabs9
Offline Send Email
Nov 4, 2009
5:43 pm

Hi Larry, ... Humm... I haven't double check the whole SVG specification for sure regarding this, but I assume you are creating inline SVG into HTML and...
heldermagalhaes
Offline Send Email
Nov 5, 2009
4:22 pm

Thanks for the reply. Guess I'm batting 500 which in baseball would be great; in software, not so hot. Safari and Chrome work fine with the BASE tag being...
lpmlabs9
Offline Send Email
Nov 9, 2009
5:26 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help