Commit 3d409129 authored by Steffen Michels's avatar Steffen Michels

add test with named entity references in text and attribute data

parent 04bff694
Pipeline #41358 passed with stage
in 1 minute and 46 seconds
......@@ -11,12 +11,17 @@ derive ggen XMLNode, XMLAttr
// TODO: Generate URIs for namespaces, instead of using names.
ggen{|XMLDoc|} st =
[ XMLDoc
[ docWithNamedCharacterEntityReference
: [ XMLDoc
(unNameString <$> defaultNamespace)
(bifmap unNameString unNameString <$> namespaces)
(XMLElem rootName rootAttrs rootChildren)
\\ (defaultNamespace, namespaces, rootName, rootAttrs, rootChildren) <- ggen{|*|} st
]
]
where
docWithNamedCharacterEntityReference =
XMLDoc Nothing [] (XMLElem (uname "someName") [XMLAttr (uname "attr") "< >\" '&"] [XMLText "\"& <>\""])
ggen{|XMLQName|} st = [XMLQName (unNameString <$> namespace) (unNameString name) \\ (namespace, name) <- ggen{|*|} st]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment