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
I'm in the process of upgrading TabletWeaving.jl to use XML.jl v0.3.
I have a function that generates HTML:
using TabletWeaving
using Colors
color1 = RGB(1, 0, 0)
color2 = RGB(0, 1, 0)
image = [ color1 color1;
color1 color2;
color2 color1;
color1 color2;
color2 color1 ]
pattern = TabletWeavingPattern("test", image;
threading_function = symetric_threading!)
p = pretty(pattern)
Node Element <html> (2 children)
XML.children(p)
2-element Vector{Node}:
Node Text "Node Element <head> (1 child)"
Node Text "Node Element <body> (2 children)"
When I try to serialize it though, I get
XML.write(p)
"<html>\n Node Element <head> (1 child)\n Node Element <body> (2 children)\n</html>"
as if XML.write is recursing to Base.write rather than XML.write when serializing an element's children.
NOTE that I needed to explicitly escape the less than and greater thans in that output because the GitHub issues substrate was being stupid.
I found this bug because TabletWeaving.jl has tests that use EzXML.jl to parse its HTML output so that tests can use XPath to find and test parts of the document.
Perhaps XML.jl should test that it can parse what it has serialized.
I'm not sure how you wich to resolve this.
My inclination would be to explicitly overload Base.write in XML.jl/src/XML.jl and explicitly specialize those methods to XML.Node.
The text was updated successfully, but these errors were encountered:
I'm in the process of upgrading TabletWeaving.jl to use XML.jl v0.3.
I have a function that generates HTML:
When I try to serialize it though, I get
as if XML.write is recursing to Base.write rather than XML.write when serializing an element's children.
NOTE that I needed to explicitly escape the less than and greater thans in that output because the GitHub issues substrate was being stupid.
I found this bug because TabletWeaving.jl has tests that use EzXML.jl to parse its HTML output so that tests can use XPath to find and test parts of the document.
Perhaps XML.jl should test that it can parse what it has serialized.
I'm not sure how you wich to resolve this.
My inclination would be to explicitly overload Base.write in XML.jl/src/XML.jl and explicitly specialize those methods to XML.Node.
The text was updated successfully, but these errors were encountered: