-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
Description
The main issue with parsing SVG is that tags inside, like path can be at the same time self-closing and have children. It's not the case with HTML where the list of self-closing tags is known upfront. Need to think of how to fit this tags duality.
Example of tags-duality from animationMotion tag spec. The last path has children.
<svg width="5cm" height="3cm" viewBox="0 0 500 300"
xmlns="http://www.w3.org/2000/svg">
<desc>Example animMotion01 - demonstrate motion animation computations</desc>
<rect x="1" y="1" width="498" height="298"
fill="none" stroke="blue" stroke-width="2" />
<path id="path1" d="M100,250 C 100,50 400,50 400,250"
fill="none" stroke="blue" stroke-width="7.06" />
<circle cx="100" cy="250" r="17.64" fill="blue" />
<path d="M-25,-12.5 L25,-12.5 L 0,-87.5 z"
fill="yellow" stroke="red" stroke-width="7.06" >
<animateMotion dur="6s" repeatCount="indefinite" rotate="auto" >
<mpath href="#path1"/>
</animateMotion>
</path>
</svg>
Reactions are currently unavailable