You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SVG\Reading\SVGReader::$nodeTypes contain the allowed node types. However I'd like to read a SVG and retrieve all properties, even if there not implemented. There's a lot of elements: SVG Elements and it should impossible to implement all (hard work).
Otherwise it seems that the SVGReader class apply all properties as attributes to the parsed node. I understand that declaring specific node types is require in order to render the SVG, but In don't think so to read a SVG.
So, if the SVGReader do not find any concret class for the current parsed node, it should instantiate a new object. In order to instantiate the right node (SVGNode or SVGNodeContainer generic implementations), should we had a full associative array of elements (as key) with boolean (as value) which defined if an element is a container or a final node?
If I'm totally wrong and it's not the purpose of the library, please tell me :)
The text was updated successfully, but these errors were encountered:
You are right, "unknown" nodes should not be discarded. I don't think differentiating between containers and non-containers is necessary — since we can never know for custom tags, it should always be an SVGNodeContainer.
This is now implemented in 5677a18. Nodes with an unknown tag name are retrieved in a generic implementation that supports everything supported by regular containers - i.e. attributes, styles, child nodes, and text content.
Actually I know it's not a bug, but a feature.
SVG\Reading\SVGReader::$nodeTypes
contain the allowed node types. However I'd like to read a SVG and retrieve all properties, even if there not implemented. There's a lot of elements: SVG Elements and it should impossible to implement all (hard work).Otherwise it seems that the
SVGReader
class apply all properties as attributes to the parsed node. I understand that declaring specific node types is require in order to render the SVG, but In don't think so to read a SVG.So, if the
SVGReader
do not find any concret class for the current parsed node, it should instantiate a new object. In order to instantiate the right node (SVGNode
orSVGNodeContainer
generic implementations), should we had a full associative array of elements (as key) withboolean
(as value) which defined if an element is a container or a final node?If I'm totally wrong and it's not the purpose of the library, please tell me :)
The text was updated successfully, but these errors were encountered: