<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks for looking into this extension!<br>
<br>
On 03/13/2015 06:25 AM, Gabriel Riba wrote:<br>
<blockquote cite="mid:mduduq$mc0$1@ger.gmane.org" type="cite">Although
it is well explained in the manual (XML section), it is not easy
to understand when there are several abstract concepts, that your
mind easily skips.
<br>
<br>
Specially the type constructor "tag" it is confound with the value
"tag" (that builds up xml subtrees with specific tag) but the
different parameters they take augments the confusion.
<br>
</blockquote>
<br>
The idea of separate namespaces for types and values is pretty
common; Ur/Web inherits it from SML. You see the same thing with,
e.g., class constructors in C++. I don't think it's inherently
confusing, and usually it even improves understanding, by avoiding
the need to add some extra nonsense prefix or suffix to an
identifier for disambiguation.<br>
<br>
<blockquote cite="mid:mduduq$mc0$1@ger.gmane.org" type="cite">>
val svg : unit -> tag svgTagAttrs body svg [] []
<br>
>
<br>
> There is a quirk, since SVG can be an html level tag but also
an
<br>
> inner svg fragment container, but I have not treated this
case.
<br>
<br>
The "svg" tag establishes a new coordinate system. The fragments
can be
<br>
set up with the grouping tag "g", without redefining the
coordinate system.
<br>
<br>
I could not find a way to encode two possible outer context
requirements for the svg tag.
<br>
</blockquote>
<br>
Yeah, the XML encoding is not set up to support tags that work in
multiple contexts where there is no single <i>most general</i>
context that subsumes all the options. Your example seems to need
separate contexts for <body> and <svg>, where either
case supports some tag that is not legal in the other.<br>
<br>
One easy-to-implement workaround is to use a <i>separate tag</i>
for nested SVG, with a different name. Then modify src/monoize.sml
to add a special case renaming that tag to <svg> in compiled
code, for instance by copying the code in the place that maps "tabl"
to "table" right now.<br>
</body>
</html>