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 want to render a piece of xml with namespaces, but the xmlns keyword is interpreted as an ordinary attribute:
{-# LANGUAGE OverloadedStrings #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
importText.Hamlet.XMLasHamletimportText.XMLimportText.XML.Cursortest::IO()
test = parseSomething renderSomething
parseSomething::Element->IO()
parseSomething el =dolet cur = fromNode $NodeElement el
tick = cur $| element "{some:namespace}tick"
tack = cur $/ element "{some:namespace}tack"print (length tick, length tack, cur)
renderSomething::Element
renderSomething = el
where
[NodeElement el] = [Hamlet.xml|
<tick xmlns="some:namespace">
<tack>
|]
expected behavior: output should be (1, 1, ..), and the xmlns keyword should not be in the attribute list.
observed behavior: output is (0, 0, ..), and the xmlns keyword is listed as an ordinary attribute.
The text was updated successfully, but these errors were encountered:
I have no intention of modifying the xml-hamlet parser to have special support for xmlns right now. If you're interested in having this behavior, you'd need to send a PR yourself.
I want to render a piece of xml with namespaces, but the
xmlns
keyword is interpreted as an ordinary attribute:expected behavior: output should be
(1, 1, ..)
, and thexmlns
keyword should not be in the attribute list.observed behavior: output is
(0, 0, ..)
, and thexmlns
keyword is listed as an ordinary attribute.The text was updated successfully, but these errors were encountered: