DJ_AM_Juicebox
asked on
Question about namespaces?
Hi,
I'm trying to use "xlink:href" within an html document, but I'm not sure how to use this. I'm trying to display an <svg> element, here's my code:
<html>
<body>
<svg
width="800px"
height="500px"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<ellipse cx="100" cy="100" rx="20">
<animateMotion dur="40s" >
<mpath xlink:href="#curve"/> // <-- Problem
</animateMotion>
</ellipse>
</svg>
</body>
</html>
yeah so my browser won't load the page, saying:
XML self-closing tag syntax used on <mpath>. The tag will not be closed.
the <svg> element is originally taken from a .svg file, I want to put it into this .html file. What's the right way to reference it?
Thanks
I'm trying to use "xlink:href" within an html document, but I'm not sure how to use this. I'm trying to display an <svg> element, here's my code:
<html>
<body>
<svg
width="800px"
height="500px"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<ellipse cx="100" cy="100" rx="20">
<animateMotion dur="40s" >
<mpath xlink:href="#curve"/> // <-- Problem
</animateMotion>
</ellipse>
</svg>
</body>
</html>
yeah so my browser won't load the page, saying:
XML self-closing tag syntax used on <mpath>. The tag will not be closed.
the <svg> element is originally taken from a .svg file, I want to put it into this .html file. What's the right way to reference it?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
<mpath xlink:href="#curve"/>
but this parses fine:
<mpath xlink:href="#curve"></mpat
is there a way to tell the browser to expect the shorter-notation? Otherwise I have to always add these extra tags.
Thanks