Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
clean-and-itasks
clean-platform
Commits
3d409129
Commit
3d409129
authored
Apr 15, 2020
by
Steffen Michels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add test with named entity references in text and attribute data
parent
04bff694
Pipeline
#41358
passed with stage
in 1 minute and 46 seconds
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
src/libraries/OS-Independent/Text/GenXML.dcl
src/libraries/OS-Independent/Text/GenXML.dcl
+2
-2
src/libraries/OS-Independent/Text/GenXML/Gast.icl
src/libraries/OS-Independent/Text/GenXML/Gast.icl
+10
-5
No files found.
src/libraries/OS-Independent/Text/GenXML.dcl
View file @
3d409129
src/libraries/OS-Independent/Text/GenXML/Gast.icl
View file @
3d409129
...
...
@@ -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
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment